linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] scsi: bfa: remove some set but not used variables
@ 2019-08-22 14:17 zhengbin
  2019-08-22 14:17 ` [PATCH 1/4] scsi: bfa: remove set but not used variable 'fchs' zhengbin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zhengbin @ 2019-08-22 14:17 UTC (permalink / raw)
  To: anil.gurumurthy, sudarsana.kalluru, jejb, martin.petersen, linux-scsi
  Cc: yi.zhang, zhengbin13

zhengbin (4):
  scsi: bfa: remove set but not used variable 'fchs'
  scsi: bfa: remove set but not used variable 'rp'
  scsi: bfa: remove set but not used variable 'adisc'
  scsi: bfa: remove set but not used variable 'pgoff'

 drivers/scsi/bfa/bfa_fcpim.c     |  3 ---
 drivers/scsi/bfa/bfa_fcs_rport.c |  3 ---
 drivers/scsi/bfa/bfa_ioc.c       | 16 +++++-----------
 drivers/scsi/bfa/bfa_svc.c       |  3 ---
 4 files changed, 5 insertions(+), 20 deletions(-)

--
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/4] scsi: bfa: remove set but not used variable 'fchs'
  2019-08-22 14:17 [PATCH 0/4] scsi: bfa: remove some set but not used variables zhengbin
@ 2019-08-22 14:17 ` zhengbin
  2019-08-22 14:17 ` [PATCH 2/4] scsi: bfa: remove set but not used variable 'rp' zhengbin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: zhengbin @ 2019-08-22 14:17 UTC (permalink / raw)
  To: anil.gurumurthy, sudarsana.kalluru, jejb, martin.petersen, linux-scsi
  Cc: yi.zhang, zhengbin13

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

drivers/scsi/bfa/bfa_svc.c: In function uf_recv:
drivers/scsi/bfa/bfa_svc.c:5528:17: warning: variable fchs set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/scsi/bfa/bfa_svc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_svc.c b/drivers/scsi/bfa/bfa_svc.c
index 6d21314..f345cbf 100644
--- a/drivers/scsi/bfa/bfa_svc.c
+++ b/drivers/scsi/bfa/bfa_svc.c
@@ -5517,7 +5517,6 @@ uf_recv(struct bfa_s *bfa, struct bfi_uf_frm_rcvd_s *m)
 	struct bfa_uf_s *uf = &ufm->uf_list[uf_tag];
 	struct bfa_uf_buf_s *uf_buf;
 	uint8_t *buf;
-	struct fchs_s *fchs;

 	uf_buf = (struct bfa_uf_buf_s *)
 			bfa_mem_get_dmabuf_kva(ufm, uf_tag, uf->pb_len);
@@ -5526,8 +5525,6 @@ uf_recv(struct bfa_s *bfa, struct bfi_uf_frm_rcvd_s *m)
 	m->frm_len = be16_to_cpu(m->frm_len);
 	m->xfr_len = be16_to_cpu(m->xfr_len);

-	fchs = (struct fchs_s *)uf_buf;
-
 	list_del(&uf->qe);	/* dequeue from posted queue */

 	uf->data_ptr = buf;
--
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] scsi: bfa: remove set but not used variable 'rp'
  2019-08-22 14:17 [PATCH 0/4] scsi: bfa: remove some set but not used variables zhengbin
  2019-08-22 14:17 ` [PATCH 1/4] scsi: bfa: remove set but not used variable 'fchs' zhengbin
