From: Christophe Leroy <christophe.leroy@c-s.fr>
To: YueHaibing <yuehaibing@huawei.com>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
paulus@samba.org
Subject: Re: [PATCH -next] powerpc/pmac/smp: Fix old-style declaration
Date: Thu, 26 Dec 2019 22:22:02 +0100 [thread overview]
Message-ID: <20191226222202.Horde.0xaecj7x1FoNwm4fHxlH0Q2@messagerie.si.c-s.fr> (raw)
In-Reply-To: <20191225114943.17216-1-yuehaibing@huawei.com>
YueHaibing <yuehaibing@huawei.com> a écrit :
> There expect the 'static' keyword to come first in a declaration
>
> arch/powerpc/platforms/powermac/smp.c:664:1: warning: static is not
> at beginning of declaration [-Wold-style-declaration]
> arch/powerpc/platforms/powermac/smp.c:665:1: warning: static is not
> at beginning of declaration [-Wold-style-declaration]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> arch/powerpc/platforms/powermac/smp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powermac/smp.c
> b/arch/powerpc/platforms/powermac/smp.c
> index f95fbde..7233b85 100644
> --- a/arch/powerpc/platforms/powermac/smp.c
> +++ b/arch/powerpc/platforms/powermac/smp.c
> @@ -661,8 +661,8 @@ static void smp_core99_gpio_tb_freeze(int freeze)
> #endif /* !CONFIG_PPC64 */
>
> /* L2 and L3 cache settings to pass from CPU0 to CPU1 on G4 cpus */
> -volatile static long int core99_l2_cache;
> -volatile static long int core99_l3_cache;
> +static volatile long int core99_l2_cache;
> +static volatile long int core99_l3_cache;
Is it correct to declare it as volatile ?
See
https://www.kernel.org/doc/html/latest/process/volatile-considered-harmful.html
Christophe
next prev parent reply other threads:[~2019-12-26 21:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-25 11:49 [PATCH -next] powerpc/pmac/smp: Fix old-style declaration YueHaibing
2019-12-26 21:22 ` Christophe Leroy [this message]
2020-01-14 6:38 ` Michael Ellerman
2020-03-03 8:56 ` [PATCH v2 -next] powerpc/pmac/smp: drop unnecessary volatile qualifier YueHaibing
2020-03-03 8:59 ` Christophe Leroy
2020-03-17 13:14 ` Michael Ellerman
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=20191226222202.Horde.0xaecj7x1FoNwm4fHxlH0Q2@messagerie.si.c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--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;
as well as URLs for NNTP newsgroup(s).