From patchwork Wed Mar 17 09:11:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 403062 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp293701jai; Wed, 17 Mar 2021 02:12:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYVwes3VYeM6DJTdaqnkHcQedFPRxtQGFSLqfVkBX8vLq70cwGpestOfn2w6jGF8MMeoSK X-Received: by 2002:a05:6402:11c9:: with SMTP id j9mr40777991edw.348.1615972342704; Wed, 17 Mar 2021 02:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615972342; cv=none; d=google.com; s=arc-20160816; b=uzqbIZQW2hiH0VxUfgRh5Wp+QD0p5XaFSgBppQblSaz+q6rMmGRpHv8g7jFssJ0O2l WFqRPMiSC4+4/WNs4eDYt0qVjKB6YaqynCtzDK9AjW0wNKwMIBGoVDGGkO4JO/iUUREY tbm1+xBBH+z9apnyP24r6QW88Df43REn1c7E/iDG/ZKp28n2tmvJ6TugPi9bP/odLfUp 8qRLuMu0C5ISRiufA5qd8VpUXaZyFENif9S3kcendgqUZmwBlU+zs3J5g+db1RKrUHFk xyxCWliC6UQO9Pw/Ea2kX0rUU2h/5QKJi1xfSS5IzeN3M42zeZvDFgQ8LgUjIamNbrCu dnSQ== 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=Yq9LdtQSeW2MqRbyRwlDutR9JIDqTpE5NVbsv5LbNbg=; b=1FPicigBQvE8Hyk0nM2bk77i3mVtx+ihH/WlAi5IA7BETdTIoeUZEoGgwuiGxHLntZ BxvZVHayd9b5xO8207FUnp5xD6NGHcWcGROdOWScxRGU6TwyBgGEQh/O/JX2gHh2nQlo UAFNH/030VqY8AvnsIJXVyWBadxtH99y+0dLNXt4bbap69myrdazHzLx+EejcbfC9ZaG eNdlna5UMymCqbw15k9OaesLV/jPeULT8M//9GZy7CQKPpRXgWqB67wgXCwePgaEeR2P YZEmfOJuUBWNyAteXCK7xZNfT1GFK/Os2DD8jMfOB29AlNnIXC/C4fMqNOiZZFiQhOya MuOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="tpXmr/3C"; 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 lo11si16575875ejb.60.2021.03.17.02.12.22 for ; Wed, 17 Mar 2021 02:12:22 -0700 (PDT) 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="tpXmr/3C"; 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 S229878AbhCQJLx (ORCPT ); Wed, 17 Mar 2021 05:11:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbhCQJLc (ORCPT ); Wed, 17 Mar 2021 05:11:32 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61A00C061760 for ; Wed, 17 Mar 2021 02:11:32 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id e9so991890wrw.10 for ; Wed, 17 Mar 2021 02:11:32 -0700 (PDT) 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=Yq9LdtQSeW2MqRbyRwlDutR9JIDqTpE5NVbsv5LbNbg=; b=tpXmr/3C3OcqQCVeq61T0tdQB5GGsCi1oEXXqsBAHnj1+8fWfYQ3PnETf0ZT0/Wwc3 FYgaiWmZdQW7HwXia9kpjpa3xGpM4zOxqAH5iraA9ZzjIfnS+mBosrDEfQTlonv83DoM jcFR93qm3o4tD7sWSCWizMLul9CH0tkp3hSUO822Q+Rn2YsAsWF7pdHyOz/RIutRMkSu hbam9GlxyOV34SBHXze1iGCQcyn1z2eAEtPANih19rc7lKHWmCpy9IqSjpZB0/btrrCL RfdydvVYMCG2CCl4clrCbv7c6haoLrVpQsFrTU7bpptlqKCz2SBvOF/m11j86/Iysviu wf1g== 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=Yq9LdtQSeW2MqRbyRwlDutR9JIDqTpE5NVbsv5LbNbg=; b=RCKpBEZW9J9BNT9GO5pmPXTyq1+JTl2ZuREO7rPmZFMHmUo4gdDWaPTX6bItZSGcir O/Lc7QU0X754c4/N6HpWn8Pv3fIzpz40LN4+vhLzuJSZbPKSSrR0A7cXdvcAtC7r9cfr yh6psZX9GFRWl7q7p/liMXia8HpsUqCJXIQnFb1QzLcbY3tHWnJt+VC3SkSHF6b7T4g3 +feQ0PevvNaY7HisMRG/dnCf0dUUItZrWBKgj0S2wdDFXC/r0YEXWueGrpUQ7sARIxxp GuuWo5CiMIeItcYFQHSf/33kPFfv1+7g6LOq/45i9cSa+/2a56oCRCRfh7M2Gqsp4jPz z9eg== X-Gm-Message-State: AOAM530sB94r/N4VLcrq8A/JeZ4z0Ev3aQ+5S7hh8N2VvblI+CF/WydT 0jBKHwZ84vQYzoaTY8XBH7zAoQ== X-Received: by 2002:a5d:5250:: with SMTP id k16mr3311603wrc.309.1615972291167; Wed, 17 Mar 2021 02:11:31 -0700 (PDT) Received: from dell.default ([91.110.221.194]) by smtp.gmail.com with ESMTPSA id s83sm1709279wms.16.2021.03.17.02.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 02:11:30 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, GOTO Masanori , YOKOTA Hiroshi , "James E.J. Bottomley" , "Martin K. Petersen" , gotom@debian.org, linux-scsi@vger.kernel.org Subject: [PATCH 3/8] scsi: nsp32: Remove or exclude unused variables Date: Wed, 17 Mar 2021 09:11:20 +0000 Message-Id: <20210317091125.2910058-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210317091125.2910058-1-lee.jones@linaro.org> References: <20210317091125.2910058-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/nsp32.c: In function ‘nsp32_selection_autoscsi’: drivers/scsi/nsp32.c:584:17: warning: variable ‘execph’ set but not used [-Wunused-but-set-variable] drivers/scsi/nsp32.c: In function ‘nsp32_msgout_occur’: drivers/scsi/nsp32.c:1785:7: warning: variable ‘new_sgtp’ set but not used [-Wunused-but-set-variable] drivers/scsi/nsp32.c: In function ‘nsp32_analyze_sdtr’: drivers/scsi/nsp32.c:2227:20: warning: variable ‘syncnum’ set but not used [-Wunused-but-set-variable] drivers/scsi/nsp32.c:2223:20: warning: variable ‘synct’ set but not used [-Wunused-but-set-variable] drivers/scsi/nsp32.c: In function ‘nsp32_do_bus_reset’: drivers/scsi/nsp32.c:2841:17: warning: variable ‘intrdat’ set but not used [-Wunused-but-set-variable] drivers/scsi/nsp32.c: In function ‘nsp32_getprom_param’: drivers/scsi/nsp32.c:2912:11: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] Cc: GOTO Masanori Cc: YOKOTA Hiroshi Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: gotom@debian.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones --- drivers/scsi/nsp32.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) -- 2.27.0 diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c index d5aa96f05bce4..54abda4d07c64 100644 --- a/drivers/scsi/nsp32.c +++ b/drivers/scsi/nsp32.c @@ -581,7 +581,6 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd *SCpnt) int status; unsigned short command = 0; unsigned int msgout = 0; - unsigned short execph; int i; nsp32_dbg(NSP32_DEBUG_AUTOSCSI, "in"); @@ -605,7 +604,7 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd *SCpnt) /* * clear execph */ - execph = nsp32_read2(base, SCSI_EXECUTE_PHASE); + nsp32_read2(base, SCSI_EXECUTE_PHASE); /* * clear FIFO counter to set CDBs @@ -1781,8 +1780,6 @@ static void nsp32_msgout_occur(struct scsi_cmnd *SCpnt) { nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; unsigned int base = SCpnt->device->host->io_port; - //unsigned short command; - long new_sgtp; int i; nsp32_dbg(NSP32_DEBUG_MSGOUTOCCUR, @@ -1796,14 +1793,6 @@ static void nsp32_msgout_occur(struct scsi_cmnd *SCpnt) nsp32_build_nop(SCpnt); } - /* - * Set SGTP ADDR current entry for restarting AUTOSCSI, - * because SGTP is incremented next point. - * There is few statement in the specification... - */ - new_sgtp = data->cur_lunt->sglun_paddr + - (data->cur_lunt->cur_entry * sizeof(nsp32_sgtable)); - /* * send messages */ @@ -2220,17 +2209,12 @@ static void nsp32_analyze_sdtr(struct scsi_cmnd *SCpnt) { nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; nsp32_target *target = data->cur_target; - nsp32_sync_table *synct; unsigned char get_period = data->msginbuf[3]; unsigned char get_offset = data->msginbuf[4]; int entry; - int syncnum; nsp32_dbg(NSP32_DEBUG_MSGINOCCUR, "enter"); - synct = data->synct; - syncnum = data->syncnum; - /* * If this inititor sent the SDTR message, then target responds SDTR, * initiator SYNCREG, ACKWIDTH from SDTR parameter. @@ -2838,8 +2822,8 @@ static int nsp32_eh_abort(struct scsi_cmnd *SCpnt) static void nsp32_do_bus_reset(nsp32_hw_data *data) { unsigned int base = data->BaseAddress; - unsigned short intrdat; int i; + unsigned short __maybe_unused intrdat; nsp32_dbg(NSP32_DEBUG_BUSRESET, "in"); @@ -2909,7 +2893,8 @@ static int nsp32_getprom_param(nsp32_hw_data *data) { int vendor = data->pci_devid->vendor; int device = data->pci_devid->device; - int ret, val, i; + int ret, i; + int __maybe_unused val; /* * EEPROM checking.