From: Paul Burton <paul.burton@mips.com>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Paul Burton <pburton@wavecomp.com>,
James Hogan <jhogan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"clang-built-linux@googlegroups.com"
<clang-built-linux@googlegroups.com>,
Nathan Chancellor <natechancellor@gmail.com>,
"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>
Subject: Re: [PATCH 2/5] MIPS/ptrace: Update mips_get_syscall_arg's return type
Date: Mon, 12 Aug 2019 04:47:19 +0000 [thread overview]
Message-ID: <MWHPR2201MB127735989B4545BE3F64C566C1D30@MWHPR2201MB1277.namprd22.prod.outlook.com> (raw)
In-Reply-To: <20190812033120.43013-3-natechancellor@gmail.com>
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@gmail.com>
> Signed-off-by: Paul Burton <paul.burton@mips.com>
Thanks,
Paul
[ This message was auto-generated; if you believe anything is incorrect
then please email paul.burton@mips.com to report it. ]
next prev parent reply other threads:[~2019-08-12 4:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 3:31 [PATCH 0/5] Clang build fixes for MIPS Nathan Chancellor
2019-08-12 3:31 ` [PATCH 1/5] MIPS: Don't use bc_false uninitialized in __mm_isBranchInstr Nathan Chancellor
2019-08-12 4:47 ` Paul Burton
2019-08-12 3:31 ` [PATCH 2/5] MIPS/ptrace: Update mips_get_syscall_arg's return type Nathan Chancellor
2019-08-12 4:47 ` Paul Burton [this message]
2019-08-12 3:31 ` [PATCH 3/5] lib/mpi: Fix for building for MIPS32 with Clang Nathan Chancellor
2019-08-12 5:23 ` Nathan Chancellor
2019-08-12 5:26 ` Nathan Chancellor
2019-08-12 12:28 ` Herbert Xu
2019-08-12 17:58 ` Paul Burton
2019-08-12 7:35 ` Jussi Kivilinna
2019-08-12 17:14 ` Nathan Chancellor
2019-08-12 19:40 ` Jussi Kivilinna
2019-08-12 19:45 ` Nathan Chancellor
2019-08-12 3:31 ` [PATCH 4/5] lib/mpi: Fix for building for MIPS64 " Nathan Chancellor
2019-08-12 5:25 ` Nathan Chancellor
2019-08-12 17:42 ` Nick Desaulniers
2019-08-12 17:45 ` Nathan Chancellor
2019-08-12 3:31 ` [PATCH 5/5] MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean Nathan Chancellor
2019-08-12 4:47 ` Paul Burton
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=MWHPR2201MB127735989B4545BE3F64C566C1D30@MWHPR2201MB1277.namprd22.prod.outlook.com \
--to=paul.burton@mips.com \
--cc=clang-built-linux@googlegroups.com \
--cc=jhogan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=pburton@wavecomp.com \
--cc=ralf@linux-mips.org \
/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).