[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210122105706.3206057-1-yebin10@huawei.com>
Date: Fri, 22 Jan 2021 18:57:06 +0800
From: Ye Bin <yebin10@...wei.com>
To: <kishon@...com>, <lorenzo.pieralisi@....com>,
<bhelgaas@...gle.com>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: Ye Bin <yebin10@...wei.com>, Hulk Robot <hulkci@...wei.com>
Subject: [PATCH] PCI: endpoint: remove set but not used parameter in pci-epf-ntb.c
Fix follow warnings:
drivers/pci/endpoint/functions/pci-epf-ntb.c: In function ‘epf_ntb_peer_spad_bar_set’:
drivers/pci/endpoint/functions/pci-epf-ntb.c:763:18: warning: variable ‘epc’ set but not used [-Wunused-but-set-variable]
763 | struct pci_epc *epc;
| ^~~
drivers/pci/endpoint/functions/pci-epf-ntb.c: In function ‘epf_ntb_config_spad_bar_alloc’:
drivers/pci/endpoint/functions/pci-epf-ntb.c:976:18: warning: variable ‘epc’ set but not used [-Wunused-but-set-variable]
976 | struct pci_epc *epc;
| ^~~
drivers/pci/endpoint/functions/pci-epf-ntb.c:972:17: warning: variable ‘peer_barno’ set but not used [-Wunused-but-set-variable]
972 | enum pci_barno peer_barno, barno;
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Ye Bin <yebin10@...wei.com>
---
drivers/pci/endpoint/functions/pci-epf-ntb.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-ntb.c b/drivers/pci/endpoint/functions/pci-epf-ntb.c
index e2dc5cae5c81..0e8249b8aeba 100644
--- a/drivers/pci/endpoint/functions/pci-epf-ntb.c
+++ b/drivers/pci/endpoint/functions/pci-epf-ntb.c
@@ -760,7 +760,6 @@ epf_ntb_peer_spad_bar_set(struct epf_ntb *ntb, enum pci_epc_interface_type type)
struct pci_epf_bar *peer_epf_bar, *epf_bar;
enum pci_barno peer_barno, barno;
u32 peer_spad_offset;
- struct pci_epc *epc;
struct device *dev;
u8 func_no;
int ret;
@@ -775,7 +774,6 @@ epf_ntb_peer_spad_bar_set(struct epf_ntb *ntb, enum pci_epc_interface_type type)
barno = ntb_epc->epf_ntb_bar[BAR_PEER_SPAD];
epf_bar = &ntb_epc->epf_bar[barno];
func_no = ntb_epc->func_no;
- epc = ntb_epc->epc;
peer_spad_offset = peer_ntb_epc->reg->spad_offset;
epf_bar->phys_addr = peer_epf_bar->phys_addr + peer_spad_offset;
@@ -969,11 +967,10 @@ epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb,
const struct pci_epc_features *peer_epc_features, *epc_features;
struct epf_ntb_epc *peer_ntb_epc, *ntb_epc;
size_t msix_table_size, pba_size, align;
- enum pci_barno peer_barno, barno;
+ enum pci_barno barno;
struct epf_ntb_ctrl *ctrl;
u32 spad_size, ctrl_size;
u64 size, peer_size;
- struct pci_epc *epc;
struct pci_epf *epf;
struct device *dev;
bool msix_capable;
@@ -983,7 +980,6 @@ epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb,
epf = ntb->epf;
dev = &epf->dev;
ntb_epc = ntb->epc[type];
- epc = ntb_epc->epc;
epc_features = ntb_epc->epc_features;
barno = ntb_epc->epf_ntb_bar[BAR_CONFIG];
@@ -992,7 +988,6 @@ epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb,
peer_ntb_epc = ntb->epc[!type];
peer_epc_features = peer_ntb_epc->epc_features;
- peer_barno = ntb_epc->epf_ntb_bar[BAR_PEER_SPAD];
peer_size = peer_epc_features->bar_fixed_size[barno];
/* Check if epc_features is populated incorrectly */
--
2.25.4
Powered by blists - more mailing lists