Re: [PATCH] tracing/osnoise: Fix sparse warning in function start_kthread

From: Daniel Bristot de Oliveira
Date: Tue Jan 04 2022 - 05:57:41 EST


On 1/4/22 10:48, Wang ShaoBo wrote:
> Change main to main_func to fix following sparse warning:
>
> kernel/trace/trace_osnoise.c: In function ‘start_kthread’:
> kernel/trace/trace_osnoise.c:1674:8: warning: ‘main’ is usually a function [-Wmain]
> void *main = osnoise_main;
> ^~~~

NAK!

This was already discussed... many times. The problem is not in the usage of
main as a variable name but in the tool that you are using. Try to fix your tool.

E.g., https://lore.kernel.org/lkml/20210813224131.25803-1-rdunlap@xxxxxxxxxxxxx/

-- Daniel