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

From: Steven Rostedt

Date: Wed Sep 02 2026 - 13:22:06 EST


On Wed, 2 Sep 2026 09:44:49 -0700
Bart Van Assche <bvanassche@xxxxxxx> wrote:

> > Perhaps these should be converted to normal types and assigned with
> > __force. There's no reason to have the value in the ring buffer be of a
> > __bitwise type.
>
> Yikes. Typecasts in general and __force casts in particular should be
> avoided whenever possible, isn't it?

It's recording a value into a ring buffer to be read by user space tooling
that is figuring out how to read it via the format files (the thing that
uses is_signed_type()).

What use does using __bitwise have with that?

If anything, using __bitwise in the field makes things much worse, as you
are finding out now.

-- Steve