On 26/06/2020 17:49, Johannes Thumshirn wrote:
> On 26/06/2020 10:03, Christoph Hellwig wrote:
>> -size = bdev->bd_block_size;
>> -if (!size)
>> -size = 1024;
>> -
>
> Why is this correct? block_size() only returns 'bdev->bd_block_size' but I
> cannot
> see where it's made su
On 26/06/2020 10:03, Christoph Hellwig wrote:
> - size = bdev->bd_block_size;
> - if (!size)
> - size = 1024;
> -
Why is this correct? block_size() only returns 'bdev->bd_block_size' but I
cannot
see where it's made sure bd_block_size is not 0. At least no calls to
set_block
Use the block_size helper instead of open coding it. Also remove the
check for a 0 block size, as that can't happen.
Signed-off-by: Christoph Hellwig
---
drivers/block/floppy.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/block/floppy.c b/drivers/block/flopp
3 matches
Mail list logo