]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: iscsi: Fix harmless double shift bug
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 21 Apr 2022 15:03:52 +0000 (18:03 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2022 03:23:01 +0000 (23:23 -0400)
These flags are supposed to be bit numbers.  Right now they cause a double
shift bug where we use BIT(BIT(2)) instead of BIT(2).  Fortunately, the bit
numbers are small and it's done consistently so it does not cause an issue
at run time.

Link: https://lore.kernel.org/r/YmFyWHf8nrrx+SHa@kili
Fixes: bfc38cb7416d ("scsi: iscsi: Merge suspend fields")
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
include/scsi/libiscsi.h

index d0a24779c52dc44cb14c4fea56f8243e1b0f22a0..c0703cd20a9939da8ce514f20f9f1487f67ddb0d 100644 (file)
@@ -54,9 +54,9 @@ enum {
 #define ISID_SIZE                      6
 
 /* Connection flags */
-#define ISCSI_CONN_FLAG_SUSPEND_TX     BIT(0)
-#define ISCSI_CONN_FLAG_SUSPEND_RX     BIT(1)
-#define ISCSI_CONN_FLAG_BOUND          BIT(2)
+#define ISCSI_CONN_FLAG_SUSPEND_TX     0
+#define ISCSI_CONN_FLAG_SUSPEND_RX     1
+#define ISCSI_CONN_FLAG_BOUND          2
 
 #define ISCSI_ITT_MASK                 0x1fff
 #define ISCSI_TOTAL_CMDS_MAX           4096