lkml.org 
[lkml]   [2022]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n
On Sun, Mar 6, 2022 at 9:04 PM Christophe Leroy
<christophe.leroy@csgroup.eu> wrote:
> Le 05/03/2022 à 13:31, YueHaibing a écrit :
> > arch/powerpc/platforms/cell/spufs/sched.c:1055:12: warning: ‘show_spu_loadavg’ defined but not used [-Wunused-function]
> > static int show_spu_loadavg(struct seq_file *s, void *private)
> > ^~~~~~~~~~~~~~~~
> >
> > Mark this as __maybe_unused to fix this.
>
> Marking it as __maybe_unused doesn't fix it. It just pushes the dust
> under the carpet.
>
> proc_create_single macro should be fix to avoid that warning.

We discussed that when proc_create_single() was introduced, but ended up
not doing it that way because there were already a lot of files using an #ifdef
around the function definitions. To change it back, one would have to audit
every user of proc_create_single() and remove the #ifdefs.

Arnd

\
 
 \ /
  Last update: 2022-03-07 14:13    [W:0.053 / U:3.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site