From: Michael Ellerman <mpe@ellerman•id.au>
To: Christophe Leroy <christophe.leroy@csgroup•eu>,
Rohan McLure <rmclure@linux•ibm.com>,
"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>
Subject: Re: [PATCH v2] powerpc: declare unmodified attribute_group usages const
Date: Sun, 06 Mar 2022 18:49:33 +1100 [thread overview]
Message-ID: <87ee3fo702.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <e111d334-6551-5eb9-f814-f072b4b1ba71@csgroup.eu>
Christophe Leroy <christophe.leroy@csgroup•eu> writes:
> Le 04/03/2022 à 01:21, Rohan McLure a écrit :
>> Inspired by (bd75b4ef4977: Constify static attribute_group structs),
>> accepted by linux-next, reported:
>> https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220210202805.7750-4-rikard.falkeborn@gmail.com/
>>
>> Nearly all singletons of type struct attribute_group are never
>> modified, and so
>> are candidates for being const. Declare them as const.
>>
>> Signed-off-by: Rohan McLure <rmclure@linux•ibm.com>
>> ---
>> arch/powerpc/perf/generic-compat-pmu.c | 4 ++--
>> arch/powerpc/perf/hv-24x7.c | 6 +++---
>> arch/powerpc/perf/hv-gpci.c | 8 ++++----
>> arch/powerpc/perf/imc-pmu.c | 6 +++---
>> arch/powerpc/perf/isa207-common.c | 2 +-
>> arch/powerpc/perf/power10-pmu.c | 6 +++---
>> arch/powerpc/perf/power7-pmu.c | 4 ++--
>> arch/powerpc/perf/power8-pmu.c | 4 ++--
>> arch/powerpc/perf/power9-pmu.c | 6 +++---
>> arch/powerpc/platforms/cell/cbe_thermal.c | 4 ++--
>> arch/powerpc/platforms/powernv/opal-core.c | 2 +-
>> arch/powerpc/platforms/powernv/opal-dump.c | 2 +-
>> arch/powerpc/platforms/powernv/opal-flash.c | 2 +-
>> arch/powerpc/platforms/pseries/papr_scm.c | 2 +-
>> arch/powerpc/platforms/pseries/power.c | 2 +-
>> 15 files changed, 30 insertions(+), 30 deletions(-)
>>
>
> /linux/arch/powerpc/platforms/cell/cbe_thermal.c: In function
> 'thermal_init':
> /linux/arch/powerpc/platforms/cell/cbe_thermal.c:370:26: error: passing
> argument 1 of 'spu_add_dev_attr_group' discards 'const' qualifier from
> pointer target type [-Werror=discarded-qualifiers]
> spu_add_dev_attr_group(&spu_attribute_group);
Hi Rohan,
If you follow the instructions here:
https://github.com/linuxppc/wiki/wiki/Testing-with-GitHub-Actions
You can get some automatic build tests done before you post, which would
have caught this.
cheers
prev parent reply other threads:[~2022-03-06 7:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 0:21 [PATCH v2] powerpc: declare unmodified attribute_group usages const Rohan McLure
2022-03-04 13:12 ` Christophe Leroy
2022-03-06 7:49 ` Michael Ellerman [this message]
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=87ee3fo702.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=christophe.leroy@csgroup$(echo .)eu \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=rmclure@linux$(echo .)ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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