diff options
author | Joern Engel <joern@logfs.org> | 2014-09-02 17:50:01 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-09-17 18:23:00 -0400 |
commit | c435285df112da1125e61d826b03014a4e769386 (patch) | |
tree | 970a9ff212bf9c45d2796222b0b9f455fdfed9db | |
parent | ce31c1b0dc4038a1dec64585d892adb73d9c45f4 (diff) |
target: fix unused shift in core_scsi3_pri_report_capabilities
Clearly a right-shift was meant. Effectively doesn't make a difference,
as add_len is hard-coded to 8 and the high byte will be zero no matter
which way you shift. But I hate leaving bad examples for others to
copy.
Found by coverity.
Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/target/target_core_pr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index df357862286e..281d52e3fe99 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c | |||
@@ -3803,7 +3803,7 @@ core_scsi3_pri_report_capabilities(struct se_cmd *cmd) | |||
3803 | if (!buf) | 3803 | if (!buf) |
3804 | return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; | 3804 | return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; |
3805 | 3805 | ||
3806 | buf[0] = ((add_len << 8) & 0xff); | 3806 | buf[0] = ((add_len >> 8) & 0xff); |
3807 | buf[1] = (add_len & 0xff); | 3807 | buf[1] = (add_len & 0xff); |
3808 | buf[2] |= 0x10; /* CRH: Compatible Reservation Hanlding bit. */ | 3808 | buf[2] |= 0x10; /* CRH: Compatible Reservation Hanlding bit. */ |
3809 | buf[2] |= 0x08; /* SIP_C: Specify Initiator Ports Capable bit */ | 3809 | buf[2] |= 0x08; /* SIP_C: Specify Initiator Ports Capable bit */ |