linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xu Yilun <yilun.xu@intel.com>
To: Tom Rix <trix@redhat.com>
Cc: mdf@kernel.org, linux-fpga@vger.kernel.org,
	linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	lgoncalv@redhat.com, hao.wu@intel.com
Subject: Re: [PATCH 1/2] fpga: dfl: add driver_override support
Date: Tue, 20 Oct 2020 15:11:58 +0800	[thread overview]
Message-ID: <20201020071158.GC28746@yilunxu-OptiPlex-7050> (raw)
In-Reply-To: <f767b9a0-1db8-7ced-6bd9-5ee1f58d40da@redhat.com>

> >>>  int __dfl_driver_register(struct dfl_driver *dfl_drv, struct module *owner)
> >>>  {
> >>> -	if (!dfl_drv || !dfl_drv->probe || !dfl_drv->id_table)
> >>> +	if (!dfl_drv || !dfl_drv->probe)
> >> id_table is still needed for the normal case.
> >>
> >> Instead of removing this check, could you add something like
> >>
> >> || (!dfl_drv->is_override && !dfl_drv->id_table)
> > I don't think it is needed. Seems is_override and !id_table are duplicated
> > conditions for this implementation. And it may make confusing, e.g. could
> > a driver been force matched when is_override is not set?
> >
> > I think we could make it simple, if the dfl driver didn't provide the
> > id_table, normally it could not match any device. I think it could be
> > easily understood by dfl driver developers.
> >
> Then an ASSERT should be added in dfl_bus_match() for id_entry.

I didn't get your idea. What Assertion should be added for id_entry?
BUG_ON(id_entry == NULL)? Then dfl-uio-pdev can't be inserted before
driver_override is set.

I think it is normal case that a driver is successfully registered but
doesn't match any device because it provides no id_table.

Thanks,
Yilun.

  reply	other threads:[~2020-10-20  7:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16  6:02 [PATCH 0/2] UIO support for dfl devices Xu Yilun
2020-10-16  6:02 ` [PATCH 1/2] fpga: dfl: add driver_override support Xu Yilun
2020-10-16 16:21   ` Tom Rix
2020-10-19  4:06     ` Xu Yilun
2020-10-19  7:46       ` Wu, Hao
2020-10-19  7:50         ` Xu Yilun
2020-10-19  8:53           ` gregkh
2020-10-19  8:52       ` Xu Yilun
2020-10-19  9:03         ` Greg KH
2020-10-20  0:42           ` Xu Yilun
2020-10-19 13:55       ` Tom Rix
2020-10-20  7:11         ` Xu Yilun [this message]
2020-10-20  7:32           ` Greg KH
2020-10-20  8:57             ` Xu Yilun
2020-10-20  9:21               ` Greg KH
2020-10-21  7:25                 ` Xu Yilun
2020-11-09  2:30                   ` Xu Yilun
2020-10-20 14:13           ` Tom Rix
2020-10-16  6:02 ` [PATCH 2/2] fpga: dfl: add the userspace I/O device support for DFL devices Xu Yilun
2020-10-16 16:36   ` Tom Rix
2020-10-19  4:16     ` Xu Yilun
2020-10-19 14:01       ` Tom Rix
2020-10-16 16:40 ` [PATCH 0/2] UIO support for dfl devices Tom Rix
2020-10-19  4:17   ` Xu Yilun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201020071158.GC28746@yilunxu-OptiPlex-7050 \
    --to=yilun.xu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hao.wu@intel.com \
    --cc=lgoncalv@redhat.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).