]> www.infradead.org Git - users/jedix/linux-maple.git/commit
be2iscsi: cleanup a min_t() call
authorroot <root@localhost.localdomain>
Wed, 2 May 2012 13:58:04 +0000 (19:28 +0530)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Fri, 11 May 2012 00:08:47 +0000 (17:08 -0700)
commit5a40b18221e02d3db76e93373f24351991e145a0
treed5661072989ae247921fcc5653498fda42f88c59
parent34db14caa185e53676d82dcef8d50a04a2492b68
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.

 upstream commit id : 4053a4be525d3441cad6cd1ae207177f03eb9ce7
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: root <root@localhost.(none)>
drivers/scsi/be2iscsi/be_main.c