All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-pci@vger.kernel.org, kernel@pengutronix.de,
	Sathya Prakash <sathya.prakash@broadcom.com>,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
	Suganath Prabu Subramani  <suganath-prabu.subramani@broadcom.com>,
	MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: [PATCH v5 08/11] scsi: message: fusion: Remove unused parameter of mpt_pci driver's probe()
Date: Wed, 29 Sep 2021 10:53:03 +0200	[thread overview]
Message-ID: <20210929085306.2203850-9-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20210929085306.2203850-1-u.kleine-koenig@pengutronix.de>

The only two drivers don't make use of the id parameter, so drop it.

This removes a usage of struct pci_dev::driver which is planned to be
removed as it tracks duplicate data.

Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/message/fusion/mptbase.c | 7 ++-----
 drivers/message/fusion/mptbase.h | 2 +-
 drivers/message/fusion/mptctl.c  | 4 ++--
 drivers/message/fusion/mptlan.c  | 2 +-
 4 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 7f7abc9069f7..b94d5e4fdc23 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -829,7 +829,6 @@ int
 mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, u8 cb_idx)
 {
 	MPT_ADAPTER	*ioc;
-	const struct pci_device_id *id;
 
 	if (!cb_idx || cb_idx >= MPT_MAX_PROTOCOL_DRIVERS)
 		return -EINVAL;
@@ -838,10 +837,8 @@ mpt_device_driver_register(struct mpt_pci_driver * dd_cbfunc, u8 cb_idx)
 
 	/* call per pci device probe entry point */
 	list_for_each_entry(ioc, &ioc_list, list) {
-		id = ioc->pcidev->driver ?
-		    ioc->pcidev->driver->id_table : NULL;
 		if (dd_cbfunc->probe)
-			dd_cbfunc->probe(ioc->pcidev, id);
+			dd_cbfunc->probe(ioc->pcidev);
 	 }
 
 	return 0;
@@ -2032,7 +2029,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
 	for(cb_idx = 0; cb_idx < MPT_MAX_PROTOCOL_DRIVERS; cb_idx++) {
 		if(MptDeviceDriverHandlers[cb_idx] &&
 		  MptDeviceDriverHandlers[cb_idx]->probe) {
-			MptDeviceDriverHandlers[cb_idx]->probe(pdev,id);
+			MptDeviceDriverHandlers[cb_idx]->probe(pdev);
 		}
 	}
 
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index b9e0376be723..4bd0682c65d3 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -257,7 +257,7 @@ typedef enum {
 } MPT_DRIVER_CLASS;
 
 struct mpt_pci_driver{
-	int  (*probe) (struct pci_dev *dev, const struct pci_device_id *id);
+	int  (*probe) (struct pci_dev *dev);
 	void (*remove) (struct pci_dev *dev);
 };
 
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 72025996cd70..ae433c150b37 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -114,7 +114,7 @@ static int mptctl_do_reset(MPT_ADAPTER *iocp, unsigned long arg);
 static int mptctl_hp_hostinfo(MPT_ADAPTER *iocp, unsigned long arg, unsigned int cmd);
 static int mptctl_hp_targetinfo(MPT_ADAPTER *iocp, unsigned long arg);
 
-static int  mptctl_probe(struct pci_dev *, const struct pci_device_id *);
+static int  mptctl_probe(struct pci_dev *);
 static void mptctl_remove(struct pci_dev *);
 
 #ifdef CONFIG_COMPAT
@@ -2838,7 +2838,7 @@ static long compat_mpctl_ioctl(struct file *f, unsigned int cmd, unsigned long a
  */
 
 static int
-mptctl_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+mptctl_probe(struct pci_dev *pdev)
 {
 	MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
 
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
index 3261cac762de..7c1af5e6eb0b 100644
--- a/drivers/message/fusion/mptlan.c
+++ b/drivers/message/fusion/mptlan.c
@@ -1377,7 +1377,7 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum)
 }
 
 static int
-mptlan_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+mptlan_probe(struct pci_dev *pdev)
 {
 	MPT_ADAPTER 		*ioc = pci_get_drvdata(pdev);
 	struct net_device	*dev;
-- 
2.30.2


  parent reply	other threads:[~2021-09-29  8:53 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29  8:52 [PATCH v5 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver Uwe Kleine-König
2021-09-29  8:52 ` Uwe Kleine-König
2021-09-29  8:52 ` [PATCH v5 01/11] PCI: Simplify pci_device_remove() Uwe Kleine-König
2021-09-29  8:52 ` [PATCH v5 02/11] PCI: Drop useless check from pci_device_probe() Uwe Kleine-König
2021-09-29  8:52 ` [PATCH v5 03/11] xen/pci: Drop some checks that are always true Uwe Kleine-König
2021-09-29  8:52 ` [PATCH v5 04/11] bcma: simplify reference to the driver's name Uwe Kleine-König
2021-09-29  8:53 ` [PATCH v5 05/11] powerpc/eeh: Don't use driver member of struct pci_dev and further cleanups Uwe Kleine-König
2021-09-29  8:53   ` Uwe Kleine-König
2021-09-29  8:53 ` [PATCH v5 06/11] ssb: Simplify determination of driver name Uwe Kleine-König
2021-09-29 11:13   ` Michael Büsch
2021-09-29  8:53 ` [PATCH v5 07/11] PCI: Replace pci_dev::driver usage that gets the " Uwe Kleine-König
2021-09-29  8:53   ` Uwe Kleine-König
2021-09-29 10:17   ` Simon Horman
2021-09-29 10:17     ` Simon Horman
2021-09-29 14:44   ` Ido Schimmel
2021-09-29 14:44     ` Ido Schimmel
2021-09-29 15:21     ` Ido Schimmel
2021-09-29 15:21       ` Ido Schimmel
2021-09-29  8:53 ` Uwe Kleine-König [this message]
2021-09-29  8:53 ` [PATCH v5 09/11] crypto: qat - simplify adf_enable_aer() Uwe Kleine-König
2021-09-29  8:53 ` [PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver Uwe Kleine-König
2021-09-29  8:53   ` Uwe Kleine-König
2021-09-29 13:15   ` Andrew Donnellan
2021-09-29 13:15     ` Andrew Donnellan
2021-09-29 13:43     ` Uwe Kleine-König
2021-09-29 13:43       ` Uwe Kleine-König
2021-09-29 15:44       ` Andrew Donnellan
2021-09-29 15:44         ` Andrew Donnellan
2021-09-30 13:48         ` Frederic Barrat
2021-09-30 13:48           ` Frederic Barrat
2021-09-29  8:53 ` [PATCH v5 11/11] PCI: Drop duplicated tracking of a pci_dev's bound driver Uwe Kleine-König

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=20210929085306.2203850-9-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=hch@lst.de \
    --cc=helgaas@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=suganath-prabu.subramani@broadcom.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 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.