Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] trace: Fix some checker warnings | Date | Mon, 05 Dec 2022 08:28:35 +0000 |
| |
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> > +#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) > > static const struct file_operations tracing_max_lat_fops; > > +#endif > > Oops, I missed this part. Why did you introduced this #ifdefs?
Because:
#if defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER) static const struct file_operations tracing_max_lat_fops = {
in the same file. You get something like an unused symbol warning otherwise if neither config option is defined.
David
| |