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 5/5] MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean Date: Mon, 12 Aug 2019 04:47:24 +0000 Message-ID: <MWHPR2201MB1277133CC3B57F621F359C42C1D30@MWHPR2201MB1277.namprd22.prod.outlook.com> (raw) In-Reply-To: <20190812033120.43013-6-natechancellor@gmail.com> Hello, Nathan Chancellor wrote: > clang warns: > > arch/mips/mm/tlbex.c:634:19: error: use of logical '&&' with constant > operand [-Werror,-Wconstant-logical-operand] > if (cpu_has_rixi && _PAGE_NO_EXEC) { > ^ ~~~~~~~~~~~~~ > arch/mips/mm/tlbex.c:634:19: note: use '&' for a bitwise operation > if (cpu_has_rixi && _PAGE_NO_EXEC) { > ^~ > & > arch/mips/mm/tlbex.c:634:19: note: remove constant to silence this > warning > if (cpu_has_rixi && _PAGE_NO_EXEC) { > ~^~~~~~~~~~~~~~~~ > 1 error generated. > > Explicitly cast this value to a boolean so that clang understands we > intend for this to be a non-zero value. > > Fixes: 00bf1c691d08 ("MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields") Applied to mips-next. > commit c59ae0a10551 > https://git.kernel.org/mips/c/c59ae0a10551 > > Fixes: 00bf1c691d08 ("MIPS: tlbex: Avoid placing software PTE bits in Entry* PFN fields") > Link: https://github.com/ClangBuiltLinux/linux/issues/609 > 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. ]
prev parent reply index 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 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 [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=MWHPR2201MB1277133CC3B57F621F359C42C1D30@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
Linux-MIPS Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \ linux-mips@vger.kernel.org public-inbox-index linux-mips Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips AGPL code for this site: git clone https://public-inbox.org/public-inbox.git