From: Nathan Chancellor <natechancellor@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: 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>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
linux-arch@vger.kernel.org, linux-mm@kvack.org,
clang-built-linux@googlegroups.com
Subject: Re: [PATCH 0/6] Silence some instances of -Wtautological-compare and enable globally
Date: Mon, 20 Apr 2020 21:32:51 -0700 [thread overview]
Message-ID: <20200421043251.GA4996@ubuntu-s3-xlarge-x86> (raw)
In-Reply-To: <20200420210332.7ff9652c8bdca7fb91ccfb0c@linux-foundation.org>
Hi Andrew,
On Mon, Apr 20, 2020 at 09:03:32PM -0700, Andrew Morton wrote:
> On Tue, 18 Feb 2020 21:54:17 -0700 Nathan Chancellor <natechancellor@gmail.com> wrote:
>
> > Hi everyone,
> >
> > This patch series aims to silence some instances of clang's
> > -Wtautological-compare that are not problematic and enable it globally
> > for the kernel because it has a bunch of subwarnings that can find real
> > bugs in the kernel such as
> > https://lore.kernel.org/lkml/20200116222658.5285-1-natechancellor@gmail.com/
> > and https://bugs.llvm.org/show_bug.cgi?id=42666, which was specifically
> > requested by Dmitry.
> >
> > The first patch adds a macro that casts the section variables to
> > unsigned long (uintptr_t), which silences the warning and adds
> > documentation.
> >
> > Patches two through four silence the warning in the places I have
> > noticed it across all of my builds with -Werror, including arm, arm64,
> > and x86_64 defconfig/allmodconfig/allyesconfig. There might still be
> > more lurking but those will have to be teased out over time.
> >
> > Patch six finally enables the warning, while leaving one of the
> > subwarnings disabled because it is rather noisy and somewhat pointless
> > for the kernel, where core kernel code is expected to build and run with
> > many different configurations where variable types can be different
> > sizes.
> >
>
> For some reason none of these patches apply. Not sure why - prehaps
> something in the diff headers.
>
> Anyway, the kmemleak.c code has recently changed in ways which impact
> these patches. Please take a look at that, redo, retest and resend?
>
>
Thank you for doubling back around to this but we are good here. These
warnings have all been fixed in Linus' tree without the need for the
first patch in the series.
For those curious:
63174f61dfaef ("kernel/extable.c: use address-of operator on section symbols")
bf2cbe044da27 ("tracing: Use address-of operator on section symbols")
8306b057a85ec ("lib/dynamic_debug.c: use address-of operator on section symbols")
b0d14fc43d392 ("mm/kmemleak.c: use address-of operator on section symbols")
afe956c577b2d ("kbuild: Enable -Wtautological-compare")
Cheers,
Nathan
prev parent reply other threads:[~2020-04-21 4:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 4:54 Nathan Chancellor
2020-02-19 4:54 ` [PATCH 1/6] asm/sections: Add COMPARE_SECTIONS macro Nathan Chancellor
2020-02-19 4:54 ` [PATCH 2/6] kernel/extable: Wrap section comparison in sort_main_extable with COMPARE_SECTIONS Nathan Chancellor
2020-02-19 4:54 ` [PATCH 3/6] tracing: Wrap section comparison in tracer_alloc_buffers " Nathan Chancellor
2020-02-19 14:34 ` Steven Rostedt
2020-02-19 17:44 ` Nick Desaulniers
2020-02-19 18:16 ` Jason Gunthorpe
2020-02-19 19:09 ` Steven Rostedt
2020-02-19 19:11 ` Nick Desaulniers
2020-02-19 19:22 ` Nathan Chancellor
2020-02-19 19:43 ` Steven Rostedt
2020-02-19 19:54 ` Jason Gunthorpe
2020-02-19 21:32 ` Nick Desaulniers
2020-02-19 4:54 ` [PATCH 4/6] dynamic_debug: Wrap section comparison in dynamic_debug_init " Nathan Chancellor
2020-02-19 4:54 ` [PATCH 5/6] mm: kmemleak: Wrap section comparison in kmemleak_init " Nathan Chancellor
2020-02-19 4:54 ` [PATCH 6/6] kbuild: Enable -Wtautological-compare Nathan Chancellor
2020-04-21 4:03 ` [PATCH 0/6] Silence some instances of -Wtautological-compare and enable globally Andrew Morton
2020-04-21 4:32 ` Nathan Chancellor [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200421043251.GA4996@ubuntu-s3-xlarge-x86 \
--to=natechancellor@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=clang-built-linux@googlegroups.com \
--cc=jbaron@akamai.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox