Messages in this thread | | | Date | Tue, 4 Jan 2022 11:12:15 +0100 | Subject | Re: [PATCH] tracing/osnoise: Fix sparse warning in function start_kthread | From | Daniel Bristot de Oliveira <> |
| |
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@infradead.org/
-- Daniel
| |