Skip to content

Commit

Permalink
scsi: iscsi: Fix harmless double shift bug
Browse files Browse the repository at this point in the history
[ Upstream commit 565138a ]

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: 5bd8562 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Jun 9, 2022
1 parent 9e301f2 commit e646951
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/scsi/libiscsi.h
Expand Up @@ -53,9 +53,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
Expand Down

0 comments on commit e646951

Please sign in to comment.