Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3316192pxy; Sun, 25 Apr 2021 21:28:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyInU8U7s1v89C6iyMRRDPIwYegz5W+h+DyWpHb8hUXEg54G2GwsXnMQuONajTOVfcfMp1m X-Received: by 2002:a05:6402:4308:: with SMTP id m8mr18872616edc.209.1619411300350; Sun, 25 Apr 2021 21:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619411300; cv=none; d=google.com; s=arc-20160816; b=qPvOdtgA7XjMA/P4g8/7qoh/xl6RmQHSvBzX5zPYHVXrronJcxzkLPGEt80rZbE5QV jsQ0ZPnnfG2vOqKkwwfy7TgA78lcvv0Mgd9+0eR1g6czpHIGRWw3EkRSXcw6gtNSuMqW FGvlfsQoU0gj2M8Y3aafMLuUfQ4EVfJPrp1z3b5gZ57dqPw0tmJVvuEcnoqiCUZJNSUR bdGsD0H6ENTrV8XjiOOvEQ5YAfQ9FE9MVr0crl2/GQMli2aDLXdmAEf2WLIKwV2QtD4l AJFFH/FaIgEoOIYLGLliTDmpaIOzdeHIey6duiLSt7bLOmWk944Ll7XqEbsmTo6utzXq MoPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=LFToq4ZSZU0clTZU52iLbN3gj9PxPaOBlaQu8hh4LCE=; b=zczIocY4giiTEXWo/walQsnAp2usm3quCsHw8ZZYhMYS0gcql0z+KG4Aarr9Zi1hoT A0NenlwsEplvRLIUvUIw8FQdvRbkqP34MJmle9qpfWef+PMK81IwML7mKIX/KT8rQCGB ca+oXRxFnBNfkmDgxUZ4jOidOzdjZeB2xyTz0oXicxgym2b9J9q9RDs7IXARs13VgEsa jhEqxvPJCg6MtaXEKKa+jE6hkVWw+m4vzCiiyD/hhcRRifeojXTXA8hO6i/LlUFAw5Zx 3Kp9mUYwyMkppMndSl5bc+3+6Hj1ehGr24uiwzxQVgoulFaPRe2KVqUbGmUcheiUeRGk cA0w== ARC-Authentication-Results: i=1; mx.google.com; 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 x24si12501845ejj.149.2021.04.25.21.27.56; Sun, 25 Apr 2021 21:28:20 -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; 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 S229554AbhDZE1m (ORCPT + 99 others); Mon, 26 Apr 2021 00:27:42 -0400 Received: from stargate.chelsio.com ([12.32.117.8]:54768 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbhDZE1m (ORCPT ); Mon, 26 Apr 2021 00:27:42 -0400 Received: from localhost (kumbhalgarh.blr.asicdesigners.com [10.193.185.255]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id 13Q4QqHB004459; Sun, 25 Apr 2021 21:26:54 -0700 Date: Mon, 26 Apr 2021 09:56:53 +0530 From: Raju Rangoju To: Jiapeng Chong Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cxgb4: Remove redundant assignment to ret Message-ID: <20210426042648.GA12978@chelsio.com> References: <1619347023-49996-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: <1619347023-49996-1-git-send-email-jiapeng.chong@linux.alibaba.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sunday, April 04/25/21, 2021 at 18:37:03 +0800, Jiapeng Chong wrote: > Variable ret is set to zero but this value is never read as it is > overwritten with a new value later on, hence it is a redundant > assignment and can be removed. > > Cleans up the following clang-analyzer warning: > > drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:3830:2: warning: Value stored > to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c > index 80882cf..b9d2d58 100644 > --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c > +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c > @@ -3827,8 +3827,8 @@ int t4_load_phy_fw(struct adapter *adap, int win, > FW_PARAMS_PARAM_X_V(FW_PARAMS_PARAM_DEV_PHYFW) | > FW_PARAMS_PARAM_Y_V(adap->params.portvec) | > FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD)); > - ret = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0, 1, > - ¶m, &val, 30000); Thanks for reporting this. However, the return value of t4_set_params_timeout() needs to be handled and can not be ignored. Will send a patch to fix the issue soon. > + t4_set_params_timeout(adap, adap->mbox, adap->pf, 0, 1, > + ¶m, &val, 30000); > > /* If we have version number support, then check to see that the new > * firmware got loaded properly. > -- > 1.8.3.1 >