scsi: sd_zbc: Fix variable type and bogus comment
authorDamien Le Moal <damien.lemoal@wdc.com>
Tue, 3 Jul 2018 06:23:58 +0000 (15:23 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jul 2018 09:25:06 +0000 (11:25 +0200)
commit763ccb4d1980155e1f71290f9fc7950065ec77a6
treefb3e2b9dec4826e53550c2c60811e931fd16809b
parentecc160ece609498c946e73710e5c7c54c62b966a
scsi: sd_zbc: Fix variable type and bogus comment

commit f13cff6c25bd8986627365346d123312ee7baa78 upstream.

Fix the description of sd_zbc_check_zone_size() to correctly explain that
the returned value is a number of device blocks, not bytes.  Additionally,
the 32 bits "ret" variable used in this function may truncate the 64 bits
zone_blocks variable value upon return. To fix this, change "ret" type to
s64.

Fixes: ccce20fc79 ("sd_zbc: Avoid that resetting a zone fails sporadically")
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: stable@kernel.org
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/sd_zbc.c