From patchwork Tue Jul 21 16:41:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 246937 Delivered-To: patch@linaro.org Received: by 2002:a54:2c11:0:0:0:0:0 with SMTP id g17csp2713002ecp; Tue, 21 Jul 2020 09:44:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2cG0gDkdlWd8D5IHvOKJQWX6E1eW0i3BEwC1HuE3dUjaduE3KXHNyIwFQpNJF/kobtoF1 X-Received: by 2002:a50:d0dc:: with SMTP id g28mr25843658edf.169.1595349896386; Tue, 21 Jul 2020 09:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595349896; cv=none; d=google.com; s=arc-20160816; b=z/F4iKpOXlwueLNlQHBfAovMTUIySUIBcySlvVo7VIEOeTLBjnCUb4q9NMs9SIUrKb hWPkmZYX5iYiw0IJeveeJENHCKYdWiYd/S+eP+GLaxPzMX2VlxXDCcAf3tkIE384VRYQ /R2kB+RaxG4DTb0w5byd6AHEAwWosnscp374rYdEcGYsv2WbslR57xb+qftnNYuezmpG BmmAqYZcFsUsnm8vRlgOq8UsL8Eu8Ry6kfR4AR/Am0SFSw+MDEV6Iz4gK3dEkFohemLg 0N/2U4gsS+2iLhpUHQJoe9qxMYso4gmZdmRj8ScMTWJGHQ0rIJ6Csb5Zq64yX3xQ3fEy T1gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MFwQcwbTCB4l24rfJy2kTJtSqlwy97lYiWoNwLDhtXE=; b=Aa04igpNjhxfRbf002bOqqATubEvli/76JuJHp50u/e4vrVd6HAk1iKn0TAraA/V02 EqCP6R1nuCVyi7VLDy3ZPN6dAu4ypN9+ho2RF987uxxA9EfRzOegb2Z5ajoS0w3ld0Um m+Cy+C1kAX6ejvbWDMzX/f9WVGcSUyYokPmJppjEkthVp+dB6kN4z67+EP1FddyH6mAq Nxgnrpo0pT5ZkLncWz7bR/5LKPKivpbHBPi/Ih3rhAsH+/DPtCdE+ALm3gWK0KHjPZd8 fJHU1n+sfmHqk0C5GAJkeNm474mxnyUvBstj6EEzAWD0Wsx6f1vhYDhbvBT/fVdp5HRY WytQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bv94QDt4; 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 ni7si12494282ejb.725.2020.07.21.09.44.56 for ; Tue, 21 Jul 2020 09:44:56 -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=Bv94QDt4; 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 S1730418AbgGUQoz (ORCPT ); Tue, 21 Jul 2020 12:44:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730267AbgGUQl4 (ORCPT ); Tue, 21 Jul 2020 12:41:56 -0400 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 4B8EDC061794 for ; Tue, 21 Jul 2020 09:41:56 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id s10so21793490wrw.12 for ; Tue, 21 Jul 2020 09:41:56 -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=MFwQcwbTCB4l24rfJy2kTJtSqlwy97lYiWoNwLDhtXE=; b=Bv94QDt4unIJ9g6Le3faZvrFcIGk8efu0t9DqrS9Xe08GS0yPhgYLxpm3bthoS7g55 nQNup9hMbn2X2yPbAOWhgH8tQDdAyWHw1prXNyp7r9c8ppXY8cpTAHc7CraqSCTcZG1i 1WBRGKsTma+ozlyHK+r7tVJXIMgXQDd5/7aT4O9iV5mpG3WG27LUu0UgQpStGfpKOMQK +550kpZLqGZJTiGepFqNu1W7hEw9EhUmL3gAf3/gML+wuw8aGgI6R52np4j913upCqnT vICorkCyskx2FcuQNX7m5S8QYF2CtPvzLGAh6f4udf8kBVn8/OQWLtFynPs5vppYtOfO twuA== 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=MFwQcwbTCB4l24rfJy2kTJtSqlwy97lYiWoNwLDhtXE=; b=G1MIbDfxB/mZffpavPG/GYzllO3uSfFzKUES8EMTSIzNKon5yNApRu/xykfTIsgVhN uRcYh8EmRL9znRThzKuVGdiMUD4FNqmaLzvkRIabQR6XGwcg8JnW6W15TAZxf0dGGShu JfeNpxaE0Sqyb8TTajq3mOJwOI9izf1SqYV3EzsmQWC6+YKqUdOk6JBoQLj/H4uqL7PF lW+7fjjD3AQDDZYksiSLHBv8aKLt7lPAefCezFozOgwILxcuzemrN1KDvjZXzk1KHpMB KblmJbQomebq5HMxDSryGv0Ar8Gid2moRmeQP5dXgGlfteg50cEf6FKhsDUyAtWZYQgy D++w== X-Gm-Message-State: AOAM530Avb5mcV9pB0QkUWvsoc4mtNpD/GcMfLcaPdYr/49JBV/STh52 goGtjmiLWgMwlrszl3VpYuIuCw== X-Received: by 2002:adf:df91:: with SMTP id z17mr964095wrl.149.1595349715049; Tue, 21 Jul 2020 09:41:55 -0700 (PDT) Received: from localhost.localdomain ([2.27.167.94]) by smtp.gmail.com with ESMTPSA id m4sm3933524wmi.48.2020.07.21.09.41.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 09:41:54 -0700 (PDT) From: Lee Jones To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Lee Jones , Hannes Reinecke Subject: [PATCH 02/40] scsi: aic7xxx: aic79xx_core: Remove a bunch of unused variables Date: Tue, 21 Jul 2020 17:41:10 +0100 Message-Id: <20200721164148.2617584-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200721164148.2617584-1-lee.jones@linaro.org> References: <20200721164148.2617584-1-lee.jones@linaro.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.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 Signed-off-by: Lee Jones --- drivers/scsi/aic7xxx/aic79xx_core.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) -- 2.25.1 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;