Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1738680ybv; Sat, 8 Feb 2020 04:58:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyxCRy7cnHOSzWkvLYmHLQnrfygoQ3iXGMviHVSUHxj84fj65Trk5ToCi34zYlfJUenvOp7 X-Received: by 2002:a05:6830:11c8:: with SMTP id v8mr3096837otq.330.1581166718895; Sat, 08 Feb 2020 04:58:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581166718; cv=none; d=google.com; s=arc-20160816; b=yuEkLTWzc1fyGU5aLKHvU+cs3l6ztsyp3vrJB83hbcFAmhriII/Pyovku1HZZEUZ48 BUp0ZfFOdsSDTl+HGq5kcLqZ3nKVS4UeXc6iDO4hTutGlluWlxtnjYPz2mYlEcRq+yDK 645iAAihnY34OQbV+jqDZdIJrGtfI3k/12qeApGQi0LdhrND/TEuF9GdmMQDQY+Z9+sv KJQm/KAqMggKCGyL311ipRcldu3XO3zbYWXrAx0tYst5yV033tZ6ggVVCRH7Fg3IkOeW W5NPr+aUHTAlZN4D+Z1ImTiygu4ehscNSyGj5p0sgCe8EUEF6WJldv5dPM/DajAtRyGw iGZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=jAAF9lIe2xGP+2h6TNe8EwAWXReyZL3mgZUzeJxyr5E=; b=KvDGUal3r2raarwJbrp4E85a4Ua25tdWTU2x4gLEe1txrChe8SgWtD/frOXwawVprl IcVnf2VxSJ1lkd3UfLNvaHKu49KTl0sf6DfkSN/R/8pz+QBsRkny9K0edTROehqGzgNl PphTZBid8JA+fsanIaHgA6QHofxDWv1emILI7f9PX3GFY347NDnTIa/eL4Z91b2saYG6 84NKRvbZZpcHzxylHL675CEtW/K6+TG7OCndHPPiTsudnxCNhBUJCW8hRwwwrlekjGQX 6lUVbSTcQHLnLHNJXHYjmmmNSRLu5ktqm9CXuJQ1DempF9XgWnuOWu8e3vLATbdwysqt OIDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Xkf1xa7C; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7si1548254otl.133.2020.02.08.04.58.26; Sat, 08 Feb 2020 04:58:38 -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=@gmail.com header.s=20161025 header.b=Xkf1xa7C; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727154AbgBHM5S (ORCPT + 99 others); Sat, 8 Feb 2020 07:57:18 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:40562 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726527AbgBHM5R (ORCPT ); Sat, 8 Feb 2020 07:57:17 -0500 Received: by mail-ot1-f67.google.com with SMTP id i6so1959816otr.7; Sat, 08 Feb 2020 04:57:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=jAAF9lIe2xGP+2h6TNe8EwAWXReyZL3mgZUzeJxyr5E=; b=Xkf1xa7CYDTO58Bab0NHJOsIhSlbTqFuzR2rloKD87v1ih+PxUWyOYzxpH2fYJmC06 76fVeklzK9MEYgKbvVdLVmfYjDuQJo0ghGrYnfvb2TqCmrAUkh/ZGN+9UlIB+t/LBfO8 GA01fNNXZrEY725o44FYTHGcRwQ/KgzVcFjzmOLQbA/ZXCeDC3a5ysPVgfbrRQV7EqDo JLz3iezbYnjuY7DilFxowLP9G/ROIiKM+jfBOleBmwYe/K1EncOa2tyu6scaFmS+8raE 8pjmGX8R3Lx3JApgoupKqhKJQv5zKfO43JbT9Mhja5HRd7WsmsZ5ZGIGK5WFOx3qwx6w 5fDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=jAAF9lIe2xGP+2h6TNe8EwAWXReyZL3mgZUzeJxyr5E=; b=UjKIshnBjBH8+bCN/TXReZdTRGrPpuL9LJm+tmakAjPX+lXEwYHiRpn2klhAoXmeTo rIJeYRHOxRgbAzJYdv16eLqz1l5GwIpmj9hVVKHvWnhyx4EwaE6eoGQZgBAOhd1x3iLe bc4q3uxNWBK+W6kxhh5+3lV7OsBJzctS3OoG7laJjxy0NCy8OjEecHftdXRiAV/u0eFj dAnoUCOCO2ASXAqJ2GXA6SQjw0xcDwwYflq9jYBLuetOk/QUbVu16l8mSSfxsywLoPEs kBOuXrR6bCM+e2LYDsrJvYY1GEp+IPRVRtMsUj8Wj5HV9MwpPJkNeSlgz8orXxR7Y8dt vxzA== X-Gm-Message-State: APjAAAWLb03v+9EC+b8xakv0c+ZgQ8jz2tQfqzXfN0Mf2VbvDI0hKBKO OAheDCtWajh6vXNvI0a5Hp8= X-Received: by 2002:a9d:6f8f:: with SMTP id h15mr3137323otq.1.1581166636560; Sat, 08 Feb 2020 04:57:16 -0800 (PST) Received: from ubuntu-x2-xlarge-x86 ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id g5sm2262251otp.10.2020.02.08.04.57.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 08 Feb 2020 04:57:15 -0800 (PST) Date: Sat, 8 Feb 2020 05:57:14 -0700 From: Nathan Chancellor To: Heiko Carstens , Vasily Gorbik , Christian Borntraeger Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: -Wtautological-constant-compare in arch/s390/include/asm/page.h Message-ID: <20200208125714.GA9164@ubuntu-x2-xlarge-x86> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, We noticed that you all added support for building s390 with clang, which is great! I have noticed a few warnings for which I will send patches but this one has me stumped. In file included from ../lib/crypto/sha256.c:16: In file included from ../include/linux/module.h:13: In file included from ../include/linux/stat.h:19: In file included from ../include/linux/time.h:6: In file included from ../include/linux/seqlock.h:36: In file included from ../include/linux/spinlock.h:51: In file included from ../include/linux/preempt.h:78: In file included from ../arch/s390/include/asm/preempt.h:6: In file included from ../include/linux/thread_info.h:38: In file included from ../arch/s390/include/asm/thread_info.h:26: ../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. PAGE_DEFAULT_PAGE is always 0, meaning this function never does what it is supposed to. Is this intentional? It seems that commit 0b642ede4796 ("[PATCH] s390: default storage key") added this and it mentions that it can be overwritten at build time but I do not see any infrastructure for doing that. Any clarification that you can give so we can solve this warning would be much appreciated! Cheers, Nathan