From: Nathan Chancellor <nathan@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org,
linux-toolchains@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: Linux 6.3-rc3
Date: Mon, 20 Mar 2023 12:22:15 -0700 [thread overview]
Message-ID: <20230320192215.GA617563@dev-arch.thelio-3990X> (raw)
In-Reply-To: <20230320185337.GA615556@dev-arch.thelio-3990X>
On Mon, Mar 20, 2023 at 11:53:37AM -0700, Nathan Chancellor wrote:
> On Mon, Mar 20, 2023 at 11:26:17AM -0700, Linus Torvalds wrote:
> > On Mon, Mar 20, 2023 at 11:05 AM Nathan Chancellor <nathan@kernel.org> wrote:
> > >
> > > On the clang front, I am still seeing the following warning turned error
> > > for arm64 allmodconfig at least:
> > >
> > > drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized]
> > > if (syncpt_irq < 0)
> > > ^~~~~~~~~~
> >
> > Hmm. I do my arm64 allmodconfig builds with gcc, and I'm surprised
> > that gcc doesn't warn about this.
>
> Perhaps these would make doing allmodconfig builds with clang more
> frequently less painful for you?
>
> https://lore.kernel.org/llvm/20230319235619.GA18547@dev-arch.thelio-3990X/
>
> > That syncpt_irq thing isn't written to anywhere, so that's pretty egregious.
> >
> > We use -Wno-maybe-uninitialized because gcc gets it so wrong, but
> > that's different from the "-Wuninitialized" thing (without the
> > "maybe").
> >
> > I've seen gcc mess this up when there is one single assignment,
> > because then the SSA format makes it *so* easy to just use that
> > assignment out-of-order (or unconditionally), but this case looks
> > unusually clear-cut.
> >
> > So the fact that gcc doesn't warn about it is outright odd.
> >
> > > If that does not come to you through other means before -rc4, could you
> > > just apply it directly so that I can stop applying it to our CI? :)
> >
> > Bah. I took it now, there's no excuse for that thing.
>
> Thanks!
>
> > Do we have any gcc people around that could explain why gcc failed so
> > miserably at this trivial case?
>
> Cc'ing linux-toolchains. The start of the thread is here:
>
> https://lore.kernel.org/CAHk-=wgSqpdkeJBb92M37JNTdRQJRnRUApraHKE8uGHTqQuu2Q@mail.gmail.com/
>
> The problematic function before the fix is here:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/host1x/dev.c?id=3d3699bde4b043eea17993e4e76804a8128f0fdb#n487
>
> I will see if I have some cycles to try and reduce something out for the
> GCC folks.
While setting up the reduction, I noticed that there is an instance of
-Wmaybe-uninitialized at this site. Seems odd that it is not sure, I will
reduce on that.
../drivers/gpu/host1x/dev.c: In function 'host1x_probe':
../drivers/gpu/host1x/dev.c:520:12: error: 'syncpt_irq' may be used uninitialized [-Werror=maybe-uninitialized]
520 | if (syncpt_irq < 0)
| ^
../drivers/gpu/host1x/dev.c:490:13: note: 'syncpt_irq' was declared here
490 | int syncpt_irq;
| ^~~~~~~~~~
cc1: all warnings being treated as errors
Cheers,
Nathan
next prev parent reply other threads:[~2023-03-20 19:30 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-19 20:50 Linux 6.3-rc3 Linus Torvalds
2023-03-20 8:21 ` Build regressions/improvements in v6.3-rc3 Geert Uytterhoeven
2023-03-21 5:38 ` Build regressions/improvements in v6.3-rc3 (drm/msm/) Randy Dunlap
2023-03-21 7:34 ` Geert Uytterhoeven
2023-03-21 15:10 ` Randy Dunlap
2023-03-21 15:33 ` Geert Uytterhoeven
2023-03-20 18:05 ` Linux 6.3-rc3 Nathan Chancellor
2023-03-20 18:26 ` Linus Torvalds
2023-03-20 18:49 ` Linus Torvalds
2023-03-20 18:56 ` Nathan Chancellor
2023-03-20 19:05 ` Linus Torvalds
2023-03-20 18:53 ` Nathan Chancellor
2023-03-20 19:22 ` Nathan Chancellor [this message]
2023-03-22 12:44 ` Kalle Valo
2023-03-22 16:36 ` Nathan Chancellor
2023-03-22 20:36 ` Nathan Chancellor
2023-03-24 10:54 ` Kalle Valo
2023-03-24 15:11 ` Nathan Chancellor
2023-03-24 15:23 ` Kalle Valo
2023-03-28 19:07 ` Nathan Chancellor
2023-03-29 8:39 ` Kalle Valo
2023-03-22 16:40 ` Sedat Dilek
2023-03-22 16:55 ` Linus Torvalds
2023-03-22 18:17 ` Nick Desaulniers
2023-03-24 17:16 ` Masahiro Yamada
2023-03-27 16:12 ` Jani Nikula
2023-03-27 17:03 ` Kalle Valo
2023-03-20 20:04 ` Guenter Roeck
2023-03-20 20:30 ` Linus Torvalds
2023-03-20 22:06 ` Nathan Chancellor
2023-03-20 22:48 ` Segher Boessenkool
2023-03-20 23:41 ` Linus Torvalds
2023-03-24 9:41 ` Daniel Vetter
2023-03-20 20:07 ` Guenter Roeck
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=20230320192215.GA617563@dev-arch.thelio-3990X \
--to=nathan@kernel.org \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-toolchains@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).