Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3398089ybp; Sun, 6 Oct 2019 11:03:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwczCxDUqTgyJQxXlSGdxaGdam/gjRPtCsedpwYJy33NUc+Bp8z4xRq19mF3Pguz/v7Tpin X-Received: by 2002:a17:906:1991:: with SMTP id g17mr20231636ejd.220.1570385003306; Sun, 06 Oct 2019 11:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570385003; cv=none; d=google.com; s=arc-20160816; b=HLQ1vtJ5EKf6iNwwsu7m3UWzzuA6nRTSL6VnUFJ6wonK0LDimvZDM6TSqkigo/AbnY csJ7KQFwcPFMvNy6+7Yuq5oGWfSKsZs5RhCz9qhNcd7V9dK6iwiPPDFy4PanN1B9rINk JPdiZ7JBCfyl3P3TnZjIaRK77SYqM3go2+QhYWO5X+Xot0vw5An64ZGjCh0Mn4BWiBUu /AJfDvHxyzfOZ7QHZKmmeFbKA9F3LVagresGW3Edyeb9Gr/Cm9bEqX87uHe2POJHuQM7 dIksrV2AZ8Z8ciEuxShRuCUFPbjg8Uz45I+7jQLVjeN2DVJtFkQHTOcAuyft7lJSe4nL w7Jg== 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=CgwL4hJCI5ee987j46Dkknf3HZ9Q98BVIvHBHDBJd00=; b=F2tpRON7RVZHlbpvJgGkAeG84IIQF5QPX5SYijKuvvPIzDf2RHyFiKaV/OaRUF/bxb P64jPpu8ZXcRon0kYPS0wZ+jeyWfm8gQ4+yTtE2YDuQ1gvxhe9YDHeIvisS56foumMl7 pvuyCRfildmk/ftil6MCrcpvqSG5qJLLXFgBaRiCSvqUJ+hQA0H72hz4CXArNJkTIp27 tgOCAqygXFOktPgXEXNzSpgqVSNDTDfN0J6OJFsI2OEGtpTYY5yTL3rsP7og324IloPT bUlCBZ3SicJ2UekUYKo2QaDM38pkzqztV5KoCfb+Xvdg0sfIGmqBL8VQTjrimiovpNVo 6IAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UpE+fOHo; 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 w5si7496733edf.283.2019.10.06.11.02.59; Sun, 06 Oct 2019 11:03:23 -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=UpE+fOHo; 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 S1728196AbfJFR0I (ORCPT + 99 others); Sun, 6 Oct 2019 13:26:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:50998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728151AbfJFR0A (ORCPT ); Sun, 6 Oct 2019 13:26:00 -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 EAB4C2077B; Sun, 6 Oct 2019 17:25:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570382759; bh=P3WkhO3G6h+D3zdNU95Zo/yNNpyRu695qymatgVIGik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UpE+fOHogjwZ1Tk+dnHokcEZ7teKN7WYoanStW4QDtEt0EPIqRUn4Opx5B3X1ZlLq L+uyL2BLqlfABXrFgr4uDYDkrFEYde8i8SRIJd4K2F2jdEpSJy3rrL6tZabUZTpbLi mxzwD8NeO+s1Ng2ZKK9L3aHUCb3unRipH0eWIvuk= 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 4.14 29/68] MIPS: tlbex: Explicitly cast _PAGE_NO_EXEC to a boolean Date: Sun, 6 Oct 2019 19:21:05 +0200 Message-Id: <20191006171121.475693129@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171108.150129403@linuxfoundation.org> References: <20191006171108.150129403@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 c2a6869418f77..dc495578d44d3 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c @@ -634,7 +634,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