diff mbox series

[3/5] powerpc/powernv: Remove set but not used variable 'total_vfs'

Message ID 1574144074-142032-4-git-send-email-zhengbin13@huawei.com (mailing list archive)
State Not Applicable
Headers show
Series powerpc: Remove five unused variables | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (784eee1cc44801366d4f197e0ade7739ee8e1e83)
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Zheng Bin Nov. 19, 2019, 6:14 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

arch/powerpc/platforms/powernv/pci-ioda.c: In function pnv_pci_vf_assign_m64:
arch/powerpc/platforms/powernv/pci-ioda.c:1346:25: warning: variable total_vfs set but not used [-Wunused-but-set-variable]

It is introduced by commit 02639b0e1326 ("powerpc/powernv:
Group VF PE when IOV BAR is big on PHB3"), but never used, so remove it.

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

--
2.7.4
diff mbox series

Patch

diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index da1068a..846843b 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -1341,7 +1341,6 @@  static int pnv_pci_vf_assign_m64(struct pci_dev *pdev, u16 num_vfs)
 	struct resource       *res;
 	int                    i, j;
 	int64_t                rc;
-	int                    total_vfs;
 	resource_size_t        size, start;
 	int                    pe_num;
 	int                    m64_bars;
@@ -1350,7 +1349,6 @@  static int pnv_pci_vf_assign_m64(struct pci_dev *pdev, u16 num_vfs)
 	hose = pci_bus_to_host(bus);
 	phb = hose->private_data;
 	pdn = pci_get_pdn(pdev);
-	total_vfs = pci_sriov_get_totalvfs(pdev);

 	if (pdn->m64_single_mode)
 		m64_bars = num_vfs;