Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2060344ybh; Tue, 14 Jul 2020 14:43:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRd3gm9LIPBmHrW8olTHWC2HY/NpgWFSNMoxUZhTKZtBeCVlo/SxkU2GUyO0Pa9XrzZDCw X-Received: by 2002:aa7:da8a:: with SMTP id q10mr6593222eds.139.1594762983471; Tue, 14 Jul 2020 14:43:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594762983; cv=none; d=google.com; s=arc-20160816; b=DynEFw+DrE+zQtP76LJbQ/kY/xSUK4DS1OauMoRyLBnnOc1y0zyEAsfkNOrEPHfkx/ GOq7ZMewgEuPUcjQ8QoKC6iPiLPp9/vYp7yURuGJlYfOohxOcVl+91DeuyllqnEH8OVO 1y9UHCnUURlWfmJEqApZN9r/kzJ3gjsuR4FbDCvo0JmQho+abkE282gXJBh8pGcRJqQR ZdLowAHf+n7H9KFaizAKWyhMQ9ZbH4pVKvTHFW/nkDVM6YRpiMZ7hyymxgqyJxKNOHxj j3gWTGjYqRyT9IQD/853aZfpx3voYM7VlmjYaCzp883Iet0WWRblKDOPnjJtYVcm5aBS zUVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cmHcwmTccT13ZJXcb7SBLzTw/UgSDiTbBWL8nKbEfh8=; b=gGHyjkG+p4bMOaCtyJAQAEwNKlrpgHpw+t8Nnl1C1C/y3DxN2HO+X56VijxLzgnRPW OV9rjCx00Fx5hBZi0VGIF7xL7xU2MzhVn69/VG6N2+ZmbHkWTDhgC1KhiwXhgx1IAKIK 2z7NzLNEoY2QaUs0hBcDxcLCUYp6b9xet4SWahPvJSyeEEEm38lZi0a0pIZ4mSJ0xNLb eWdqkLV689mm6WCslZebwh8iUjyIcOIA6+lv35ixqV/RATst9NvJ63IQoDkSRQV6dMRR KWR/d1Vs6QRgp4dx8+njzzEdYhluOzpkeZ+tThxphZrDKeOF72IiyNFg6JwNL3GOI+Em vhEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hl2mRBj5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 j18si5320eja.217.2020.07.14.14.42.40; Tue, 14 Jul 2020 14:43:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=hl2mRBj5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727999AbgGNVj4 (ORCPT + 99 others); Tue, 14 Jul 2020 17:39:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726722AbgGNVjz (ORCPT ); Tue, 14 Jul 2020 17:39:55 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C1E8C061755 for ; Tue, 14 Jul 2020 14:39:55 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id f7so318188wrw.1 for ; Tue, 14 Jul 2020 14:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=cmHcwmTccT13ZJXcb7SBLzTw/UgSDiTbBWL8nKbEfh8=; b=hl2mRBj5TXYfXXlig2eChw0XasjMiOrb9AtRFxZdbPyHE59r5Wap6WzQTySOdEQUJI tgFQc7fupgoqDrRc4Wn0CrupPbdEojws4yyp8xGLozYqdZ+6dSzfYy9qzKGkM5FV2Oot JbUj+RtfHk/mhyglpCa+/0ezOc66UcAQVwVY/q5jd1U8RZZvcfbf5rWZ8jh+w0OB4ndd BOAIKcnWA4EHnVvIftC76Fk+nsHIzerjm0BABgGduehlIa3KOS9RIL5mJPZMwTxnzhFc 6g0zZxbsTIbeQwd0MMdLVYaPZjRj2G5QXPIswenRv7L1YSXMhp26dAtHy6ZelPtw6+o6 cbyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=cmHcwmTccT13ZJXcb7SBLzTw/UgSDiTbBWL8nKbEfh8=; b=Lgn080a89OSXFAuNTKlhzm/qL5vwmfpwcv3XZN1ZRz9lqMh6msKtdvBcbbdPjXtbAe jl6Xf8X0Q5TugjodL2ypxlwDXVx+dGzY0P8AIVwQA3rs9ACWoH2Nl2uU0s0RCkga8AWB B+2lh16B4Z+rgSA8zJFxlJvmTKDDsT7YMr6nQOxJDmb4y8L45+KcigiUmKHuZ9w3tAKs 53OxYLXkndM1pCtalKcvXe5xZSy+L1FKwwfa4qxdHqkbNZ4DRMt/X/ZCcfAdxA+4Lbhj tjE7e3O7IzA9wDTMB8PZogGHEPFEwNN50AbP15YbS75L5S9wV9wmXIEeoV0qgDJHj7Ih 99GQ== X-Gm-Message-State: AOAM531Pc0F0PvWAMDSBTIJgA3ND7AdAkc+aU+cMr3rX4Xu/5RFmecZc UafO6ZqzpYBRkZwOG+v1cwqe7klYejOMVA== X-Received: by 2002:a5d:5388:: with SMTP id d8mr7829244wrv.35.1594762793831; Tue, 14 Jul 2020 14:39:53 -0700 (PDT) Received: from dell ([2.31.163.61]) by smtp.gmail.com with ESMTPSA id v18sm26479wrv.49.2020.07.14.14.39.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 14:39:53 -0700 (PDT) Date: Tue, 14 Jul 2020 22:39:51 +0100 From: Lee Jones To: James Bottomley Cc: Hannes Reinecke , martin.petersen@oracle.com, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Hannes Reinecke Subject: Re: [PATCH v2 24/24] scsi: aic7xxx: aic79xx_osm: Remove set but unused variabes 'saved_scsiid' and 'saved_modes' Message-ID: <20200714213951.GL1398296@dell> References: <20200713080001.128044-1-lee.jones@linaro.org> <20200713080001.128044-25-lee.jones@linaro.org> <559e47de-fa26-9ae5-a3c5-4adeae606309@suse.de> <1594741430.4545.15.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1594741430.4545.15.camel@linux.ibm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jul 2020, James Bottomley wrote: > On Tue, 2020-07-14 at 09:46 +0200, Hannes Reinecke wrote: > > On 7/13/20 10:00 AM, Lee Jones wrote: > > > Haven't been used since 2006. > > > > > > Fixes the following W=1 kernel build warning(s): > > > > > > drivers/scsi/aic7xxx/aic79xx_osm.c: In function > > > ‘ahd_linux_queue_abort_cmd’: > > > drivers/scsi/aic7xxx/aic79xx_osm.c:2155:17: warning: variable > > > ‘saved_modes’ set but not used [-Wunused-but-set-variable] > > > drivers/scsi/aic7xxx/aic79xx_osm.c:2148:9: warning: variable > > > ‘saved_scsiid’ set but not used [-Wunused-but-set-variable] > > > > > > Cc: Hannes Reinecke > > > Signed-off-by: Lee Jones > > > --- > > > drivers/scsi/aic7xxx/aic79xx_osm.c | 4 ---- > > > 1 file changed, 4 deletions(-) > > > > > > diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c > > > b/drivers/scsi/aic7xxx/aic79xx_osm.c > > > index 3782a20d58885..140c4e74ddd7e 100644 > > > --- a/drivers/scsi/aic7xxx/aic79xx_osm.c > > > +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c > > > @@ -2141,14 +2141,12 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd > > > *cmd) > > > u_int saved_scbptr; > > > u_int active_scbptr; > > > u_int last_phase; > > > - u_int saved_scsiid; > > > u_int cdb_byte; > > > int retval; > > > int was_paused; > > > int paused; > > > int wait; > > > int disconnected; > > > - ahd_mode_state saved_modes; > > > unsigned long flags; > > > > > > pending_scb = NULL; > > > @@ -2239,7 +2237,6 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd > > > *cmd) > > > goto done; > > > } > > > > > > - saved_modes = ahd_save_modes(ahd); > > > ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); > > > last_phase = ahd_inb(ahd, LASTPHASE); > > > saved_scbptr = ahd_get_scbptr(ahd); > > > @@ -2257,7 +2254,6 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd > > > *cmd) > > > * passed in command. That command is currently active on > > > the > > > * bus or is in the disconnected state. > > > */ > > > - saved_scsiid = ahd_inb(ahd, SAVED_SCSIID); > > > if (last_phase != P_BUSFREE > > > && SCB_GET_TAG(pending_scb) == active_scbptr) { > > > > > > > > > > Reviewed-by: Hannes Reinecke > > Hey, you don't get to do that ... I asked you to figure out why we're > missing an ahd_restore_modes(). Removing the ahd_save_modes() is > cosmetic: it gets rid of a warning but doesn't fix the problem. I'd > rather keep the warning until the problem is fixed and the problem is > we need a mode save/restore around the ahd_set_modes() which is only > partially implemented in this function. I had a look. Traced it back to the dawn of time (time == Git), then delved even further back by downloading and trawling through ~10-15 tarballs. It looks as though drivers/scsi/aic7xxx/aic79xx_osm.c was upstreamed in v2.5.60, nearly 20 years ago. 'saved_modes' has been unused since at least then. If no one has complained in 2 decades, I'd say it probably isn't an issue worth perusing. -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog