Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1167539ybf; Thu, 27 Feb 2020 06:13:50 -0800 (PST) X-Google-Smtp-Source: APXvYqww2iswWFei7VXrslaBjs6yC/a6j6DBwYjUYZj051Gk7DSv4kOt6tjQF05oaFKMirYc5Vzx X-Received: by 2002:aca:ec02:: with SMTP id k2mr1294611oih.105.1582812830307; Thu, 27 Feb 2020 06:13:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582812830; cv=none; d=google.com; s=arc-20160816; b=etToRcJYbQ75AlAmmg6abxSKeqHTPxSYC3FilfbNFBtW6iOZLeSKM6YUZ/sbIHZJEG WJYJiR/bV22t0TBAgjhKIoXiEBH9hI58opgcyooQG8ymKyX/iubBpXIMRRJ2hPD91wWj 6YLCjKcUOf8xYWP9/HAa4d34nLL2O1dS96qzEMjqgAnZAngDO/KjlhujK6m3T7Iqst5X eboqe3TE8NphTbB002Aub7nxF2BzeeBBzHxYtkH6WCluYdA4DP/qxHeQ9QTS0CeokA0+ MA7G35U8tPd48ndyoClMQ3ED07Wz8dz6Bs/tmkUJYGIQb6i9sblFfwZEGMcj5MbUawl1 e4DA== 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=6ga+pvs5tF2bfu6spBUbAHX8nYFsKBKKMG0CZSyYJY0=; b=0vccso40eqs5sDEIzKlLWilPw+XDtWSbm1/HfqSj1cptD49VimFEFHj/Fv4szdnVRI x0y8vCmEK3MOJcqtua3k3H6CYV/KuN1nHQhfPTx4B7u60VoxrgG4Vrk68Nie56Peo1rh hpf5gTGSByWFKs8iFdXdr7dvI2awdpSwxEHZX9LHKOnqP72RW+8ZcILmqL7wxitz5cP2 zaw/kHsTsK4wdkqeSQpGJfzD09cqKbjWme+hMNwftws5QOiTAmDD5lWtL7hZ1jfOzMb+ hDS4YFMJ+w6s2yG93+IX2LLb7VdTnrXqtONk0Ko53orHgcwRYU9cbSJYcU0azKJYDizl UezA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UPgr5yIr; 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 24si991814oij.155.2020.02.27.06.13.38; Thu, 27 Feb 2020 06:13:50 -0800 (PST) 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=UPgr5yIr; 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 S2388647AbgB0OM2 (ORCPT + 99 others); Thu, 27 Feb 2020 09:12:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:51054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388841AbgB0OMZ (ORCPT ); Thu, 27 Feb 2020 09:12:25 -0500 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 CAB4120578; Thu, 27 Feb 2020 14:12:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582812744; bh=4Q9zxIWr3nzH1lCkmXbXCZriRxQ09zVPUbdUTtpjbjc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UPgr5yIrbWe1RpqRxCrqX18MIS/QQYpaY3pTTzZxC9mLNyxMAUzFKxsgGUM7aQwOn jr4ar2Mwf9tfYdXFfid0Um4Yevkcj6AjWfHacOtemjfeQWxbgsiF7GvQvvfRcSbhXP xTpxNOKhEd1c6gZR35UZRx+L3NvjuaC0ISpR6XAM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christian Borntraeger , Nathan Chancellor , Vasily Gorbik Subject: [PATCH 5.4 134/135] s390/mm: Explicitly compare PAGE_DEFAULT_KEY against zero in storage_key_init_range Date: Thu, 27 Feb 2020 14:37:54 +0100 Message-Id: <20200227132249.162136009@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132228.710492098@linuxfoundation.org> References: <20200227132228.710492098@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 commit 380324734956c64cd060e1db4304f3117ac15809 upstream. Clang warns: In file included from ../arch/s390/purgatory/purgatory.c:10: In file included from ../include/linux/kexec.h:18: In file included from ../include/linux/crash_core.h:6: In file included from ../include/linux/elfcore.h:5: In file included from ../include/linux/user.h:1: In file included from ../arch/s390/include/asm/user.h:11: ../arch/s390/include/asm/page.h:45:6: warning: converting the result of '<<' to a boolean always evaluates to false [-Wtautological-constant-compare] if (PAGE_DEFAULT_KEY) ^ ../arch/s390/include/asm/page.h:23:44: note: expanded from macro 'PAGE_DEFAULT_KEY' #define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4) ^ 1 warning generated. Explicitly compare this against zero to silence the warning as it is intended to be used in a boolean context. Fixes: de3fa841e429 ("s390/mm: fix compile for PAGE_DEFAULT_KEY != 0") Link: https://github.com/ClangBuiltLinux/linux/issues/860 Link: https://lkml.kernel.org/r/20200214064207.10381-1-natechancellor@gmail.com Acked-by: Christian Borntraeger Signed-off-by: Nathan Chancellor Signed-off-by: Vasily Gorbik Signed-off-by: Greg Kroah-Hartman --- arch/s390/include/asm/page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/include/asm/page.h +++ b/arch/s390/include/asm/page.h @@ -42,7 +42,7 @@ void __storage_key_init_range(unsigned l static inline void storage_key_init_range(unsigned long start, unsigned long end) { - if (PAGE_DEFAULT_KEY) + if (PAGE_DEFAULT_KEY != 0) __storage_key_init_range(start, end); }