linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: jejb@linux.ibm.com, martin.petersen@oracle.com
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Lee Jones <lee.jones@linaro.org>, Hannes Reinecke <hare@suse.com>
Subject: [PATCH 02/40] scsi: aic7xxx: aic79xx_core: Remove a bunch of unused variables
Date: Tue, 21 Jul 2020 17:41:10 +0100	[thread overview]
Message-ID: <20200721164148.2617584-3-lee.jones@linaro.org> (raw)
In-Reply-To: <20200721164148.2617584-1-lee.jones@linaro.org>

Question: Can 'ahd_inb(ahd, LQISTAT2);' also be safely removed?

Fixes the following W=1 kernel build warning(s):

 drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_dump_sglist’:
 drivers/scsi/aic7xxx/aic79xx_core.c:1738:14: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
 1738 | uint32_t len;
 | ^~~
 drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_handle_seqint’:
 drivers/scsi/aic7xxx/aic79xx_core.c:1911:26: warning: variable ‘tinfo’ set but not used [-Wunused-but-set-variable]
 1911 | struct ahd_transinfo *tinfo;
 | ^~~~~
 drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_handle_transmission_error’:
 drivers/scsi/aic7xxx/aic79xx_core.c:2672:8: warning: variable ‘lqistat2’ set but not used [-Wunused-but-set-variable]
 2672 | u_int lqistat2;
 | ^~~~~~~~
 drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_update_pending_scbs’:
 drivers/scsi/aic7xxx/aic79xx_core.c:4221:31: warning: variable ‘tinfo’ set but not used [-Wunused-but-set-variable]
 4221 | struct ahd_initiator_tinfo *tinfo;
 | ^~~~~

