lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240828103807.3683308-1-ruanjinjie@huawei.com>
Date: Wed, 28 Aug 2024 18:38:07 +0800
From: Jinjie Ruan <ruanjinjie@...wei.com>
To: <fbarrat@...ux.ibm.com>, <ajd@...ux.ibm.com>, <arnd@...db.de>,
	<gregkh@...uxfoundation.org>, <linuxppc-dev@...ts.ozlabs.org>,
	<linux-kernel@...r.kernel.org>
CC: <ruanjinjie@...wei.com>
Subject: [PATCH -next] cxl: Remove unused cxl_pci_to_cfg_record()

cxl_pci_to_cfg_record() is not used anywhere, and its function can be
replacd with PCI_DEVID(), so remove it.

Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
---
 drivers/misc/cxl/vphb.c | 12 +-----------
 include/misc/cxl.h      |  4 ----
 2 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/drivers/misc/cxl/vphb.c b/drivers/misc/cxl/vphb.c
index 6332db8044bd..1cf614bf104d 100644
--- a/drivers/misc/cxl/vphb.c
+++ b/drivers/misc/cxl/vphb.c
@@ -72,11 +72,6 @@ static void cxl_pci_reset_secondary_bus(struct pci_dev *dev)
 	/* Should we do an AFU reset here ? */
 }
 
-static int cxl_pcie_cfg_record(u8 bus, u8 devfn)
-{
-	return (bus << 8) + devfn;
-}
-
 static inline struct cxl_afu *pci_bus_to_afu(struct pci_bus *bus)
 {
 	struct pci_controller *phb = bus ? pci_bus_to_host(bus) : NULL;
@@ -99,7 +94,7 @@ static inline int cxl_pcie_config_info(struct pci_bus *bus, unsigned int devfn,
 {
 	int record;
 
-	record = cxl_pcie_cfg_record(bus->number, devfn);
+	record = PCI_DEVID(bus->number, devfn);
 	if (record > afu->crs_num)
 		return PCIBIOS_DEVICE_NOT_FOUND;
 
@@ -302,8 +297,3 @@ struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev)
 }
 EXPORT_SYMBOL_GPL(cxl_pci_to_afu);
 
-unsigned int cxl_pci_to_cfg_record(struct pci_dev *dev)
-{
-	return cxl_pcie_cfg_record(dev->bus->number, dev->devfn);
-}
-EXPORT_SYMBOL_GPL(cxl_pci_to_cfg_record);
diff --git a/include/misc/cxl.h b/include/misc/cxl.h
index d8044299d654..5ffa6e02bb07 100644
--- a/include/misc/cxl.h
+++ b/include/misc/cxl.h
@@ -23,10 +23,6 @@
 /* Get the AFU associated with a pci_dev */
 struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev);
 
-/* Get the AFU conf record number associated with a pci_dev */
-unsigned int cxl_pci_to_cfg_record(struct pci_dev *dev);
-
-
 /*
  * Context lifetime overview:
  *
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