From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01F33C3404D for ; Wed, 19 Feb 2020 04:54:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B0ADE24656 for ; Wed, 19 Feb 2020 04:54:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WBwXIcH5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0ADE24656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id ACE196B000D; Tue, 18 Feb 2020 23:54:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A80F36B000E; Tue, 18 Feb 2020 23:54:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 997F66B0010; Tue, 18 Feb 2020 23:54:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0055.hostedemail.com [216.40.44.55]) by kanga.kvack.org (Postfix) with ESMTP id 7BCB96B000D for ; Tue, 18 Feb 2020 23:54:38 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 0F839181AEF1D for ; Wed, 19 Feb 2020 04:54:38 +0000 (UTC) X-FDA: 76505661036.09.week60_b4c4c928f44f X-HE-Tag: week60_b4c4c928f44f X-Filterd-Recvd-Size: 4955 Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Feb 2020 04:54:37 +0000 (UTC) Received: by mail-ot1-f65.google.com with SMTP id r27so21881294otc.8 for ; Tue, 18 Feb 2020 20:54:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Oh9QWb6pZZ5g69dU4FZ2txutGr0B2CSvIaPTiYXdnPo=; b=WBwXIcH52wj5UStzSlDaw2Ph8pzj/CYP3JRSbf54GZh79pza3d3RsxczDsukrXWSZ7 86khT4brEkZbiwPESK+rtMahwlr7gE+9fQ0NRJakjryJkgDvh9ACjcNovCc0J9Sy5zll 88LmmWVIvK2n273H7MJxpeDiBFbG2x5vk5wpwRXdCTotbpecqAQ1qdXfoQlb9uRU2yC6 AvaBlQeWFdJnomzIM4hTbQfiEfCtrzQIMaRLgjQ8s6iN9JZCPEhU2N1slMVrr1UU1AB5 El1e5Hnaz3m5KCaZqWo0pgU+ojOgoCdxbASQRLncZppeIXyvOm7iU+Zj2f6dMYh6cEHr 9hIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Oh9QWb6pZZ5g69dU4FZ2txutGr0B2CSvIaPTiYXdnPo=; b=t+9f/8Z3fLTfuZnC8OmerWcg6+NLHxGhji1QiNBLusPoIwXGK5SsYkEmUoNv9bOVep 0I1MiwOtB1j92hJspZMMX5skPb8TOGmt95sL82E0obnsnqLVtSGeADfsCTrkFfCBM5R8 jvH9ByrtKaI6muqyfKu01MwfF55Fh+ZA1LLMTPL1RvycUnLP7Rwe8I8HmcXeH+100JX0 MqTAFCT0pNUq/j+5JC7mF0+VFqQ1gUYbw5r5xkQPUdSEyjUPyOcAxvC+wfci+VcySG3A kpmMihJEIEjW+kv2hGXyqDHdw3ARktcmgOIkhO3EhiPV4qeh1VfUfUs/u/dWDI7S62xW FsIQ== X-Gm-Message-State: APjAAAVpy8m/fjByRl6R3K1PJSOSUud9bX2TSH6f0juT/421Aw+ZSAAz dgOR501uaeTtDtgxHPxqGu8= X-Google-Smtp-Source: APXvYqxJRG2OQXc05asgj7HXthiAW2UIejHZq7541ZiIpdLqpMSEi/rSorSHXLJ0a/aaTltGwjj13Q== X-Received: by 2002:a05:6830:1d91:: with SMTP id y17mr17502659oti.276.1582088077039; Tue, 18 Feb 2020 20:54:37 -0800 (PST) Received: from localhost.localdomain ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id c7sm288894otn.81.2020.02.18.20.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 20:54:36 -0800 (PST) From: Nathan Chancellor To: Masahiro Yamada , Michal Marek , Arnd Bergmann , Steven Rostedt , Ingo Molnar , Jason Baron , Catalin Marinas , Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH 6/6] kbuild: Enable -Wtautological-compare Date: Tue, 18 Feb 2020 21:54:23 -0700 Message-Id: <20200219045423.54190-7-natechancellor@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200219045423.54190-1-natechancellor@gmail.com> References: <20200219045423.54190-1-natechancellor@gmail.com> MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Currently, we disable -Wtautological-compare, which in turn disables a bunch of more specific tautological comparison warnings that are useful for the kernel (see clang's documentation below). Now that all of the major/noisy warnings have been fixed, enable -Wtautological-compare so that more issues can be caught at build time. -Wtautological-constant-out-of-range-compare is kept disabled because there are places in the kernel where a constant or variable size can change based on the kernel configuration; these are not fixed in a clean/concise way and they are almost always harmless so this one subwarning is kept disabled. Link: https://github.com/ClangBuiltLinux/linux/issues/488 Link: http://releases.llvm.org/9.0.0/tools/clang/docs/DiagnosticsReferenc= e.html#wtautological-compare Signed-off-by: Nathan Chancellor --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b954c304c479..99080c57a1cb 100644 --- a/Makefile +++ b/Makefile @@ -742,8 +742,7 @@ ifdef CONFIG_CC_IS_CLANG KBUILD_CPPFLAGS +=3D -Qunused-arguments KBUILD_CFLAGS +=3D -Wno-format-invalid-specifier KBUILD_CFLAGS +=3D -Wno-gnu -# Quiet clang warning: comparison of unsigned expression < 0 is always f= alse -KBUILD_CFLAGS +=3D -Wno-tautological-compare +KBUILD_CFLAGS +=3D -Wno-tautological-constant-out-of-range-compare # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, = as the # source of a reference will be _MergedGlobals and not on of the whiteli= sted names. # See modpost pattern 2 --=20 2.25.1