OSDN Git Service

cxgb4: fix set but unused variable when DCB is disabled
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Tue, 23 Jun 2020 20:21:40 +0000 (01:51 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jun 2020 22:18:48 +0000 (15:18 -0700)
commit00e31cfc8995de2a15352522fc672922a23b435e
tree3e7d99c423b4bef3ae421883b49c2a85b6c41ccc
parentbab3bcf3e9873e1e6e9cb39c1f55a05fb10415a4
cxgb4: fix set but unused variable when DCB is disabled

Remove the set but unused variable when DCB is disabled. Instead,
do the calculation directly inline.

Fixes following warning in make W=1:
cxgb4_main.c: In function 'cfg_queues':
cxgb4_main.c:5380:29: warning: variable 'n1g' set but not used
[-Wunused-but-set-variable]
  u32 i, n10g = 0, qidx = 0, n1g = 0;
                             ^

Fixes: 116ca924aea6 ("cxgb4: fix checks for max queues to allocate")
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c