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

From: Bart Van Assche

Date: Wed Sep 02 2026 - 13:25:10 EST


On 9/2/26 9:39 AM, Steven Rostedt wrote:
On Wed, 2 Sep 2026 09:31:41 -0700
Bart Van Assche <bvanassche@xxxxxxx> wrote:

$ git grep -nHE '__field.*(blk_opf_t|enum req_op)' include/trace
include/trace/events/f2fs.h:1185: __field(enum req_op, op)
include/trace/events/f2fs.h:1186: __field(blk_opf_t, op_flags)
include/trace/events/f2fs.h:1241: __field(enum req_op, op)
include/trace/events/f2fs.h:1242: __field(blk_opf_t, op_flags)
include/trace/events/jbd2.h:364: __field( blk_opf_t, write_flags )
include/trace/events/nilfs2.h:207: __field_struct(enum req_op, mode)

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?

Bart.