Messages in this thread | | | Date | Thu, 20 Jan 2022 10:54:50 -0500 | From | Johannes Weiner <> | Subject | Re: [PATCH 2/2] psi: Fix "defined but not used" warnings when CONFIG_PROC_FS=n |
| |
On Wed, Jan 19, 2022 at 02:39:40PM -0800, Suren Baghdasaryan wrote: > When CONFIG_PROC_FS is disabled psi code generates the following warnings: > > kernel/sched/psi.c:1364:30: warning: 'psi_cpu_proc_ops' defined but not used [-Wunused-const-variable=] > 1364 | static const struct proc_ops psi_cpu_proc_ops = { > | ^~~~~~~~~~~~~~~~ > kernel/sched/psi.c:1355:30: warning: 'psi_memory_proc_ops' defined but not used [-Wunused-const-variable=] > 1355 | static const struct proc_ops psi_memory_proc_ops = { > | ^~~~~~~~~~~~~~~~~~~ > kernel/sched/psi.c:1346:30: warning: 'psi_io_proc_ops' defined but not used [-Wunused-const-variable=] > 1346 | static const struct proc_ops psi_io_proc_ops = { > | ^~~~~~~~~~~~~~~ > > Make definitions of these structures and related functions conditional on > CONFIG_PROC_FS config. > > Fixes: 0e94682b73bf ("psi: introduce psi monitor") > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
| |