Commit c7766260 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

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: facede82 ("octeontx2-pf: cn10k: Add mbox support for CN10K")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 20e07e2c
...@@ -210,9 +210,9 @@ struct otx2_hw { ...@@ -210,9 +210,9 @@ struct otx2_hw {
u64 cgx_fec_uncorr_blks; u64 cgx_fec_uncorr_blks;
u8 cgx_links; /* No. of CGX links present in HW */ u8 cgx_links; /* No. of CGX links present in HW */
u8 lbk_links; /* No. of LBK links present in HW */ u8 lbk_links; /* No. of LBK links present in HW */
#define HW_TSO BIT_ULL(0) #define HW_TSO 0
#define CN10K_MBOX BIT_ULL(1) #define CN10K_MBOX 1
#define CN10K_LMTST BIT_ULL(2) #define CN10K_LMTST 2
unsigned long cap_flag; unsigned long cap_flag;
#define LMT_LINE_SIZE 128 #define LMT_LINE_SIZE 128
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment