Re: [PATCH 4/4] asm-generic/bitsperlong.h: Add sanity checks for __BITS_PER_LONG

Arnd Bergmann
2026-01-19T12:45:27Z

On Mon, Jan 19, 2026, at 11:56, Thomas Weißschuh wrote:
> On Mon, Jan 19, 2026 at 10:37:58AM +0000, David Laight wrote:
>>
>> Don't you need a check that it isn't wrong on a user system?
>> Which is what I thought it was doing.
>
> Not really. The overrides defined by arch/*/include/uapi/asm/bitsperlong.h are
> being tested here. If they work in the kernel build I assume they also work
> in userspace.

I think You could just move check into include/asm-generic/bitsperlong.h
to make this more obvious with the #ifdef __KERNEL__, and remove the
disabled check from my original version there.

Arnd