Re: [PATCH v4 1/2] linux/bits.h: fix unsigned less than zero warnings

2020-07-09 Thread Herbert Xu
On Thu, Jul 09, 2020 at 11:13:31AM -0700, Linus Torvalds wrote: > On Thu, Jul 9, 2020 at 5:30 AM Herbert Xu wrote: > > > > I'm still getting the same warning even with the patch, for example: > > Are you building with W=1? > > There's a patch to move that broken -Wtype-limits thing to W=2. > >

Re: [PATCH v4 1/2] linux/bits.h: fix unsigned less than zero warnings

2020-07-09 Thread Linus Torvalds
On Thu, Jul 9, 2020 at 5:30 AM Herbert Xu wrote: > > I'm still getting the same warning even with the patch, for example: Are you building with W=1? There's a patch to move that broken -Wtype-limits thing to W=2. https://lore.kernel.org/lkml/20200708190756.16810-1-rikard.falkeb...@gmail.co

Re: [PATCH v4 1/2] linux/bits.h: fix unsigned less than zero warnings

2020-07-09 Thread Herbert Xu
Rikard Falkeborn wrote: > When calling the GENMASK and GENMASK_ULL macros with zero lower bit and > an unsigned unknown high bit, some gcc versions warn due to the > comparisons of the high and low bit in GENMASK_INPUT_CHECK. > > To silence the warnings, only perform the check if both inputs are

[PATCH v4 1/2] linux/bits.h: fix unsigned less than zero warnings

2020-06-20 Thread Rikard Falkeborn
When calling the GENMASK and GENMASK_ULL macros with zero lower bit and an unsigned unknown high bit, some gcc versions warn due to the comparisons of the high and low bit in GENMASK_INPUT_CHECK. To silence the warnings, only perform the check if both inputs are known. This does not trigger any wa