[PATCH v4 05/17] module: Switch load_info::len to size_t
Thomas Weißschuh
linux at weissschuh.net
Fri Feb 6 19:38:07 AEDT 2026
On 2026-02-06 09:30:08+0100, Nicolas Schier wrote:
> On Tue, Jan 13, 2026 at 01:28:49PM +0100, Thomas Weißschuh wrote:
> > Switching the types will make some later changes cleaner.
> > size_t is also the semantically correct type for this field.
> >
> > As both 'size_t' and 'unsigned int' are always the same size, this
> > should be risk-free.
>
> include/uapi/asm-generic/posix_types.h states:
> | * Most 32 bit architectures use "unsigned int" size_t,
> | * and all 64 bit architectures use "unsigned long" size_t.
>
> Is that statement wrong? Or did I mix up the context?
That statement is correct. But as both 'unsigned int' and 'unsigned
long' are 32-bit wide on 32-bit Linux platforms they are compatible.
Thomas
More information about the Linuxppc-dev
mailing list