[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MWHPR2201MB127735989B4545BE3F64C566C1D30@MWHPR2201MB1277.namprd22.prod.outlook.com>
Date: Mon, 12 Aug 2019 04:47:19 +0000
From: Paul Burton <paul.burton@...s.com>
To: Nathan Chancellor <natechancellor@...il.com>
CC: Ralf Baechle <ralf@...ux-mips.org>,
Paul Burton <pburton@...ecomp.com>,
James Hogan <jhogan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
"linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"clang-built-linux@...glegroups.com"
<clang-built-linux@...glegroups.com>,
Nathan Chancellor <natechancellor@...il.com>,
"linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>
Subject: Re: [PATCH 2/5] MIPS/ptrace: Update mips_get_syscall_arg's return
type
Hello,
Nathan Chancellor wrote:
> clang warns:
>
> arch/mips/include/asm/syscall.h:136:3: error: variable 'ret' is
> uninitialized when used here [-Werror,-Wuninitialized]
> ret |= mips_get_syscall_arg(args++, task, regs, i++);
> ^~~
> arch/mips/include/asm/syscall.h:129:9: note: initialize the variable
> 'ret' to silence this warning
> int ret;
> ^
> = 0
> 1 error generated.
>
> It's not wrong; however, it's not an issue in practice because ret is
> only assigned to, not read from. ret could just be initialized to zero
> but looking into it further, ret has been unused since it was first
> added in 2012 so just get rid of it and update mips_get_syscall_arg's
> return type since none of the return values are ever checked. If it is
> ever needed again, this commit can be reverted and ret can be properly
> initialized.
Applied to mips-next.
> commit 077ff3be06e8
> https://git.kernel.org/mips/c/077ff3be06e8
>
> Fixes: c0ff3c53d4f9 ("MIPS: Enable HAVE_ARCH_TRACEHOOK.")
> Link: https://github.com/ClangBuiltLinux/linux/issues/604
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> Signed-off-by: Paul Burton <paul.burton@...s.com>
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email paul.burton@...s.com to report it. ]
Powered by blists - more mailing lists