All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	kw@linux.com, kishon@kernel.org, bhelgaas@google.com,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v6 2/9] PCI: endpoint: Pass EPF device ID to the probe function
Date: Mon, 5 Jun 2023 19:25:28 +0530	[thread overview]
Message-ID: <20230605135528.GF5536@thinkpad> (raw)
In-Reply-To: <ZH3eUQaIvWAQLI9A@lpieralisi>

On Mon, Jun 05, 2023 at 03:08:33PM +0200, Lorenzo Pieralisi wrote:
> On Fri, Jun 02, 2023 at 09:13:25PM +0900, Damien Le Moal wrote:
> > On 6/2/23 20:47, Manivannan Sadhasivam wrote:
> > > Currently, the EPF probe function doesn't get the device ID argument needed
> > > to correctly identify the device table ID of the EPF device.
> > > 
> > > When multiple entries are added to the "struct pci_epf_device_id" table,
> > > the probe function needs to identify the correct one. This is achieved by
> > > modifying the pci_epf_match_id() function to return the match ID pointer
> > > and passing it to the driver's probe function.
> > > 
> > > pci_epf_device_match() function can return bool based on the return value
> > > of pci_epf_match_id().
> > > 
> > > Reviewed-by: Kishon Vijay Abraham I <kishon@kernel.org>
> > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > 
> > [...]
> > 
> > >  static int pci_epf_device_match(struct device *dev, struct device_driver *drv)
> > > @@ -510,8 +510,12 @@ static int pci_epf_device_match(struct device *dev, struct device_driver *drv)
> > >  	struct pci_epf *epf = to_pci_epf(dev);
> > >  	struct pci_epf_driver *driver = to_pci_epf_driver(drv);
> > >  
> > > -	if (driver->id_table)
> > > -		return pci_epf_match_id(driver->id_table, epf);
> > > +	if (driver->id_table) {
> > > +		if (pci_epf_match_id(driver->id_table, epf))
> > > +			return true;
> > > +		else
> > > +			return false;
> > 
> > You prefer keeping this pattern ?
> > 
> > return pci_epf_match_id(driver->id_table, epf) != NULL;
> > 
> > is no much nicer !
> 
> s/no/so
> 
> Yes it is, I can change it myself to spare Mani few cycles.
> 

Please do!

- Mani

> Lorenzo
> 
> > 
> > Anyway:
> > 
> > Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> > 
> > -- 
> > Damien Le Moal
> > Western Digital Research
> > 

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2023-06-05 13:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02 11:47 [PATCH v6 0/9] Add support for MHI Endpoint function driver Manivannan Sadhasivam
2023-06-02 11:47 ` [PATCH v6 1/9] PCI: endpoint: Add missing documentation about the MSI/MSI-X range Manivannan Sadhasivam
2023-06-02 11:47 ` [PATCH v6 2/9] PCI: endpoint: Pass EPF device ID to the probe function Manivannan Sadhasivam
2023-06-02 12:13   ` Damien Le Moal
2023-06-05 13:08     ` Lorenzo Pieralisi
2023-06-05 13:55       ` Manivannan Sadhasivam [this message]
2023-06-05  9:27   ` Lorenzo Pieralisi
2023-06-05 11:57     ` Manivannan Sadhasivam
2023-06-05 13:06       ` Lorenzo Pieralisi
2023-06-23 20:14   ` Bjorn Helgaas
2023-06-02 11:47 ` [PATCH v6 3/9] PCI: endpoint: Return error if EPC is started/stopped multiple times Manivannan Sadhasivam
2023-06-02 12:14   ` Damien Le Moal
2023-06-02 11:47 ` [PATCH v6 4/9] PCI: endpoint: Add linkdown notifier support Manivannan Sadhasivam
2023-06-02 11:47 ` [PATCH v6 5/9] PCI: endpoint: Add BME " Manivannan Sadhasivam
2023-06-02 11:47 ` [PATCH v6 6/9] PCI: qcom-ep: Add support for Link down notification Manivannan Sadhasivam
2023-06-02 11:47 ` [PATCH v6 7/9] PCI: qcom-ep: Add support for BME notification Manivannan Sadhasivam
2023-06-02 11:47 ` [PATCH v6 8/9] PCI: endpoint: Add PCI Endpoint function driver for MHI bus Manivannan Sadhasivam
2023-06-07 20:49   ` Bjorn Helgaas
2023-06-07 21:19     ` Bjorn Helgaas
2023-06-08 16:35       ` Manivannan Sadhasivam
2023-06-09  7:53       ` Lorenzo Pieralisi
2023-06-02 11:47 ` [PATCH v6 9/9] MAINTAINERS: Add PCI MHI endpoint function driver under " Manivannan Sadhasivam
2023-06-02 12:15   ` Damien Le Moal
2023-06-05 14:45 ` [PATCH v6 0/9] Add support for MHI Endpoint function driver Lorenzo Pieralisi

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=20230605135528.GF5536@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=bhelgaas@google.com \
    --cc=dlemoal@kernel.org \
    --cc=kishon@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.