diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-02-17 09:16:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-02-17 14:26:49 -0800 |
commit | c77662605d8d715062f15bbf567b5a61082b4967 (patch) | |
tree | 03a97d93a60016074891f22404c611cb088d0547 /drivers/net/ethernet/marvell | |
parent | 20e07e2c3cf310578ef19fb4f1e64dc9832abd9d (diff) |
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: facede8209ef ("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>
Diffstat (limited to 'drivers/net/ethernet/marvell')
-rw-r--r-- | drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h index f14d388efb51..a518c2283f18 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h @@ -210,9 +210,9 @@ struct otx2_hw { u64 cgx_fec_uncorr_blks; u8 cgx_links; /* No. of CGX links present in HW */ u8 lbk_links; /* No. of LBK links present in HW */ -#define HW_TSO BIT_ULL(0) -#define CN10K_MBOX BIT_ULL(1) -#define CN10K_LMTST BIT_ULL(2) +#define HW_TSO 0 +#define CN10K_MBOX 1 +#define CN10K_LMTST 2 unsigned long cap_flag; #define LMT_LINE_SIZE 128 |