[PATCH 4/5] powerpc/powernv: Remove set but not used variable 'pdn'

zhengbin zhengbin13 at huawei.com
Tue Nov 19 17:14:33 AEDT 2019


Fixes gcc '-Wunused-but-set-variable' warning:

arch/powerpc/platforms/powernv/pci-ioda.c: In function pnv_ioda_release_vf_PE:
arch/powerpc/platforms/powernv/pci-ioda.c:1468:25: warning: variable pdn set but not used [-Wunused-but-set-variable]

It is introduced by commit 781a868f3136 ("powerpc/powernv:
Shift VF resource with an offset"), but never used, so remove it.

Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: zhengbin <zhengbin13 at huawei.com>
---
 arch/powerpc/platforms/powernv/pci-ioda.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 846843b..47ed443 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -1461,12 +1461,10 @@ static void pnv_ioda_release_vf_PE(struct pci_dev *pdev)
 	struct pci_controller *hose;
 	struct pnv_phb        *phb;
 	struct pnv_ioda_pe    *pe, *pe_n;
-	struct pci_dn         *pdn;

 	bus = pdev->bus;
 	hose = pci_bus_to_host(bus);
 	phb = hose->private_data;
-	pdn = pci_get_pdn(pdev);

 	if (!pdev->is_physfn)
 		return;
--
2.7.4



More information about the Linuxppc-dev mailing list