From mboxrd@z Thu Jan 1 00:00:00 1970 From: YueHaibing Subject: Re: [PATCH net-next] octeontx2-af: Remove set but not used variable 'block' Date: Sun, 21 Oct 2018 18:07:26 +0800 Message-ID: References: <1539953488-191102-1-git-send-email-yuehaibing@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Sunil Goutham , Linu Cherian , Geetha sowjanya , , "David S. Miller" , Linux Netdev List , To: Sunil Kovvuri Return-path: Received: from szxga04-in.huawei.com ([45.249.212.190]:14099 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727295AbeJUSVS (ORCPT ); Sun, 21 Oct 2018 14:21:18 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 2018/10/19 21:36, Sunil Kovvuri wrote: > On Fri, Oct 19, 2018 at 6:11 PM YueHaibing wrote: >> >> Fixes gcc '-Wunused-but-set-variable' warning: >> >> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c: In function 'rvu_npa_init': >> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c:446:20: warning: >> variable 'block' set but not used [-Wunused-but-set-variable] >> >> It never used since introduction in >> commit 7a37245ef23f ("octeontx2-af: NPA block admin queue init") >> >> Signed-off-by: YueHaibing >> --- >> drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c | 3 --- >> 1 file changed, 3 deletions(-) >> >> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c >> index 0e43a69..7531fdc 100644 >> --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c >> +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c >> @@ -443,15 +443,12 @@ static int npa_aq_init(struct rvu *rvu, struct rvu_block *block) >> int rvu_npa_init(struct rvu *rvu) >> { >> struct rvu_hwinfo *hw = rvu->hw; >> - struct rvu_block *block; >> int blkaddr, err; >> >> blkaddr = rvu_get_blkaddr(rvu, BLKTYPE_NPA, 0); >> if (blkaddr < 0) >> return 0; >> >> - block = &hw->block[blkaddr]; >> - >> /* Initialize admin queue */ >> err = npa_aq_init(rvu, &hw->block[blkaddr]); >> if (err) >> > > Thanks for the patch. > Which GCC version do you use ? gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) > Before submitting patches I did test compiling specifically with these > "make arch=X86 -j8 -Werror=unused-function -Wunused-but-set-variable" > but that didn't throw these warnings. > > Thanks, > Sunil. > > . >