Skip to content

Commit 95c6bff

Browse files
Dan Carpenterstellarhopper
authored andcommitted
cxl/mem: Fix a double shift bug
The CXL_FW_CANCEL macro is used with set/test_bit() so it should be a bit number and not the shifted value. The original code is the equivalent of using BIT(BIT(0)) so it's 0x2 instead of 0x1. This has no effect on runtime because it's done consistently and nothing else was using the 0x2 bit. Fixes: 9521875 ("cxl: add a firmware update mechanism using the sysfs firmware loader") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/a11b0c78-4717-4f4e-90be-f47f300d607c@moroto.mountain Reviewed-by: Vishal Verma <vishal.l.verma@intel.com> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
1 parent 9171dfc commit 95c6bff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cxl/cxlmem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ struct cxl_mbox_activate_fw {
323323

324324
/* FW state bits */
325325
#define CXL_FW_STATE_BITS 32
326-
#define CXL_FW_CANCEL BIT(0)
326+
#define CXL_FW_CANCEL 0
327327

328328
/**
329329
* struct cxl_fw_state - Firmware upload / activation state

0 commit comments

Comments
 (0)