From patchwork Mon Nov 2 14:23:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 320300 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp3770107ilc; Mon, 2 Nov 2020 06:24:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5RGgXyVOyIZIcZ6abyYYolobJs3yiOT1S88YLy1SSNeowBVNIrCC3mO9lPzBPbZ9d+j/W X-Received: by 2002:a05:6402:742:: with SMTP id p2mr17076754edy.107.1604327082347; Mon, 02 Nov 2020 06:24:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604327082; cv=none; d=google.com; s=arc-20160816; b=el5M928S9wdQOgBRelrhCVAb8MLSFes7QS8oGPACaUv3mtV8hvvdhZLay1LJjehXVo 0Ncd93AEmQxjS6bTvzCBih4gUaJrzTqYPMBzzBxlSIxY0yh6ES3oSuQRTfym3mYEuZDZ yVAJKlVBRaXydT/FYJUeUowJt2xZrLe+/lG/Cze1LKUSTRq5OYf0wvRNeGkDIUD2UD9e LuxHHko21QEEE4nf5GHCrlTfWjmvx8txTwawE4vEH1whdnT4KeB0JF3O3eUl1IxBj1Dq j2s0Xhfd7LVTWmjXHJFEt5TXASbJlFxYHUbiiBjG7CqDW/PGYXxgr3cmByuXbS/L7DLz WeWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DRufDNzm9kpYb+RMx6EOR5JDO8dhM8oippZOTHhZhUw=; b=Ajdui9/vpxMiOkEAyR1OHBRftRhKZupQialUf7aYjXTnOrXmrnbD009RACOs1s7vZ5 RdLkIHQoi9yOxXt+EUyXdG0idRCvHolKEwny/00kjCsPVzd2MFILwyuLvrJ0l2nMkLip Zra/meV64+wHoI2SMwBh6rX5i/DvfYV/iWPA82cPUWJO/otV8Yu5MUVWoVxDDf6Py2uZ Kz2pvl3RngvbYJoQCaKYafxrCTyOI2iyYmFDupUrfSyiUXLL72eMA8hE1RHeR81l05/o S6NPnzmqzoNo4rmstaCmb/tmthekVNzLAJzEGTXYgOYoLlLB5AuK5eMgk7Xdmk/xBG/b 2SkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bOlVl7aq; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn7si4642298ejc.99.2020.11.02.06.24.42 for ; Mon, 02 Nov 2020 06:24:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bOlVl7aq; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726377AbgKBOYl (ORCPT ); Mon, 2 Nov 2020 09:24:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbgKBOY1 (ORCPT ); Mon, 2 Nov 2020 09:24:27 -0500 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB345C0617A6 for ; Mon, 2 Nov 2020 06:24:26 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id g12so14801602wrp.10 for ; Mon, 02 Nov 2020 06:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DRufDNzm9kpYb+RMx6EOR5JDO8dhM8oippZOTHhZhUw=; b=bOlVl7aqbhqa2uIFx/thpl7k5ga9JikzHLncZ7w45NvZKsvPhvYm3EGaddLi6x1zWw lLXtkcsb222aCe2jDePmwDN0hM6tQ38rZY8R9idyWM4z5awdnpjPu164hyUMp06yVnpg nG7lDMuDos7/QzOLUUF34PVnlkbonu5HPiPPrY+VrSU5BTozEwLxWKBV4L/TPzy161XZ T0dt1s/ZeAMkZXMkpve16q81k1DL3fensL5lel212l898g860SpfUlgXOK5Zyqp5bE06 kn7vN9zXp5cdO706ZCppB2IKIOtwqPFEW3IgAkH/LtEIV/oWMY7ydYcFVjZHvWQXezc8 LofQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DRufDNzm9kpYb+RMx6EOR5JDO8dhM8oippZOTHhZhUw=; b=YnWJxIJpQbOS9JL8e2Mp9eIR51nWCwGuDeBjMxEqvG7uQqpClncGm5uwUCRE97+2zm HoW0HR2cCxyxnQwhliUbBjfFKa28tbL1H+d1U6/UAGLunRZaOtiusZajg+OgFRaDDTvX hjmHzPCWGi3ZLNGyUlyPHSp3nvFfOOtE5FwCV3vZPIyN1MY0Ke2R6/EHIKkhgb8sCU0J CzQkAgxMVSjMM1T8z3tZo9TrGqb5UWBl0Q2zFNIodw0N+SJz0nJHeOYXzlnjaCNvRMVh wE5P7jwk+yjtJasm9pqvgFzCwJicdbSIX4/GXumkYjy7N8Ld/46/ZqKv9CTHF0s6LMbN cMpg== X-Gm-Message-State: AOAM530U81gUz024NgELinVBkgeZrKM+Gf76rQMqzkzkkCb5Tp0l+qVh ABLC8A1OWpQQ+g9X/md6ljeoAQ== X-Received: by 2002:adf:ce91:: with SMTP id r17mr21408494wrn.326.1604327065586; Mon, 02 Nov 2020 06:24:25 -0800 (PST) Received: from dell.default ([91.110.221.242]) by smtp.gmail.com with ESMTPSA id f7sm23542501wrx.64.2020.11.02.06.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 06:24:24 -0800 (PST) From: Lee Jones To: martin.petersen@oracle.com, jejb@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Lee Jones , Oliver Neukum , Ali Akcaagac , Jamie Lenehan , "C.L. Huang" , Erich Chen , Kurt Garloff , dc395x@twibble.org Subject: [RESEND 17/19] scsi: dc395x: Remove a few unused variables Date: Mon, 2 Nov 2020 14:23:57 +0000 Message-Id: <20201102142359.561122-18-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201102142359.561122-1-lee.jones@linaro.org> References: <20201102142359.561122-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.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 Cc: Ali Akcaagac Cc: Jamie Lenehan Cc: "C.L. Huang" Cc: Erich Chen Cc: Kurt Garloff Cc: dc395x@twibble.org Signed-off-by: Lee Jones --- drivers/scsi/dc395x.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) -- 2.25.1 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);