[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3_sRmHVsEh=+83zR_Q3+Bh9fd+-iiCxt4PU4gkx0HZ7Q@mail.gmail.com>
Date: Tue, 23 Jul 2019 13:03:05 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>,
Nathan Chancellor <natechancellor@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] [v2] waitqueue: shut up clang -Wuninitialized warnings
On Tue, Jul 23, 2019 at 12:50 PM Peter Zijlstra <peterz@...radead.org> wrote:
> On Fri, Jul 19, 2019 at 01:36:00PM +0200, Arnd Bergmann wrote:
> > --- a/include/linux/wait.h
> > +++ b/include/linux/wait.h
> > @@ -70,8 +70,17 @@ extern void __init_waitqueue_head(struct wait_queue_head *wq_head, const char *n
> > #ifdef CONFIG_LOCKDEP
> > # define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \
> > ({ init_waitqueue_head(&name); name; })
> > -# define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) \
> > +# if defined(__clang__) && __clang_major__ <= 9
> > +/* work around https://bugs.llvm.org/show_bug.cgi?id=42604 */
> > +# define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) \
> > + _Pragma("clang diagnostic push") \
> > + _Pragma("clang diagnostic ignored \"-Wuninitialized\"") \
> > + struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \
> > + _Pragma("clang diagnostic pop")
> > +# else
> > +# define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) \
> > struct wait_queue_head name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name)
> > +# endif
>
> While this is indeed much better than before; do we really want to do
> this? That is, since clang-9 release will not need this, we're basically
> doing the above for pre-release compilers only.
Kernelci currently builds arch/arm and arch/arm64 kernels with clang-8,
and probably won't change to clang-9 until after that is released,
presumably in September.
Anyone doing x86 builds would use a clang-9 snapshot today
because of the asm-goto support, but so far the fix has not
been merged there either. I think the chances of it getting
fixed before the release are fairly good, but I don't know how
long it will actually take.
Arnd
Powered by blists - more mailing lists