]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 11 Jul 2018 02:25:03 +0000 (22:25 -0400)
commit9972b90902881aea6c02bcc5fd056b27ed0bc2da
tree03d3cbe622b7ec73849fead5f0874e5828bdafc3
parentc33c28eea8c3d6361d4314b4091af710c98672ac
scsi: sd_zbc: Fix variable type and bogus comment

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: 3e2770fa8c ("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>
drivers/scsi/sd_zbc.c