cxl: Fix double shift of CXL_FW_CANCEL
Davidlohr Bueso
maintainerPATCH 1/1 cxl: Fix double shift of CXL_FW_CANCEL
Directly use the bit number for bitops, which already has a shift built in. This bug is benign as its done consistently and it doesn't clash with any other flags.
--- drivers/cxl/cxlmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cxl/cxlmem.h +1 -1
@@ -323,7 +323,7 @@ struct cxl_mbox_activate_fw {/* FW state bits */ #define CXL_FW_STATE_BITS 32 -#define CXL_FW_CANCEL BIT(0) +#define CXL_FW_CANCEL 0/** * struct cxl_fw_state - Firmware upload / activation state
Signature · 1 line
2.41.0
Quoted 3 lines · Davidlohr Bueso
Directly use the bit number for bitops, which already has a shift built in. This bug is benign as its done consistently and it doesn't clash with any other flags.
Ah good catch!
Quoted 3 lines
Fixes 9521875bbe00 ("cxl: add a firmware update mechanism using the sysfs firmware loader")Signed-off-by Davidlohr Bueso <[email protected]>
Quoted 17 lines
---
drivers/cxl/cxlmem.h | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/cxl/cxlmem.h +0
-0@@ -323,7 +323,7 @@ struct cxl_mbox_activate_fw {
/* FW state bits */
#define CXL_FW_STATE_BITS 32drivers/cxl/cxlmem.h +1
-1-#define CXL_FW_CANCEL BIT(0) +#define CXL_FW_CANCEL 0
/**
* structcxl_fw_state- Firmware upload / activation state
Davidlohr Bueso
maintainerQuoted 6 lines · Vishal L
Quoted 3 lines · Davidlohr Bueso
Directly use the bit number for bitops, which already has a shift built in. This bug is benign as its done consistently and it doesn't clash with any other flags.
Ah good catch!
Actually this is a duplicate. I just noticed, scrolling the list, that Dan Carpenter has already sent a fix for this. His patch should be picked up. Sorry for the noise.
Thanks,
Davidlohr
Quoted 6 lines · Davidlohr Bueso
Directly use the bit number for bitops, which already has a shift built in. This bug is benign as its done consistently and it doesn't clash with any other flags.
Fixes 9521875bbe00 ("cxl: add a firmware update mechanism using the sysfs firmware loader")Signed-off-by Davidlohr Bueso <[email protected]>
Quoted 17 lines
--- drivers/cxl/cxlmem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cxl/cxlmem.h +1
-1@@ -323,7 +323,7 @@ struct cxl_mbox_activate_fw {/* FW state bits */ #define CXL_FW_STATE_BITS 32 -#define CXL_FW_CANCEL BIT(0) +#define CXL_FW_CANCEL 0/** * struct cxl_fw_state - Firmware upload / activation state