]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitec2dccc3d0fe53ed9283f377dc45e2e1db516b10
tree3e7d99c423b4bef3ae421883b49c2a85b6c41ccc
parent01318099373967951ca61ad52342d7079fda0232
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: 7fdb5e12530a ("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