Re: [f2fs-dev] [PATCH] f2fs: Fix multiple sparse warnings

Bart Van Assche via Linux-f2fs-devel <[email protected]> Fri, 7 Aug 2026 12:53:05 -0700
Newsgroups net.sourceforge.lists.linux-f2fs-devel
Message-ID <[email protected]>
On 8/7/26 12:33 PM, Steven Rostedt wrote:
> On Fri,  7 Aug 2026 10:10:56 -0700
> Bart Van Assche <[email protected]> wrote:
> 
>> diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
>> index 270c1a2c24c4..7f5ce92afe0f 100644
>> --- a/include/trace/events/f2fs.h
>> +++ b/include/trace/events/f2fs.h
>> @@ -1493,7 +1493,8 @@ DECLARE_EVENT_CLASS(f2fs_mmap,
>>   		show_dev_ino(__entry),
>>   		(unsigned long)__entry->index,
>>   		__print_flags(__entry->flags, "|", FAULT_FLAG_TRACE),
>> -		__print_flags(__entry->ret, "|", VM_FAULT_RESULT_TRACE))
>> +		__print_flags((__force unsigned long)__entry->ret, "|",
>> +			      VM_FAULT_RESULT_TRACE))
>>   );
>>   
>>   DEFINE_EVENT(f2fs_mmap, f2fs_filemap_fault,
> 
> The above shows up in the tracefs file for this event. Can you make sure
> libtraceevent still parses it fine? (Check with trace-cmd to see if it
> fails to parse the event).

Hi Steve,

This is what I found in include/trace/stages/stage3_trace_output.h:

#undef __print_flags
#define __print_flags(flag, delim, flag_array...)					\
	({										\
		static const struct trace_print_flags __flags[] =			\
			{ flag_array };							\
		trace_print_flags_seq(p, delim, flag, __flags, ARRAY_SIZE(__flags));	\
	})

I don't see #flag anywhere. trace_print_flags_seq() is a C function. Is
my understanding correct that the above change only suppresses a sparse
warning and also that it doesn't affect the tracing output in any way?

Please let me know if I misunderstood your question.

Thanks,

Bart.


_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel