Re: [patch] [SCSI] be2iscsi: cleanup a min_t() call

Dan Carpenter
2011-11-18T13:59:19Z

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

On Mon, Sep 26, 2011 at 09:23:37AM +0300, Dan Carpenter wrote:
> "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: Dan Carpenter <dan.carpenter@oracle.com>
> ---

Ping.

regards,
dan carpenter

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]