Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4053a4be authored by Dan Carpenter's avatar Dan Carpenter Committed by James Bottomley
Browse files

[SCSI] be2iscsi: cleanup a min_t() call



"sense_len" was declared as int type but actually it only stores a
u16 value that comes from hardware.  The cast to u16 in min_t()
confuses static analysis because it truncates the int to u16 so I've
fixed the declaration to reflect that "sense_len" is just a u16.

Also there was a call to cpu_to_be16() which I've changed to
be16_to_cpu().  The functions are equivalent, but obviously the
hardware is big endian and we're doing the min_t() comparison on CPU
endian values.

This whole patch is just a cleanup and doesn't affect how the code
works.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Acked-by: default avatarJayamohan Kallickal <Jayamohan.kallickal@emulex.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 7af0abbc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment