From patchwork Fri Mar 12 09:47:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 398534 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1050677jai; Fri, 12 Mar 2021 01:49:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdODdrOrDuHqNg2nMF1rdCgv6qlu6FFr08uMztbRpxL+Bi2a9cDmo6q+vy/ksc/yZ2WzY2 X-Received: by 2002:a05:6402:4242:: with SMTP id g2mr13088433edb.329.1615542570014; Fri, 12 Mar 2021 01:49:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615542570; cv=none; d=google.com; s=arc-20160816; b=tXXhwqkRrX9MWUJML9pBOVnLokX9d9Wgcm/BEDHhoj3gePI3V+LdkOjmnAUMaGbYGz vRahfmOqFfy69pj8+TSgXIxBuCc83rTU+kTPq5VOc3V/lEUua7G45KbB4G3ja4PafkoO vyLTfEL+tM+LhAxwaX6FWoIAp895JLNo94TvHkp5zwcpSppbjrvACr4HCICE7AWB6hIf 6N3d1RnE56bPvV6zvOwxLLvJfy0pLDNmkWfIY9d0ywDyO8muCU4vvn6fH4ICz6oyXZYr HcHOVFVJFcp0rLyu3IxKlx5f+AsPA23pzu8f+oftiwTyGpJGJcugPlupEe7gOS2gNzN9 QTUg== 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=953zZzIFTk8WBz/FuB+6aJVYCMmR1USbvaybVRbnoaU=; b=AddS5SQ2WN6CFRxg+UbIv34C9af5QvwqokuGui9uLNHZHSk5bC745IvKtZQHiTFJSu 4nL1wcm5/j3kLjq/Il/OYUCzxBXzTB1o9b5n9AOr/ukfPNArzkV7nDWMHHpxWNDWYiij RWPYzTXv11CczdyOvl0hZjJJor5tKfxQYpSPAILm+Qwea60K9NKDnjbDEkxvH3qOvP+d 2OZ0spuyUeEjsw0Ij6souXNG7KZNpFKQ93e/JfObyktrbsvRpKpm5VYX7sf4O0sfm6cR gb/2qN3K7ojpYh97Kxa32AutQnXIQqL+UjFMKOb/S+FJN6BblwzRaRmvnH/cLLOTNCys 6vWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TJ235tKz; 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 cf6si3710544ejb.272.2021.03.12.01.49.29 for ; Fri, 12 Mar 2021 01:49:30 -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=TJ235tKz; 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 S233142AbhCLJsu (ORCPT ); Fri, 12 Mar 2021 04:48:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233134AbhCLJsT (ORCPT ); Fri, 12 Mar 2021 04:48:19 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5601C061761 for ; Fri, 12 Mar 2021 01:48:18 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id d139-20020a1c1d910000b029010b895cb6f2so14779234wmd.5 for ; Fri, 12 Mar 2021 01:48:18 -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=953zZzIFTk8WBz/FuB+6aJVYCMmR1USbvaybVRbnoaU=; b=TJ235tKzTr+0UDs6L+L/8surRmTFXWS0yvtC2LBubxd2ZLncAEP5MMGOymfDsCzi/w lV4PTKQf/9gFXbxeGHmY4QWgP6OjyxuWGo9r2LPI6JIT8RavfmDo5gVb8YIWx4UuwDRz DOep/3VfSFr9pmxODIdLdSHO17wfQ7T5LW/X1omMmCkCc4vhcXJx2Hy9YGMqIELBs+GS 4CS0uxT2ITVmiRyTMgUIEHxWnkaL76PzlmMZoxRa0C4HAkqZDHrCx/BESIBMdmlKesTM vNUXNyK6M4voh7pm3voi3uI4JpuUBvvxg5f80hR0lwJwl++t1AcjU28HPB6J6d7Ts4+z q8DQ== 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=953zZzIFTk8WBz/FuB+6aJVYCMmR1USbvaybVRbnoaU=; b=CMH6spU3VboA7WjY76Ee6HuRQjjnoTpnB3Qg2FQvoHh/h9VfIgELfTabXD2eGl3+t8 m+cdNZ60t45kfKXck9p6yhNAh21hUKVK3/yAY3lHj3JJ3e28g84j1VwyG/Goi13xvGC9 lsa679nzo19KBwVMBePmP+rBsNIuwo3aRz/O1HIfJ2zl7sswdnGOvt18/5QwOm896uxK hyBgvKMqTIVkFqU84uRoOl7EUHk1gjahh+/tMeUC7fTQXcdZ/uqN1hg4ldTJuC2kh9QP fJZPJHhcwxTlPlybCtLWanPpB4UV4qJ9IPA2urPAnR6vpknz8aow8tbLwsqWfanzBy03 9zXg== X-Gm-Message-State: AOAM531NhBkLf5/o2G4cjknFAxYfYPqryxnTlvN8eA0iVH8TybT55Tq8 ggQKUY5Pi04Dn/Q0m8WhC1Hh7A== X-Received: by 2002:a1c:7905:: with SMTP id l5mr12329070wme.181.1615542497362; Fri, 12 Mar 2021 01:48:17 -0800 (PST) Received: from dell.default ([91.110.221.204]) by smtp.gmail.com with ESMTPSA id f7sm1539536wmq.11.2021.03.12.01.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 01:48:16 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Adam Radford , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org Subject: [PATCH 29/30] scsi: 3w-9xxx: Remove a few set but unused variables Date: Fri, 12 Mar 2021 09:47:37 +0000 Message-Id: <20210312094738.2207817-30-lee.jones@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210312094738.2207817-1-lee.jones@linaro.org> References: <20210312094738.2207817-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/3w-9xxx.c: In function ‘twa_empty_response_queue’: drivers/scsi/3w-9xxx.c:942:24: warning: variable ‘response_que_value’ set but not used [-Wunused-but-set-variable] drivers/scsi/3w-9xxx.c: In function ‘twa_scsi_biosparam’: drivers/scsi/3w-9xxx.c:1701:23: warning: variable ‘tw_dev’ set but not used [-Wunused-but-set-variable] drivers/scsi/3w-9xxx.c: In function ‘twa_scsiop_execute_scsi’: drivers/scsi/3w-9xxx.c:1812:22: warning: variable ‘sglist’ set but not used [-Wunused-but-set-variable] Cc: Adam Radford Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones --- drivers/scsi/3w-9xxx.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) -- 2.27.0 diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index b96e82de4237d..47028f5e57abd 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -939,13 +939,13 @@ static int twa_decode_bits(TW_Device_Extension *tw_dev, u32 status_reg_value) /* This function will empty the response queue */ static int twa_empty_response_queue(TW_Device_Extension *tw_dev) { - u32 status_reg_value, response_que_value; + u32 status_reg_value; int count = 0, retval = 1; status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev)); while (((status_reg_value & TW_STATUS_RESPONSE_QUEUE_EMPTY) == 0) && (count < TW_MAX_RESPONSE_DRAIN)) { - response_que_value = readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev)); + readl(TW_RESPONSE_QUEUE_REG_ADDR(tw_dev)); status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev)); count++; } @@ -1698,9 +1698,6 @@ static int twa_reset_sequence(TW_Device_Extension *tw_dev, int soft_reset) static int twa_scsi_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]) { int heads, sectors, cylinders; - TW_Device_Extension *tw_dev; - - tw_dev = (TW_Device_Extension *)sdev->host->hostdata; if (capacity >= 0x200000) { heads = 255; @@ -1809,14 +1806,11 @@ static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, u32 num_sectors = 0x0; int i, sg_count; struct scsi_cmnd *srb = NULL; - struct scatterlist *sglist = NULL, *sg; + struct scatterlist *sg; int retval = 1; - if (tw_dev->srb[request_id]) { + if (tw_dev->srb[request_id]) srb = tw_dev->srb[request_id]; - if (scsi_sglist(srb)) - sglist = scsi_sglist(srb); - } /* Initialize command packet */ full_command_packet = tw_dev->command_packet_virt[request_id];