Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3382338ybp; Sun, 6 Oct 2019 10:42:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxt91RMkGcpXCQwu/kBYaOMPJxTLooDKXsZokUitpPWmqB/fBIDEGESJBsp6z/SumrzGwSM X-Received: by 2002:a05:6402:2054:: with SMTP id bc20mr26446091edb.55.1570383739103; Sun, 06 Oct 2019 10:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570383739; cv=none; d=google.com; s=arc-20160816; b=VTvhYW4UY3qDvSw81UCUyl8/VMtX9oB42GrvI7nXSzHuKUuYfBbKF4pZTb7pA+30Yw 5D+ymfN7o4+5J8cW8ChUdyQaMzxTDileRm+/7g1t63yihln/jhNFJBylNl38ScrQdr90 HK7eeKrTe74oZ+Wi+Zs/SR59ngndbic0SwAXbxYAEACNpRjT0E1bUc9lGwqFQ8Cn/X+b nI+yT/77cB+c64B6OMaGJvFoZsiaEIxXXeQKSO8i0kgx7tBd6ne2gZcErBpo+u+Sr9XP JgzFSIS39q7p4OrqpgUTltHwDzGFdse6nQ8BV0QNkKpSt8mCfFQWu09VGzlsCCR7zjqT /tBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SmxCHXBv/cxR7WY4Zwm0Qt4mXayD63rzMadCl3XrK/M=; b=KwAOFByR3OVKGe9VwaRTJPirWUAgLvCcsqg3Tsob+48sA6WpcksTHE7Qmomc4KEjEP OHDa7ZYoWH5aGvgzi/QpIOe12ulq4VXf13GgYfDRhFLFa4P3q/eWU41NhH2BV/i1pDrJ x22OObOD704AtiL/Zc727gRL3C8RsAHerbp2nzmLF3qVXLtWT8tKkz9o9Gmw0oRlSwoO Az0GcQ0dtMPOrSR/1Cj7U3JDp7lRRn6nobkoQ8JSTio4M6iZmABkCEKQW34GUd+jkcq4 yzpwOpKfcNClxJ0XOC+5dCLNj31oxNJ6cPY4fUyojja4Vo7SJZx4jleZC4HQZKYSVG0A 1iRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z5WGwtLu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p15si5896641ejx.56.2019.10.06.10.41.54; Sun, 06 Oct 2019 10:42:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z5WGwtLu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730665AbfJFRio (ORCPT + 99 others); Sun, 6 Oct 2019 13:38:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:38060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730655AbfJFRim (ORCPT ); Sun, 6 Oct 2019 13:38:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F0F53214D9; Sun, 6 Oct 2019 17:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383521; bh=47e/QRH3Lx+tLsLUboT3gBgack0Ca/VqP2tRR39YmZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z5WGwtLuIGiG72btRD/637SMdpcsqw68MNMtlW5DOK6tY3kRiFrnzJA1Y4tG3p1Wr UCXee62XGSJ+rItaMztiLeUf+rqpHqddKbFp+iVvj71CUrX59J+pOiEHdy2owjkhot kOGhZcUb1AzPugqIFDYvGWt2x6+ryjf/bwf7pXTA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Paul Burton , Ralf Baechle , James Hogan , Nick Desaulniers , linux-mips@vger.kernel.org, clang-built-linux@googlegroups.com, Sasha Levin Subject: [PATCH 5.2 092/137] MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean Date: Sun, 6 Oct 2019 19:21:16 +0200 Message-Id: <20191006171216.522212342@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171209.403038733@linuxfoundation.org> References: <20191006171209.403038733@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 144ceb0fba88f..bece1264d1c5a 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -631,7 +631,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