Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4955727ybv; Mon, 17 Feb 2020 09:10:12 -0800 (PST) X-Google-Smtp-Source: APXvYqzzOjLLzlBjB3Xobvtarh83GRS0YcJ+ZKeEOUbcBxJsRTfwnuEpovmvAkeA6imzMk0b531j X-Received: by 2002:aca:af50:: with SMTP id y77mr59218oie.8.1581959412652; Mon, 17 Feb 2020 09:10:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581959412; cv=none; d=google.com; s=arc-20160816; b=pnmAUEhY7hgbTAVIqyRL1tSMbNZeHMEfvImwuEWF7ApaNWbbpihpOlz+ai0kgBmlaD xfNFrr+HBFsYacgKD8ekruN77G9sXwZrq7NfF3cG3FYvK1HHiNwdA7kRL2u2Nz/Hn1bw EsM1oH38lhakENQaUSLui+WVBJZZ6rAXwKL9MH4l9toopSqXQwDHxmSQMfPtmn5aqMeH nlMaOGvlhOusdRZFVaN3iM+pfHzXnVAbN+tsssdSngEO1OeRf7dew9r52fNe9UUQwPaL tWiODHghLfYkm1/zh3YEka6cWi9GpBx34Ecs5ir4VeiOHO5uNyJCjASFN5DfLdFhSyEW sFVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=axJxrCQrgSCw0ypzmp/r4DKjnBEUoosAYdEdvFxKUyM=; b=qbEeQEq3XPjLj/03njYrb0jClGjItPA3yeT+RZQ0J8cbWu8JkMAsKPFALK1u255b8R us/31pGdHtYxgQc4f3PkX+FYuNFCt4MokQLnBHSGWKJAf0Ni6VBzlbEX12HSNoCyfHJJ l/VWQd68/EhyX3GmOc4d93NFUioskBpNodV2KAun5+WmkxQfVMIeuyp27RIef2McHVVw jwtrpQyWVRXWdkrfjXju4tdwNsWtFv/1gEs/9vnuhRcYiPiRSz0ai5B3YMwXkPjaXF/S MeEDnDmZWgLxCz5rNKda7xlDyFA93uJpZ6kHbvyH5S5biJWV2fUOS3Qlxrpv7ukF5vXP bzXQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l21si438908otd.1.2020.02.17.09.10.00; Mon, 17 Feb 2020 09:10:12 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729021AbgBQRHn (ORCPT + 99 others); Mon, 17 Feb 2020 12:07:43 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:26846 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726707AbgBQRHm (ORCPT ); Mon, 17 Feb 2020 12:07:42 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01HH4GTj089761 for ; Mon, 17 Feb 2020 12:07:41 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2y7uafrwj9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 17 Feb 2020 12:07:40 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 17 Feb 2020 17:07:39 -0000 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 17 Feb 2020 17:07:37 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01HH7ZNv46727478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Feb 2020 17:07:35 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7F33CA405B; Mon, 17 Feb 2020 17:07:35 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 420EBA405F; Mon, 17 Feb 2020 17:07:35 +0000 (GMT) Received: from localhost (unknown [9.152.212.204]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 17 Feb 2020 17:07:35 +0000 (GMT) Date: Mon, 17 Feb 2020 18:07:33 +0100 From: Vasily Gorbik To: Nathan Chancellor Cc: Heiko Carstens , Christian Borntraeger , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] s390/mm: Explicitly compare PAGE_DEFAULT_KEY against zero in storage_key_init_range References: <20200214064207.10381-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200214064207.10381-1-natechancellor@gmail.com> X-TM-AS-GCONF: 00 x-cbid: 20021717-0020-0000-0000-000003AB0014 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20021717-0021-0000-0000-00002202F820 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-17_11:2020-02-17,2020-02-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 bulkscore=0 suspectscore=0 adultscore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002170139 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 13, 2020 at 11:42:07PM -0700, Nathan Chancellor wrote: > 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 > Signed-off-by: Nathan Chancellor > --- Applied to fixes, thanks