Re: [PATCH] compiler.h: Support 64-bit bitwise types in is_signed_type()
From: David Laight
Date: Wed Nov 18 2026 - 07:13:47 EST
On Tue, 17 Nov 2026 08:32:11 -0800
Bart Van Assche <bvanassche@xxxxxxx> wrote:
> On 11/17/26 12:06 AM, David Laight wrote:
> > Don't the trace definitions need fixing?
> > The trace code prints the numeric value so you really want a host
> > ordered value in the trace record.
> >
> > An alternative view is that even asking the question 'is_signed_type'
> > of a bitwise variable makes no sense.
> Are you perhaps suggesting that we should tell ftrace users that it is
> no longer allowed to declare __le64 fields, something they probably
> would not consider reasonable? Please let me know if I misunderstood
> your question. Below is an incomplete overview of the examples of __le64
> tracing fields (__le64 typedefs have been ignored):
>
> $ git grep -nHF '__field(__le64'
> net/ieee802154/trace.h:74: __field(__le64, extended_addr)
> net/ieee802154/trace.h:367: __field(__le64, addr)
> net/ieee802154/trace.h:386: __field(__le64, addr)
> net/mac80211/trace.h:2507: __field(__le64, twt)
> net/mac802154/trace.h:191: __field(__le64, extended_addr)
> net/mac802154/trace.h:272: __field(__le64, addr)
The fields ought to be u64 - since that is how they are printed.
So the copy should either contain an lexxtoh() or a 'force' cast.
The same is really true for le16 and le32.
David
>
> Thanks,
>
> Bart.
>