]> git.baikalelectronics.ru Git - kernel.git/commitdiff
octeontx2-af: Remove set but not used variable 'block'
authorYueHaibing <yuehaibing@huawei.com>
Fri, 19 Oct 2018 12:51:28 +0000 (12:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Oct 2018 02:28:14 +0000 (19:28 -0700)
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 c8cdc8231344 ("octeontx2-af: NPA block admin queue init")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c

index 0e43a693d119a499c5e8d37e9b23c712594214dd..7531fdc54fa1b96d047bd6e270f55c143f7e2e71 100644 (file)
@@ -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)