@ 2019-08-22 14:17 ` zhengbin
  2019-08-22 14:17 ` [PATCH 3/4] scsi: bfa: remove set but not used variable 'adisc' zhengbin
  2019-08-22 14:17 ` [PATCH 4/4] scsi: bfa: remove set but not used variable 'pgoff' zhengbin
  3 siblings, 0 replies; 5+ messages in thread
From: zhengbin @ 2019-08-22 14:17 UTC (permalink / raw)
  To: anil.gurumurthy, sudarsana.kalluru, jejb, martin.petersen, linux-scsi
  Cc: yi.zhang, zhengbin13

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

drivers/scsi/bfa/bfa_fcpim.c: In function bfa_fcpim_lunmask_delete:
drivers/scsi/bfa/bfa_fcpim.c:2346:22: warning: variable rp set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/scsi/bfa/bfa_fcpim.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c
index 284baa3..63e936d 100644
--- a/drivers/scsi/bfa/bfa_fcpim.c
+++ b/drivers/scsi/bfa/bfa_fcpim.c
@@ -2335,7 +2335,6 @@ bfa_fcpim_lunmask_delete(struct bfa_s *bfa, u16 vf_id, wwn_t *pwwn,
 			 wwn_t rpwwn, struct scsi_lun lun)
 {
 	struct bfa_lun_mask_s	*lunm_list;
-	struct bfa_rport_s	*rp = NULL;
 	struct bfa_fcs_lport_s *port = NULL;
 	struct bfa_fcs_rport_s *rp_fcs;
 	int	i;
@@ -2356,8 +2355,6 @@ bfa_fcpim_lunmask_delete(struct bfa_s *bfa, u16 vf_id, wwn_t *pwwn,
 		if (port) {
 			*pwwn = port->port_cfg.pwwn;
 			rp_fcs = bfa_fcs_lport_get_rport_by_pwwn(port, rpwwn);
-			if (rp_fcs)
-				rp = rp_fcs->bfa_rport;
 		}
 	}

--
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] scsi: bfa: remove set but not used variable 'adisc'
  2019-08-22 14:17 [PATCH 0/4] scsi: bfa: remove some set but not used variables zhengbin
  2019-08-22 14:17 ` [PATCH 1/4] scsi: bfa: remove set but not used variable 'fchs' zhengbin
  2019-08-22 14:17 ` [PATCH 2/4] scsi: bfa: remove set but not used variable 'rp' zhengbin
@ 2019-08-22 14:17 ` zhengbin
  2019-08-22 14:17 ` [PATCH 4/4] scsi: bfa: remove set but not used variable 'pgoff' zhengbin
  3 siblings, 0 replies; 5+ messages in thread
From: zhengbin @ 2019-08-22 14:17 UTC (permalink / raw)
  To: anil.gurumurthy, sudarsana.kalluru, jejb, martin.petersen, linux-scsi
  Cc: yi.zhang, zhengbin13

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

drivers/scsi/bfa/bfa_fcs_rport.c: In function bfa_fcs_rport_process_adisc:
drivers/scsi/bfa/bfa_fcs_rport.c:2251:21: warning: variable adisc set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/scsi/bfa/bfa_fcs_rport.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_fcs_rport.c b/drivers/scsi/bfa/bfa_fcs_rport.c
index 82801b3..271f052 100644
--- a/drivers/scsi/bfa/bfa_fcs_rport.c
+++ b/drivers/scsi/bfa/bfa_fcs_rport.c
@@ -2240,15 +2240,12 @@ bfa_fcs_rport_process_adisc(struct bfa_fcs_rport_s *rport,
 	struct bfa_fcxp_s *fcxp;
 	struct fchs_s	fchs;
 	struct bfa_fcs_lport_s *port = rport->port;
-	struct fc_adisc_s	*adisc;

 	bfa_trc(port->fcs, rx_fchs->s_id);
 	bfa_trc(port->fcs, rx_fchs->d_id);

 	rport->stats.adisc_rcvd++;

-	adisc = (struct fc_adisc_s *) (rx_fchs + 1);
-
 	/*
 	 * Accept if the itnim for this rport is online.
 	 * Else reject the ADISC.
--
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] scsi: bfa: remove set but not used variable 'pgoff'
  2019-08-22 14:17 [PATCH 0/4] scsi: bfa: remove some set but not used variables zhengbin
                   ` (2 preceding siblings ...)
  2019-08-22 14:17 ` [PATCH 3/4] scsi: bfa: remove set but not used variable 'adisc' zhengbin
@ 2019-08-22 14:17 ` zhengbin
  3 siblings, 0 replies; 5+ messages in thread
From: zhengbin @ 2019-08-22 14:17 UTC (permalink / raw)
  To: anil.gurumurthy, sudarsana.kalluru, jejb, martin.petersen, linux-scsi
  Cc: yi.zhang, zhengbin13

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

