From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CD9AC4360C for ; Sun, 29 Sep 2019 17:36:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 14F2721BE5 for ; Sun, 29 Sep 2019 17:36:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569778593; bh=bMhHC+db4nOccSOwhA0fo5dCCOAtbBpAxKWNgXMQHcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2cN/fnfHpzD6F41+Pkcb+CiTQG9DeIZNNuDu1S5btdnMCP34VKZiNyrXrN3SM5hDg giz/X5v6mtyWXD9VHE/YZWwXtHs5mlrrDoAeW01qbp0+tiooeJKSEBCMxGsb7ZDMi7 7y+Ex1R0KyAyI+/f3y7yJYIOzMMRMmXsgOwanvhU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730849AbfI2Rgc (ORCPT ); Sun, 29 Sep 2019 13:36:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:49104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730845AbfI2Rgb (ORCPT ); Sun, 29 Sep 2019 13:36:31 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2E9C621A4A; Sun, 29 Sep 2019 17:36:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569778591; bh=bMhHC+db4nOccSOwhA0fo5dCCOAtbBpAxKWNgXMQHcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GIxLEKoo9K6c5dh5OPm1zFMTqq3cPgLZd/ydl9WI2Cew+JYhSjr6wcVR1wcnjNzii lU1a/jktPt5jz6XCGwIOqZMSBAkRWK1d0YvFd4hPMEOK/WLlttz2Fbkwu50INQuCn1 qaDQVu0zlX2Tt+X7XnMHx+hklvqnqghD+zWRO3Es= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nathan Chancellor , Paul Burton , Ralf Baechle , James Hogan , Nick Desaulniers , linux-mips@vger.kernel.org, clang-built-linux@googlegroups.com, Sasha Levin Subject: [PATCH AUTOSEL 4.9 02/13] MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean Date: Sun, 29 Sep 2019 13:36:12 -0400 Message-Id: <20190929173625.10003-2-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190929173625.10003-1-sashal@kernel.org> References: <20190929173625.10003-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Nathan Chancellor [ Upstream commit c59ae0a1055127dd3828a88e111a0db59b254104 ] 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") Link: https://github.com/ClangBuiltLinux/linux/issues/609 Signed-off-by: Nathan Chancellor Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Nick Desaulniers Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: clang-built-linux@googlegroups.com Signed-off-by: Sasha Levin --- arch/mips/mm/tlbex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 3cc5b2e4263c0..47d50197789be 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -637,7 +637,7 @@ static __maybe_unused void build_convert_pte_to_entrylo(u32 **p, return; } - if (cpu_has_rixi && _PAGE_NO_EXEC) { + if (cpu_has_rixi && !!_PAGE_NO_EXEC) { if (fill_includes_sw_bits) { UASM_i_ROTR(p, reg, reg, ilog2(_PAGE_GLOBAL)); } else { -- 2.20.1