lkml.org 
[lkml]   [2022]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] psi: Fix "no previous prototype" warnings when CONFIG_CGROUPS=n
On Wed, Jan 19, 2022 at 02:39:39PM -0800, Suren Baghdasaryan wrote:
> When CONFIG_CGROUPS is disabled psi code generates the following warnings:
>
> kernel/sched/psi.c:1112:21: warning: no previous prototype for 'psi_trigger_create' [-Wmissing-prototypes]
> 1112 | struct psi_trigger *psi_trigger_create(struct psi_group *group,
> | ^~~~~~~~~~~~~~~~~~
> kernel/sched/psi.c:1182:6: warning: no previous prototype for 'psi_trigger_destroy' [-Wmissing-prototypes]
> 1182 | void psi_trigger_destroy(struct psi_trigger *t)
> | ^~~~~~~~~~~~~~~~~~~
> kernel/sched/psi.c:1249:10: warning: no previous prototype for 'psi_trigger_poll' [-Wmissing-prototypes]
> 1249 | __poll_t psi_trigger_poll(void **trigger_ptr,
> | ^~~~~~~~~~~~~~~~
>
> Change declarations of these functions in the header to provide the
> prototypes even when they are unused.
>
> 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>

For a second I was confused by the "unused" in the changelog. The
functions themselves are used unconditionally: by the internal
/proc/pressure/* implementation. But I suppose that usage wouldn't
need the prototypes - hence unused prototypes.

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