linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: martin.petersen@oracle.com, jejb@linux.ibm.com
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Lee Jones <lee.jones@linaro.org>,
	Oliver Neukum <oliver@neukum.org>, Ali Akcaagac <aliakc@web.de>,
	Jamie Lenehan <lenehan@twibble.org>,
	"C.L. Huang" <ching@tekram.com.tw>,
	Erich Chen <erich@tekram.com.tw>, Kurt Garloff <garloff@suse.de>,
	dc395x@twibble.org
Subject: [RESEND 17/19] scsi: dc395x: Remove a few unused variables
Date: Mon,  2 Nov 2020 14:23:57 +0000	[thread overview]
Message-ID: <20201102142359.561122-18-lee.jones@linaro.org> (raw)
In-Reply-To: <20201102142359.561122-1-lee.jones@linaro.org>

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

 drivers/scsi/dc395x.c: In function ‘data_io_transfer’:
 drivers/scsi/dc395x.c:2400:16: warning: variable ‘data2’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/dc395x.c:2400:6: warning: variable ‘data’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/dc395x.c: In function ‘reselect’:
 drivers/scsi/dc395x.c:2992:5: warning: variable ‘arblostflag’ set but not used [-Wunused-but-set-variable]
 drivers/scsi/dc395x.c: In function ‘doing_srb_done’:
 drivers/scsi/dc395x.c:3393:28: warning: variable ‘dir’ set but not used [-Wunused-but-set-variable]