Cc: Hannes Reinecke <hare@suse.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/aic7xxx/aic79xx_core.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
index e4a09b93d00ce..243e763085a61 100644
--- a/drivers/scsi/aic7xxx/aic79xx_core.c
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c
@@ -1735,10 +1735,8 @@ ahd_dump_sglist(struct scb *scb)
 			sg_list = (struct ahd_dma64_seg*)scb->sg_list;
 			for (i = 0; i < scb->sg_count; i++) {
 				uint64_t addr;
-				uint32_t len;
 
 				addr = ahd_le64toh(sg_list[i].addr);
-				len = ahd_le32toh(sg_list[i].len);
 				printk("sg[%d] - Addr 0x%x%x : Length %d%s\n",
 				       i,
 				       (uint32_t)((addr >> 32) & 0xFFFFFFFF),
@@ -1908,7 +1906,6 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
 			struct	scb *scb;
 			struct	ahd_initiator_tinfo *targ_info;
 			struct	ahd_tmode_tstate *tstate;
-			struct	ahd_transinfo *tinfo;
 			u_int	scbid;
 
 			/*
@@ -1941,7 +1938,6 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
 							devinfo.our_scsiid,
 							devinfo.target,
 							&tstate);
-			tinfo = &targ_info->curr;
 			ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT,
 				      AHD_TRANS_ACTIVE, /*paused*/TRUE);
 			ahd_set_syncrate(ahd, &devinfo, /*period*/0,
@@ -2669,7 +2665,6 @@ ahd_handle_transmission_error(struct ahd_softc *ahd)
 	struct	scb *scb;
 	u_int	scbid;
 	u_int	lqistat1;
-	u_int	lqistat2;
 	u_int	msg_out;
 	u_int	curphase;
 	u_int	lastphase;
@@ -2680,7 +2675,7 @@ ahd_handle_transmission_error(struct ahd_softc *ahd)
 	scb = NULL;
 	ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
 	lqistat1 = ahd_inb(ahd, LQISTAT1) & ~(LQIPHASE_LQ|LQIPHASE_NLQ);
-	lqistat2 = ahd_inb(ahd, LQISTAT2);
+	ahd_inb(ahd, LQISTAT2);
 	if ((lqistat1 & (LQICRCI_NLQ|LQICRCI_LQ)) == 0
 	 && (ahd->bugs & AHD_NLQICRC_DELAYED_BUG) != 0) {
 		u_int lqistate;
@@ -4218,13 +4213,11 @@ ahd_update_pending_scbs(struct ahd_softc *ahd)
 	pending_scb_count = 0;
 	LIST_FOREACH(pending_scb, &ahd->pending_scbs, pending_links) {
 		struct ahd_devinfo devinfo;
-		struct ahd_initiator_tinfo *tinfo;
 		struct ahd_tmode_tstate *tstate;
 
 		ahd_scb_devinfo(ahd, &devinfo, pending_scb);
-		tinfo = ahd_fetch_transinfo(ahd, devinfo.channel,
-					    devinfo.our_scsiid,
-					    devinfo.target, &tstate);
+		ahd_fetch_transinfo(ahd, devinfo.channel, devinfo.our_scsiid,
+				    devinfo.target, &tstate);
 		if ((tstate->auto_negotiate & devinfo.target_mask) == 0
 		 && (pending_scb->flags & SCB_AUTO_NEGOTIATE) != 0) {
 			pending_scb->flags &= ~SCB_AUTO_NEGOTIATE;
-- 
2.25.1


  parent reply	other threads:[~2020-07-21 16:44 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 16:41 [PATCH 00/40] Set 4: Next set of SCSI related W=1 warnings Lee Jones
2020-07-21 16:41 ` [PATCH 01/40] scsi: arcmsr: arcmsr_hba: Remove statement with no effect Lee Jones
2020-07-21 16:41 ` Lee Jones [this message]
2020-07-21 16:41 ` [PATCH 03/40] scsi: aacraid: sa: Add descriptions for missing parameters Lee Jones
2020-07-21 16:41 ` [PATCH 04/40] scsi: aacraid: rkt: Add missing description for 'dev' Lee Jones
2020-07-21 16:41 ` [PATCH 05/40] scsi: aacraid: nark: " Lee Jones
2020-07-21 16:41 ` [PATCH 06/40] scsi: aic94xx: aic94xx_dev: Fix a couple of kerneldoc formatting issues Lee Jones
2020-07-21 16:41 ` [PATCH 07/40] scsi: aacraid: src: Add descriptions for missing parameters Lee Jones
2020-07-21 16:41 ` [PATCH 08/40] scsi: aic94xx: aic94xx_tmf: Fix kerneldoc formatting issue with 'task' Lee Jones
2020-07-21 16:41 ` [PATCH 09/40] scsi: pm8001: pm8001_sas: Fix strncpy() warning Lee Jones
2020-07-21 16:41 ` [PATCH 10/40] scsi: pm8001: pm8001_sas: Mover function header and supply some missing parameter descriptions Lee Jones
2020-07-21 16:41 ` [PATCH 11/40] scsi: pm8001: pm8001_ctl: Add descriptions for unused 'attr' function parameters Lee Jones
2020-07-21 16:41 ` [PATCH 12/40] scsi: qla4xxx: ql4_init: Remove set but unused variable 'func_number' Lee Jones
2020-07-21 16:41 ` [PATCH 13/40] scsi: qla4xxx: ql4_init: Check return value of pci_set_mwi() Lee Jones
2020-07-21 16:41 ` [PATCH 14/40] scsi: qla4xxx: ql4_83xx: Move 'qla4_83xx_reg_tbl' from shared header Lee Jones
2020-07-21 16:41 ` [PATCH 15/40] scsi: aic7xxx: aic79xx_core: Remove set but unused variables 'targ_info' and 'value' Lee Jones
2020-07-21 16:41 ` [PATCH 16/40] scsi: pm8001: pm8001_hwi: Fix a bunch of kerneldoc issues Lee Jones
2020-07-21 16:41 ` [PATCH 17/40] scsi: pm8001: pm80xx_hwi: Fix some function documentation issues Lee Jones
2020-07-21 16:41 ` [PATCH 18/40] scsi: pm8001: pm8001_hwi: Remove a bunch of set but unused variables Lee Jones
2020-07-21 16:41 ` [PATCH 19/40] scsi: qla4xxx: ql4_nx: Move 'qla4_82xx_reg_tbl' to the only place its used Lee Jones
2020-07-21 16:41 ` [PATCH 20/40] scsi: lpfc: lpfc_sli: Remove unused variable 'pg_addr' Lee Jones
2020-07-21 16:41 ` [PATCH 21/40] scsi: qla4xxx: ql4_mbx: Fix-up incorrectly documented parameter Lee Jones
2020-07-21 16:41 ` [PATCH 22/40] scsi: qla4xxx: ql4_iocb: Fix incorrectly named function parameter Lee Jones
2020-07-21 16:41 ` [PATCH 23/40] scsi: lpfc: lpfc_sli: Fix-up around 120 documentation issues Lee Jones
2020-07-21 16:41 ` [PATCH 24/40] scsi: pm8001: pm8001_hwi: Remove unused variable 'value' Lee Jones
2020-07-21 16:41 ` [PATCH 25/40] scsi: pm8001: pm80xx_hwi: Staticify 'pm80xx_pci_mem_copy' and 'mpi_set_phy_profile_req' Lee Jones
2020-07-21 16:41 ` [PATCH 26/40] scsi: qla4xxx: ql4_os: Fix some kerneldoc parameter documentation issues Lee Jones
2020-07-21 16:41 ` [PATCH 27/40] scsi: qla4xxx: ql4_isr: Repair function documentation headers Lee Jones
2020-07-21 16:41 ` [PATCH 28/40] scsi: lpfc: lpfc_mem: Provide description for lpfc_mem_alloc()'s 'align' param Lee Jones
2020-07-21 16:41 ` [PATCH 29/40] scsi: qla4xxx: ql4_init: Document qla4xxx_process_ddb()'s 'conn_err' Lee Jones
2020-07-21 16:41 ` [PATCH 30/40] scsi: lpfc: lpfc_ct: Fix-up formatting/docrot where appropriate Lee Jones
2020-07-21 16:41 ` [PATCH 31/40] scsi: csiostor: csio_init: Fix misnamed function parameter Lee Jones
2020-07-21 16:41 ` [PATCH 32/40] scsi: qla4xxx: ql4_nx: Remove three set but unused variables Lee Jones
2020-07-21 16:41 ` [PATCH 33/40] scsi: qla4xxx: ql4_nx: Supply description for 'code' Lee Jones
2020-07-21 16:41 ` [PATCH 34/40] scsi: csiostor: csio_lnode: Demote kerneldoc that fails to meet the criteria Lee Jones
2020-07-21 16:41 ` [PATCH 35/40] scsi: bfa: bfad_bsg: Staticify all local functions Lee Jones
2020-07-21 16:41 ` [PATCH 36/40] scsi: lpfc: lpfc_sli: Ensure variable has the same stipulations as code using it Lee Jones
2020-07-21 16:41 ` [PATCH 37/40] scsi: sym53c8xx_2: sym_glue: Add missing description for 'pdev' Lee Jones
2020-07-21 16:41 ` [PATCH 38/40] scsi: sym53c8xx_2: sym_hipd: Ensure variable has the same stipulations as code using it Lee Jones
2020-07-21 16:41 ` [PATCH 39/40] scsi: mvsas: mv_init: Move 'core_nr' inside #ifdef and remove unused variable 'res_flag' Lee Jones
2020-07-21 16:41 ` [PATCH 40/40] scsi: cxgbi: cxgb3i: cxgb3i: Remove bad documentation and demote kerneldoc header Lee Jones
2020-07-25  2:56 ` [PATCH 00/40] Set 4: Next set of SCSI related W=1 warnings Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200721164148.2617584-3-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=hare@suse.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).