mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Arnd Bergmann <arnd@arndb.de>
Cc: YueHaibing <yuehaibing@huawei.com>,
	"jk@ozlabs.org" <jk@ozlabs.org>,
	"mpe@ellerman.id.au" <mpe@ellerman.id.au>,
	"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
	"paulus@samba.org" <paulus@samba.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] powerpc/spufs: Fix build warning when CONFIG_PROC_FS=n
Date: Mon, 7 Mar 2022 13:30:22 +0000	[thread overview]
Message-ID: <16b319ec-3d87-7ac1-6bc3-d6679e639426@csgroup.eu> (raw)
In-Reply-To: <CAK8P3a2p+Yryg1y5h=kTLP72WGYc2d4qctFuW+opR6F=1uYJPw@mail.gmail.com>



Le 07/03/2022 à 14:10, Arnd Bergmann a écrit :
> 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.
> 

Fair enough.

In that case, I'd prefer to go for a #ifdef as well for 
show_spu_loadavg() instead of going for a __maybe_unused flag.

Christophe

  reply	other threads:[~2022-03-07 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-05 12:31 YueHaibing
2022-03-06 20:04 ` Christophe Leroy
2022-03-07 13:10   ` Arnd Bergmann
2022-03-07 13:30     ` Christophe Leroy [this message]
2022-03-08  9:51       ` YueHaibing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16b319ec-3d87-7ac1-6bc3-d6679e639426@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=jk@ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®