From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Bjorn Helgaas <helgaas@kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: Christoph Hellwig <hch@lst.de>,
linux-pci@vger.kernel.org, kernel@pengutronix.de,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Russell Currey <ruscur@russell.cc>,
"Oliver O'Halloran" <oohall@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Subject: [PATCH v5 05/11] powerpc/eeh: Don't use driver member of struct pci_dev and further cleanups
Date: Wed, 29 Sep 2021 10:53:00 +0200 [thread overview]
Message-ID: <20210929085306.2203850-6-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20210929085306.2203850-1-u.kleine-koenig@pengutronix.de>
The driver member of struct pci_dev is to be removed as it tracks
information already present by tracking of the driver core. So replace
pdev->driver->name by dev_driver_string() for the corresponding struct
device.
Also move the function nearer to its only user and instead of the ?:
operator use a normal if which is more readable.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
arch/powerpc/include/asm/ppc-pci.h | 5 -----
arch/powerpc/kernel/eeh.c | 8 ++++++++
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h
index 2b9edbf6e929..f6cf0159024e 100644
--- a/arch/powerpc/include/asm/ppc-pci.h
+++ b/arch/powerpc/include/asm/ppc-pci.h
@@ -55,11 +55,6 @@ void eeh_pe_dev_mode_mark(struct eeh_pe *pe, int mode);
void eeh_sysfs_add_device(struct pci_dev *pdev);
void eeh_sysfs_remove_device(struct pci_dev *pdev);
-static inline const char *eeh_driver_name(struct pci_dev *pdev)
-{
- return (pdev && pdev->driver) ? pdev->driver->name : "<null>";
-}
-
#endif /* CONFIG_EEH */
#define PCI_BUSNO(bdfn) ((bdfn >> 8) & 0xff)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index e9b597ed423c..4b08881c4a1e 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -399,6 +399,14 @@ static int eeh_phb_check_failure(struct eeh_pe *pe)
return ret;
}
+static inline const char *eeh_driver_name(struct pci_dev *pdev)
+{
+ if (pdev)
+ return dev_driver_string(&pdev->dev);
+
+ return "<null>";
+}
+
/**
* eeh_dev_check_failure - Check if all 1's data is due to EEH slot freeze
* @edev: eeh device
--
2.30.2
next prev parent reply other threads:[~2021-09-29 8:53 UTC|newest]
Thread overview: 20+ 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 ` [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 ` Uwe Kleine-König [this message]
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 10:17 ` Simon Horman
2021-09-29 14:44 ` Ido Schimmel
2021-09-29 15:21 ` Ido Schimmel
2021-09-29 8:53 ` [PATCH v5 08/11] scsi: message: fusion: Remove unused parameter of mpt_pci driver's probe() Uwe Kleine-König
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 13:15 ` Andrew Donnellan
2021-09-29 13:43 ` Uwe Kleine-König
2021-09-29 15:44 ` Andrew Donnellan
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-6-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=benh@kernel.crashing.org \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-pci@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oohall@gmail.com \
--cc=paulus@samba.org \
--cc=ruscur@russell.cc \
/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).