Messages in this thread | | | Date | Thu, 20 Jan 2022 10:53:15 -0500 | From | Johannes Weiner <> | Subject | Re: [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.
| |