mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 09:14:19 +08:00
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>
This commit is contained in:
parent
ce31c1b0dc
commit
c435285df1
@ -3803,7 +3803,7 @@ core_scsi3_pri_report_capabilities(struct se_cmd *cmd)
|
||||
if (!buf)
|
||||
return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
|
||||
|
||||
buf[0] = ((add_len << 8) & 0xff);
|
||||
buf[0] = ((add_len >> 8) & 0xff);
|
||||
buf[1] = (add_len & 0xff);
|
||||
buf[2] |= 0x10; /* CRH: Compatible Reservation Hanlding bit. */
|
||||
buf[2] |= 0x08; /* SIP_C: Specify Initiator Ports Capable bit */
|
||||
|
Loading…
Reference in New Issue
Block a user