lkml.org 
[lkml]   [2022]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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>

\
 
 \ /
  Last update: 2022-01-20 16:55    [W:0.235 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site