Message ID | 20200219045423.54190-7-natechancellor@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=PuGS=4H=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F39D930 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 19 Feb 2020 04:54:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 032202467C for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 19 Feb 2020 04:54:48 +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 032202467C 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) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A80F36B000E; Tue, 18 Feb 2020 23:54:38 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org 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-Original-To: linux-mm@kvack.org 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 <linux-mm@kvack.org>; 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 <linux-mm@kvack.org>; Wed, 19 Feb 2020 04:54:38 +0000 (UTC) X-FDA: 76505661036.09.week60_b4c4c928f44f X-Spam-Summary: 2,0,0,3c9b2589e4d65b28,d41d8cd98f00b204,natechancellor@gmail.com,:masahiroy@kernel.org:michal.lkml@markovi.net:arnd@arndb.de:rostedt@goodmis.org:mingo@redhat.com:jbaron@akamai.com:catalin.marinas@arm.com:akpm@linux-foundation.org:linux-kernel@vger.kernel.org:linux-kbuild@vger.kernel.org:linux-arch@vger.kernel.org::clang-built-linux@googlegroups.com:natechancellor@gmail.com,RULES_HIT:41:355:379:541:800:960:967:973:988:989:1260:1263:1311:1314:1345:1359:1437:1515:1534:1541:1711:1730:1747:1777:1792:2393:2525:2559:2564:2682:2685:2693:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3622:3865:3866:3868:3870:3871:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:5007:6261:6653:7514:8599:8603:8957:9025:9413:10004:10049:11026:11232:11473:11658:11914:12043:12048:12295:12296:12297:12438:12517:12519:12555:12679:12776:12895:12986:13069:13161:13229:13311:13357:13894:14096:14181:14384:14394:14687:14721:14849:21080:21444:21451:21627:21 666:2193 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 <linux-mm@kvack.org>; Wed, 19 Feb 2020 04:54:37 +0000 (UTC) Received: by mail-ot1-f65.google.com with SMTP id r27so21881294otc.8 for <linux-mm@kvack.org>; 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 <natechancellor@gmail.com> To: Masahiro Yamada <masahiroy@kernel.org>, Michal Marek <michal.lkml@markovi.net>, Arnd Bergmann <arnd@arndb.de>, Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@redhat.com>, Jason Baron <jbaron@akamai.com>, Catalin Marinas <catalin.marinas@arm.com>, Andrew Morton <akpm@linux-foundation.org> 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 <natechancellor@gmail.com> 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: <linux-mm.kvack.org> |
Series |
Silence some instances of -Wtautological-compare and enable globally
|
expand
|
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 += -Qunused-arguments KBUILD_CFLAGS += -Wno-format-invalid-specifier KBUILD_CFLAGS += -Wno-gnu -# Quiet clang warning: comparison of unsigned expression < 0 is always false -KBUILD_CFLAGS += -Wno-tautological-compare +KBUILD_CFLAGS += -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 whitelisted names. # See modpost pattern 2
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/DiagnosticsReference.html#wtautological-compare Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)