drivers/scsi/bfa/bfa_ioc.c: In function bfa_iocpf_sm_fwcheck_entry:
drivers/scsi/bfa/bfa_ioc.c:712:27: warning: variable pgoff set but not used [-Wunused-but-set-variable]
drivers/scsi/bfa/bfa_ioc.c: In function bfa_ioc_fwver_get:
drivers/scsi/bfa/bfa_ioc.c:1451:13: warning: variable pgoff set but not used [-Wunused-but-set-variable]
drivers/scsi/bfa/bfa_ioc.c: In function bfa_ioc_fwsig_invalidate:
drivers/scsi/bfa/bfa_ioc.c:1673:13: warning: variable pgoff set but not used [-Wunused-but-set-variable]
drivers/scsi/bfa/bfa_ioc.c: In function bfa_ioc_download_fw:
drivers/scsi/bfa/bfa_ioc.c:1874:13: warning: variable pgoff set but not used [-Wunused-but-set-variable]
drivers/scsi/bfa/bfa_ioc.c: In function bfa_diag_memtest_done:
drivers/scsi/bfa/bfa_ioc.c:4774:13: warning: variable pgoff set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/scsi/bfa/bfa_ioc.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c
index 93471d7..52d1624 100644
--- a/drivers/scsi/bfa/bfa_ioc.c
+++ b/drivers/scsi/bfa/bfa_ioc.c
@@ -701,7 +701,7 @@ static void
 bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf)
 {
 	struct bfi_ioc_image_hdr_s	fwhdr;
-	u32	r32, fwstate, pgnum, pgoff, loff = 0;
+	u32	r32, fwstate, pgnum, loff = 0;
 	int	i;

 	/*
@@ -731,7 +731,6 @@ bfa_iocpf_sm_fwcheck_entry(struct bfa_iocpf_s *iocpf)
 	 * Clear fwver hdr
 	 */
 	pgnum = PSS_SMEM_PGNUM(iocpf->ioc->ioc_regs.smem_pg0, loff);
-	pgoff = PSS_SMEM_PGOFF(loff);
 	writel(pgnum, iocpf->ioc->ioc_regs.host_page_num_fn);

 	for (i = 0; i < sizeof(struct bfi_ioc_image_hdr_s) / sizeof(u32); i++) {
@@ -1440,13 +1439,12 @@ bfa_ioc_lpu_stop(struct bfa_ioc_s *ioc)
 void
 bfa_ioc_fwver_get(struct bfa_ioc_s *ioc, struct bfi_ioc_image_hdr_s *fwhdr)
 {
-	u32	pgnum, pgoff;
+	u32	pgnum;
 	u32	loff = 0;
 	int		i;
 	u32	*fwsig = (u32 *) fwhdr;

 	pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff);
-	pgoff = PSS_SMEM_PGOFF(loff);
 	writel(pgnum, ioc->ioc_regs.host_page_num_fn);

 	for (i = 0; i < (sizeof(struct bfi_ioc_image_hdr_s) / sizeof(u32));
@@ -1661,8 +1659,7 @@ bfa_ioc_flash_fwver_cmp(struct bfa_ioc_s *ioc,
 bfa_status_t
 bfa_ioc_fwsig_invalidate(struct bfa_ioc_s *ioc)
 {
-
-	u32	pgnum, pgoff;
+	u32	pgnum;
 	u32	loff = 0;
 	enum bfi_ioc_state ioc_fwstate;

@@ -1671,7 +1668,6 @@ bfa_ioc_fwsig_invalidate(struct bfa_ioc_s *ioc)
 		return BFA_STATUS_ADAPTER_ENABLED;

 	pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff);
-	pgoff = PSS_SMEM_PGOFF(loff);
 	writel(pgnum, ioc->ioc_regs.host_page_num_fn);
 	bfa_mem_write(ioc->ioc_regs.smem_page_start, loff, BFA_IOC_FW_INV_SIGN);

@@ -1863,7 +1859,7 @@ bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type,
 		    u32 boot_env)
 {
 	u32 *fwimg;
-	u32 pgnum, pgoff;
+	u32 pgnum;
 	u32 loff = 0;
 	u32 chunkno = 0;
 	u32 i;
@@ -1892,7 +1888,6 @@ bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type,


 	pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff);
-	pgoff = PSS_SMEM_PGOFF(loff);

 	writel(pgnum, ioc->ioc_regs.host_page_num_fn);

@@ -4763,10 +4758,9 @@ bfa_diag_memtest_done(void *cbarg)
 	struct bfa_ioc_s  *ioc = diag->ioc;
 	struct bfa_diag_memtest_result *res = diag->result;
 	u32	loff = BFI_BOOT_MEMTEST_RES_ADDR;
-	u32	pgnum, pgoff, i;
+	u32	pgnum, i;

 	pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff);
-	pgoff = PSS_SMEM_PGOFF(loff);

 	writel(pgnum, ioc->ioc_regs.host_page_num_fn);

--
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-22 14:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-22 14:17 [PATCH 0/4] scsi: bfa: remove some set but not used variables zhengbin
2019-08-22 14:17 ` [PATCH 1/4] scsi: bfa: remove set but not used variable 'fchs' zhengbin
2019-08-22 14:17 ` [PATCH 2/4] scsi: bfa: remove set but not used variable 'rp' zhengbin
2019-08-22 14:17 ` [PATCH 3/4] scsi: bfa: remove set but not used variable 'adisc' zhengbin
2019-08-22 14:17 ` [PATCH 4/4] scsi: bfa: remove set but not used variable 'pgoff' zhengbin

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).