Message ID | 20200219045423.54190-3-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 D9409930 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 19 Feb 2020 04:54:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A6E3424658 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 19 Feb 2020 04:54:38 +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="oJcPu03T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6E3424658 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 577B76B0007; Tue, 18 Feb 2020 23:54:35 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 502F16B0008; Tue, 18 Feb 2020 23:54:35 -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 3C9906B000A; Tue, 18 Feb 2020 23:54:35 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0165.hostedemail.com [216.40.44.165]) by kanga.kvack.org (Postfix) with ESMTP id 25C2E6B0007 for <linux-mm@kvack.org>; Tue, 18 Feb 2020 23:54:35 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A2635181AEF1D for <linux-mm@kvack.org>; Wed, 19 Feb 2020 04:54:34 +0000 (UTC) X-FDA: 76505660868.30.boot03_acbf7c4bc838 X-Spam-Summary: 2,0,0,5d6437ee9d0afb33,d41d8cd98f00b204,natechancellor@gmail.com,,RULES_HIT:41:355:379:541:800:960:967:973:988:989:1260:1311:1314:1345:1359:1437:1515:1534:1541:1711:1730:1747:1777:1792:1801:2393:2525:2559:2563:2682:2685:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3865:3867:3870:3871:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:5007:6261:6653:7514:7903:8957:9025:9149:9413:10004:11026:11658:11914:12043:12048:12294:12296:12297:12438:12517:12519:12555:12679:12895:13069:13161:13229:13255:13311:13357:13894:14181:14384:14394:14687:14721:21080:21444:21451:21627:21666:21939:30054,0,RBL:209.85.210.66:@gmail.com:.lbl8.mailshell.net-62.50.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: boot03_acbf7c4bc838 X-Filterd-Recvd-Size: 4757 Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) by imf38.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Wed, 19 Feb 2020 04:54:34 +0000 (UTC) Received: by mail-ot1-f66.google.com with SMTP id j16so21947076otl.1 for <linux-mm@kvack.org>; Tue, 18 Feb 2020 20:54:34 -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=gB9HKBd9NE/ic7aLq2Zv7PAn+vedvEO6GTMd/7/cXT8=; b=oJcPu03TiqY6QgcSJwosaNcUNgizcMJBajDzA1jPGSOgixPcHSmfe23+opqORZk+vq 5uEhlpBEZOCyGWUePBMoNwLLLl0IWMPZe+VWpXNaOBx9cZ2zeUJPWQtY0dTiHewXAffD 4ifNb7wpeVSJ/pu6EVwX48D+XsoqpU25UVo48MKzoIANF1gwZwNgeaclQE8DvLhARL6C vHBM4LOnGhOmLrkDNGQWEpeKwKFqTzI1o0YnVyyE2morwLQjSjNMJuiLyIbB5rfpRg8o RWSsvGScSkalMGARf0Bb9ufIkNFTU4mFhypytRC2FcYl+1mfsPuZe3rwAIyy4dICfd5R Yt5Q== 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=gB9HKBd9NE/ic7aLq2Zv7PAn+vedvEO6GTMd/7/cXT8=; b=i8QPU/YB2IOOSVoMEWQ3d+iKZ8JYcVo3SDOj3pHA4960zQvJ4uwvCK8fJLetPWil/W JLPvaFRtXnal0hmSQ3iXikXT4bRGbtTuFE325kwHKG7oE8IIfTyXRIdFJ8U9SCATiY3u 5aP2Ft0wkp5jI7CtdczKf4I1s0TRNRjDuw9l26AolAxc9BOnUOlQ0LaSfIIuYQCs/XCk 1pkfhsuKVd6GxitYARihdyzIw+p5CIum+MTaD2WWBJD324YFW9yXHObRUHgpaNm7V3Fz q3Ii3A/BjQBeDFzjcXD3EYYjjF9cDGGxb9yDSzZvfMuA0XC30C6lRU75jSUWDkMq3wyd uPhg== X-Gm-Message-State: APjAAAV8NbyEFCmBIOmajL0v0wBM/y1Hu1tjeIQXGj6+xS2ir2ODnNhk r1CNE0/6e+QnnyMVjMa/Uts= X-Google-Smtp-Source: APXvYqwdFwp4qn7ny2TvCGnaQaQjscbRAz+omD8OlFFTCu1L1VgwqztyBfFMZgIeIPZS92nhreHqNA== X-Received: by 2002:a9d:6b12:: with SMTP id g18mr17801067otp.211.1582088073480; Tue, 18 Feb 2020 20:54:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 20:54:32 -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 2/6] kernel/extable: Wrap section comparison in sort_main_extable with COMPARE_SECTIONS Date: Tue, 18 Feb 2020 21:54:19 -0700 Message-Id: <20200219045423.54190-3-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.000000, 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/kernel/extable.c b/kernel/extable.c index a0024f27d3a1..17bf4ccb9de9 100644 --- a/kernel/extable.c +++ b/kernel/extable.c @@ -34,7 +34,8 @@ u32 __initdata __visible main_extable_sort_needed = 1; /* Sort the kernel's built-in exception table */ void __init sort_main_extable(void) { - if (main_extable_sort_needed && __stop___ex_table > __start___ex_table) { + if (main_extable_sort_needed && + COMPARE_SECTIONS(__stop___ex_table, >, __start___ex_table)) { pr_notice("Sorting __ex_table...\n"); sort_extable(__start___ex_table, __stop___ex_table); }
Clang warns: ../kernel/extable.c:37:52: warning: array comparison always evaluates to a constant [-Wtautological-compare] if (main_extable_sort_needed && __stop___ex_table > __start___ex_table) { ^ 1 warning generated. These are not true arrays, they are linker defined symbols, which are just addresses so there is not a real issue here. Use the COMPARE_SECTIONS macro to silence this warning by casting the linker defined symbols to unsigned long, which keeps the logic the same. Link: https://github.com/ClangBuiltLinux/linux/issues/765 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> --- kernel/extable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)