Cc: Oliver Neukum <oliver@neukum.org>
Cc: Ali Akcaagac <aliakc@web.de>
Cc: Jamie Lenehan <lenehan@twibble.org>
Cc: "C.L. Huang" <ching@tekram.com.tw>
Cc: Erich Chen <erich@tekram.com.tw>
Cc: Kurt Garloff <garloff@suse.de>
Cc: dc395x@twibble.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/scsi/dc395x.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index fa16894d8758c..f838fe8d74578 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -2397,7 +2397,6 @@ static void data_io_transfer(struct AdapterCtlBlk *acb,
 	}
 #endif				/* DC395x_LASTPIO */
 	else {		/* xfer pad */
-		u8 data = 0, data2 = 0;
 		if (srb->sg_count) {
 			srb->adapter_status = H_OVER_UNDER_RUN;
 			srb->status |= OVER_RUN;
@@ -2412,8 +2411,8 @@ static void data_io_transfer(struct AdapterCtlBlk *acb,
 			DC395x_write8(acb, TRM_S1040_SCSI_CONFIG2,
 				      CFG2_WIDEFIFO);
 			if (io_dir & DMACMD_DIR) {
-				data = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
-				data2 = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
+				DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
+				DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
 			} else {
 				/* Danger, Robinson: If you find KGs
 				 * scattered over the wide disk, the driver
@@ -2427,7 +2426,7 @@ static void data_io_transfer(struct AdapterCtlBlk *acb,
 			/* Danger, Robinson: If you find a collection of Ks on your disk
 			 * something broke :-( */
 			if (io_dir & DMACMD_DIR)
-				data = DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
+				DC395x_read8(acb, TRM_S1040_SCSI_FIFO);
 			else
 				DC395x_write8(acb, TRM_S1040_SCSI_FIFO, 'K');
 		}
@@ -2989,7 +2988,6 @@ static void reselect(struct AdapterCtlBlk *acb)
 	struct ScsiReqBlk *srb = NULL;
 	u16 rsel_tar_lun_id;
 	u8 id, lun;
-	u8 arblostflag = 0;
 	dprintkdbg(DBG_0, "reselect: acb=%p\n", acb);
 
 	clear_fifo(acb, "reselect");
@@ -3011,7 +3009,6 @@ static void reselect(struct AdapterCtlBlk *acb)
 				srb->cmd, dcb->target_id,
 				dcb->target_lun, rsel_tar_lun_id,
 				DC395x_read16(acb, TRM_S1040_SCSI_STATUS));
-			arblostflag = 1;
 			/*srb->state |= SRB_DISCONNECT; */
 
 			srb->state = SRB_READY;
@@ -3042,7 +3039,7 @@ static void reselect(struct AdapterCtlBlk *acb)
 			"disconnection? <%02i-%i>\n",
 			dcb->target_id, dcb->target_lun);
 
-	if (dcb->sync_mode & EN_TAG_QUEUEING /*&& !arblostflag */) {
+	if (dcb->sync_mode & EN_TAG_QUEUEING) {
 		srb = acb->tmp_srb;
 		dcb->active_srb = srb;
 	} else {
@@ -3390,11 +3387,9 @@ static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_flag,
 		struct scsi_cmnd *p;
 
 		list_for_each_entry_safe(srb, tmp, &dcb->srb_going_list, list) {
-			enum dma_data_direction dir;
 			int result;
 
 			p = srb->cmd;
-			dir = p->sc_data_direction;
 			result = MK_RES(0, did_flag, 0, 0);
 			printk("G:%p(%02i-%i) ", p,
 			       p->device->id, (u8)p->device->lun);
-- 
2.25.1


  parent reply	other threads:[~2020-11-02 14:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 14:23 [RESEND 00/19] Rid W=1 warnings in SCSI Lee Jones
2020-11-02 14:23 ` [RESEND 01/19] scsi: aic7xxx: aic79xx_osm: Remove unused variable 'saved_scsiid' Lee Jones
2020-11-02 14:23 ` [RESEND 02/19] scsi: mpt3sas: mpt3sas_scsih: Fix function documentation formatting Lee Jones
2020-11-02 14:23 ` [RESEND 03/19] scsi: lpfc: lpfc_scsi: Fix a whole host of kernel-doc issues Lee Jones
2020-11-02 14:23 ` [RESEND 04/19] scsi: lpfc: lpfc_attr: Demote kernel-doc format for redefined functions Lee Jones
2020-11-02 14:23 ` [RESEND 05/19] scsi: lpfc: lpfc_attr: Fix-up a bunch of kernel-doc misdemeanours Lee Jones
2020-11-02 14:23 ` [RESEND 06/19] scsi: lpfc: lpfc_debugfs: Fix a couple of function documentation issues Lee Jones
2020-11-02 14:23 ` [RESEND 07/19] scsi: lpfc: lpfc_bsg: Provide correct documentation for a bunch of functions Lee Jones
2020-11-02 14:23 ` [RESEND 08/19] scsi: esas2r: esas2r_disc: Place brackets around a potentially empty if() Lee Jones
2020-11-02 14:23 ` [RESEND 09/19] scsi: esas2r: esas2r_init: " Lee Jones
2020-11-02 14:23 ` [RESEND 10/19] scsi: lpfc: lpfc_nvme: Remove unused variable 'phba' Lee Jones
2020-11-02 14:23 ` [RESEND 11/19] scsi: ufs: ufshcd: Fix some function doc-rot Lee Jones
2020-11-02 14:23 ` [RESEND 12/19] scsi: lpfc: lpfc_nvme: Fix some kernel-doc related issues Lee Jones
2020-11-02 14:23 ` [RESEND 13/19] scsi: esas2r: esas2r_int: Add brackets around potentially empty if()s Lee Jones
2020-11-02 14:23 ` [RESEND 14/19] scsi: lpfc: lpfc_nvmet: Fix-up some formatting and doc-rot issues Lee Jones
2020-11-02 14:23 ` [RESEND 15/19] scsi: esas2r: esas2r_main: Demote non-conformant kernel-doc header Lee Jones
2020-11-02 14:23 ` [RESEND 16/19] scsi: advansys: Relocate or remove unused variables Lee Jones
2020-11-02 14:23 ` Lee Jones [this message]
2020-11-02 14:23 ` [RESEND 18/19] scsi: dc395x: Mark 's_stat2' as __maybe_unused Lee Jones
2020-11-02 14:23 ` [RESEND 19/19] scsi: hpsa: Strip out a bunch of set but unused variables Lee Jones
2020-11-12 10:19   ` [PATCH v2 " Lee Jones
2020-11-17  4:35     ` Martin K. Petersen
2020-11-11  3:30 ` [RESEND 00/19] Rid W=1 warnings in SCSI 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=20201102142359.561122-18-lee.jones@linaro.org \
    --to=lee.jones@linaro.org \
    --cc=aliakc@web.de \
    --cc=ching@tekram.com.tw \
    --cc=dc395x@twibble.org \
    --cc=erich@tekram.com.tw \
    --cc=garloff@suse.de \
    --cc=jejb@linux.ibm.com \
    --cc=lenehan@twibble.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=oliver@neukum.org \
    /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).