Re: [PATCH] scsi: sd: Fix unsigned expression compared with zero

From: Bart Van Assche
Date: Mon Jul 01 2024 - 12:51:42 EST


On 7/1/24 2:06 AM, Jiapeng Chong wrote:
The return value from the call to scsi_execute_cmd() is int. However, the
return value is being assigned to an unsigned int variable 'the_result',
so making 'the_result' an int.

./drivers/scsi/sd.c:2333:6-16: WARNING: Unsigned expression compared with zero: the_result > 0.

Since this is a bug fix, please add Cc: stable and Fixes: tags.

Thanks,

Bart.