Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1186427ybf; Thu, 27 Feb 2020 06:30:41 -0800 (PST) X-Google-Smtp-Source: APXvYqy/FEciFemRl0O9bBKwY6EQ0kWm5tJwHoJ03B43RIu2a/3xg3f3Gcr5ehMwIzcPiCtVQCgZ X-Received: by 2002:aca:5f85:: with SMTP id t127mr3626531oib.1.1582813840988; Thu, 27 Feb 2020 06:30:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582813840; cv=none; d=google.com; s=arc-20160816; b=D1OPPr6oWjxY1/Dfvzpp+nZP+J0eUxc6+JZ7sAAF2du4tuV4sl5+Ik7J1s74HeEyxS I22DQyLB90HtBIlVAdIOXah8x0C8/doPFxLd8oHw8pybQknisu9cG4BLk5v5AadHiWqZ nIygPZOuz9l+kp24BOIGfx6H7Yt9ZJDraXEc2DM/n+yIKWqsx7QIOfstiq8f0dortv0A DpKbbOjJ/rr85tQ/IIstsMZodZ0q+eAkM3JcYRT2BcN4XjRPr9G9Xak1QIFfijmxdhqT I9HCfCJ5zqRQQKmIez0lhoaDo4WjaKtoLvcSsH2r0kUGY7sNhQvCvrvP4X2v5pW7yYX8 7WEg== 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=t8XsKuvjnJHRD5MV1WWsiu1bpkoKAUpvjFWNKwkYlFsFVH+lTPcvySzzQsXxO/IW3u QaE65KDjovF8vP2t9wN9xVZZCgQ7sqzXaH47MTtAQbGX2mfa1dt4jyGVtJrFnzQ/EGoI bODpHjq0HBTv8SavUa+KxFRZjcDlmbW8FivssaDDjeUlA0UvAMZyNL4x/z6mtTz83qBP IlhkKroW+RoXm684oOMsxvpdeWUMI9CnYbTSLxflG3GmTFrHG+panvhEuO75PEkScFZT TXm71fjQ+/6A4ZuLs0/3DjyW5El6+1gRpJLVM1kFeB4orIBzPRiSIR5y2UK3cEaETuzL F1tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MzkmDm3r; 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 n21si1356581oic.0.2020.02.27.06.30.28; Thu, 27 Feb 2020 06:30:40 -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=MzkmDm3r; 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 S2388048AbgB0O3S (ORCPT + 99 others); Thu, 27 Feb 2020 09:29:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:43830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387930AbgB0OGf (ORCPT ); Thu, 27 Feb 2020 09:06:35 -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 A8BE720578; Thu, 27 Feb 2020 14:06:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582812394; bh=4Q9zxIWr3nzH1lCkmXbXCZriRxQ09zVPUbdUTtpjbjc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MzkmDm3rmSgoQhfFGiUHd1iNVse1M665R89hnIJu+bB3aGFGzWw3DTmf/I5yszpGE JvzKek/QAFqYynV6HzU7JQpyxCgd1IYmoIylHXNLnQtprrS+Qe4Fy455mGgAHVaZyr CNtyWWypBlUA9491WiH3iojO9r/Kmo3M2gLZVz4A= 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 4.19 97/97] s390/mm: Explicitly compare PAGE_DEFAULT_KEY against zero in storage_key_init_range Date: Thu, 27 Feb 2020 14:37:45 +0100 Message-Id: <20200227132230.508261205@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132214.553656188@linuxfoundation.org> References: <20200227132214.553656188@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); }