Re: [PATCH v2] tracing: Make is_signed_type() compatible with sparse

From: Bart Van Assche

Date: Wed Sep 02 2026 - 18:41:06 EST


On 9/2/26 1:50 PM, David Laight wrote:
It seems to be an attempt to generate strongly typed integers, but it doesn't
stop you mixing up the values between the fields - there is only one kind
of __bitwise.

That's wrong. Every __bitwise type is treated as a different type by
sparse. Otherwise e.g. __le32 and __be32 would be treated as the same
type by sparse.

$ git grep 'typedef.*__bitwise.*__[lb]e.*;' include
include/uapi/linux/types.h:typedef __u16 __bitwise __le16;
include/uapi/linux/types.h:typedef __u16 __bitwise __be16;
include/uapi/linux/types.h:typedef __u32 __bitwise __le32;
include/uapi/linux/types.h:typedef __u32 __bitwise __be32;
include/uapi/linux/types.h:typedef __u64 __bitwise __le64;
include/uapi/linux/types.h:typedef __u64 __bitwise __be64;

Bart.