Re: [PATCH net-next v3 1/4] net: dsa: yt921x: Use *_ULL bitfield macros for VLAN_CTRL
From: david laight <hidden>
Date: 2025-11-28 10:52:03
Also in:
lkml
From: david laight <hidden>
Date: 2025-11-28 10:52:03
Also in:
lkml
On Wed, 26 Nov 2025 17:32:34 +0800 David Yang [off-list ref] wrote:
VLAN_CTRL should be treated as a 64-bit register. GENMASK and BIT macros use unsigned long as the underlying type, which will result in a build error on architectures where sizeof(long) == 4.
I suspect GENMASK() should generate u32 or u64 depending on the value of a constant 'high bit'. I found code elsewhere that doesn't really want FIELD_PREP() to generate a 64bit value. There are actually a lot of dubious uses of 'long' throughout the kernel that break on 32bit. (Actually pretty much all of them!) David