RE: [PATCH] nvme: Increase block size variable size to 32-bit

From: David Laight
Date: Thu Jun 01 2023 - 06:29:47 EST


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)