Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp246142pxy; Fri, 30 Apr 2021 04:40:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkvd3gTzI6BAevXERm9y60+QnjomxjK8dDTCxI2dF4sIYnzqeOdibS2s4c8IIsf2M4Gj7m X-Received: by 2002:a17:90a:d201:: with SMTP id o1mr14768129pju.230.1619782812372; Fri, 30 Apr 2021 04:40:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619782812; cv=none; d=google.com; s=arc-20160816; b=xIr2GEadhlpJ37UXm0Ljo7SzLpJujrRJnNNhkt8iM3y7fR+EcROxCurnRIbxcu420h x22LY4EOjfcit+IFpGW8w1J6KCWIJkbyN6uGfdE5JTWBY3K2std06GPtlnNqS7KZ3Dyf kwOUsAZfxG/OE3/iCAgrjf2JukI6RfIDOmyWbald74rVkrJM0SYVKK0s9aAEAAlXJLRe ik+MHw0rWVQGS1zKk3qLrO5gCLmUKmvrJm8SSr61IXMUMyDIDeCnbSrB1STjflQsxZpA XBp+X/uOwZO+7q88A9yhnZsVEROS9++OMucPAx6hizatNWSLfDpMa6jQCxxJnSi6MuHC gwnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=reerZnOjvxm3GMx9XqqMTODNxQ861rsAvPAy5VxLa8c=; b=06KNQBa/j9/YNS/q4rIXKWKrBz3X4Rw1jkibt120VGS0rYGwk922WO65lhbdSOya7W 7mWwxIvon1Qg9E4nnv6chhUTwO4Z4nekUYffTJtTUBgTm9C8kqfthwYdkFIkMKJN28Bp uqhtNT4At5kvUQWt9urL4O1pv/m8pO2d2lUh7KdLHJNfnMny4+MDqUr7y5g8JOjN1qH0 Thsywk8OEbqBPi33L1G2KfCgpzJWoY5jIjjeY5xPg4cQRy6ekYJOfXvFS65ZIiWeiw47 aRpHpQpDTQMmwy0Nq4mVdy5wcoeodJAtNotEqccTxxF2jaH7LAWck1570GVZiAsEg6Q3 hblQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=s5nC72gS; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si2317588pfu.132.2021.04.30.04.39.58; Fri, 30 Apr 2021 04:40:12 -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=@infradead.org header.s=casper.20170209 header.b=s5nC72gS; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231747AbhD3LhX (ORCPT + 99 others); Fri, 30 Apr 2021 07:37:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbhD3LhV (ORCPT ); Fri, 30 Apr 2021 07:37:21 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD0D5C06174A; Fri, 30 Apr 2021 04:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=reerZnOjvxm3GMx9XqqMTODNxQ861rsAvPAy5VxLa8c=; b=s5nC72gSvDbgfWEyNNPaN4COAB BgPktEAeUuOSG1lI4zCtbAH49IMFPNigDUheDdkykoZrLJr6SsXuUuCL0/mXpX4vSNIYySvTnmyeS M8jDcLndM/m49sN/6wezefjRz5HqqLkonHrFC1G6wKgnF7w2dc1I68y3KZawU5lpAialz1yAnRHM2 gGCy3UBHOWhgUb4G9RygBhFvLWTZAN+DLTzpgFmosjhYkqZCvtXUYuIS9z1TpvfN++H5n06a7qovi VrIvi4Xc2lriDlXxChNF7edtJcVths2jf2Of3nojBTKIe1kqXK6/Xps3FXzuzjPb19WPPkNekioV7 G2RE7IfA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lcRQq-00Awzm-QS; Fri, 30 Apr 2021 11:35:48 +0000 Date: Fri, 30 Apr 2021 12:35:40 +0100 From: Matthew Wilcox To: Jiapeng Chong Cc: hare@suse.com, jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] advansys: Remove redundant assignment to err and n_q_required Message-ID: <20210430113540.GK1847222@casper.infradead.org> References: <1619774728-120808-1-git-send-email-jiapeng.chong@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1619774728-120808-1-git-send-email-jiapeng.chong@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 30, 2021 at 05:25:28PM +0800, Jiapeng Chong wrote: > Variable err and n_q_required is set to '-ENOMEM' and '1', but they are > either overwritten or unused later on, so these are redundant assignments > that can be removed. > > Clean up the following clang-analyzer warning: > > drivers/scsi/advansys.c:11235:2: warning: Value stored to 'err' is never > read [clang-analyzer-deadcode.DeadStores]. > > drivers/scsi/advansys.c:8091:2: warning: Value stored to 'n_q_required' > is never read [clang-analyzer-deadcode.DeadStores]. > > drivers/scsi/advansys.c:11484:2: warning: Value stored to 'err' is never > read [clang-analyzer-deadcode.DeadStores]. I don't want to spend any time figuring out if this is a legitimate patch or not. Please stop running these analysers on this driver, and thank the University of Minnesota for making me suspicious.