]> git.baikalelectronics.ru Git - kernel.git/commit
cteontx2-pf: cn10k: Prevent harmless double shift bugs
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 17 Feb 2021 06:16:20 +0000 (09:16 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2021 22:26:49 +0000 (14:26 -0800)
commitc30c698684fec71c9f9cf3c964d20e8b5d931e1a
tree03a97d93a60016074891f22404c611cb088d0547
parent629ba3b3cdde99c899e62e90d687e6f836b612da
cteontx2-pf: cn10k: Prevent harmless double shift bugs

These defines are used with set_bit() and test_bit() which take a bit
number.  In other words, the code is doing:

if (BIT(BIT(1)) & pf->hw.cap_flag) {

This was done consistently so it did not cause a problem at runtime but
it's still worth fixing.

Fixes: 604e2bfa507d ("octeontx2-pf: cn10k: Add mbox support for CN10K")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h