[PATCH] nvme: Increase block size variable size to 32-bit
David Laight
David.Laight at ACULAB.COM
Thu Jun 1 03:28:45 PDT 2023
From: Christoph Hellwig
> Sent: 31 May 2023 14:03
>
> > + u32 bs = 1 << ns->lba_shift;
>
> Make that 1 a 1U so that we're not going to run into sign extension
> issues when using up all bits in the u32 :)
Not 'sign extension' but obscure integer shift/conversion issues
that really only affect 1's compliment and sign-overpunch cpu.
I'm not even sure gcc/clang support any non 2's compliment systems.
> Otherwise looks good:
Probably improves the generated code as well.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
More information about the Linux-nvme
mailing list