[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+7wUswq0nDfo7d7F_+v+bMXZUSr0ZQ7QbOTdxmLGp4_SK7xBw@mail.gmail.com>
Date: Thu, 23 May 2019 13:49:41 +0200
From: Mathieu Malaterre <malat@...ian.org>
To: Michael Ellerman <mpe@...erman.id.au>
Cc: Christophe Leroy <christophe.leroy@....fr>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] powerpc/32: sstep: Move variable `rc` within
CONFIG_PPC64 sentinels
ping ?
On Tue, Mar 12, 2019 at 10:23 PM Mathieu Malaterre <malat@...ian.org> wrote:
>
> Fix warnings treated as errors with W=1:
>
> arch/powerpc/lib/sstep.c:1172:31: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
>
> Suggested-by: Christophe Leroy <christophe.leroy@....fr>
> Signed-off-by: Mathieu Malaterre <malat@...ian.org>
> ---
> v2: as suggested prefer CONFIG_PPC64 sentinel instead of unused keyword
>
> arch/powerpc/lib/sstep.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
> index 3d33fb509ef4..9996dc7a0b46 100644
> --- a/arch/powerpc/lib/sstep.c
> +++ b/arch/powerpc/lib/sstep.c
> @@ -1169,7 +1169,10 @@ static nokprobe_inline int trap_compare(long v1, long v2)
> int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
> unsigned int instr)
> {
> - unsigned int opcode, ra, rb, rc, rd, spr, u;
> + unsigned int opcode, ra, rb, rd, spr, u;
> +#ifdef CONFIG_PPC64
> + unsigned int rc;
> +#endif
> unsigned long int imm;
> unsigned long int val, val2;
> unsigned int mb, me, sh;
> @@ -1292,7 +1295,9 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
> rd = (instr >> 21) & 0x1f;
> ra = (instr >> 16) & 0x1f;
> rb = (instr >> 11) & 0x1f;
> +#ifdef CONFIG_PPC64
> rc = (instr >> 6) & 0x1f;
> +#endif
>
> switch (opcode) {
> #ifdef __powerpc64__
> --
> 2.20.1
>
Powered by blists - more mailing lists