From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: "Josh Poimboeuf" <jpoimboe@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Gergo Koteles" <soyer@irl.hu>,
"Hans de Goede" <hdegoede@redhat.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, "Ike Panhc" <ike.pan@canonical.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH v1 1/1] platform/x86: ideapad-laptop: Make the scope_guard() clear of its scope
Date: Mon, 16 Sep 2024 13:40:51 +0300 [thread overview]
Message-ID: <ZugLM6oe2caYHLX8@smile.fi.intel.com> (raw)
In-Reply-To: <20240913233324.GA306935@thelio-3990X>
On Fri, Sep 13, 2024 at 04:33:24PM -0700, Nathan Chancellor wrote:
> On Thu, Sep 05, 2024 at 08:16:01PM -0700, Josh Poimboeuf wrote:
> > On Wed, Sep 04, 2024 at 01:26:11PM +0300, Andy Shevchenko wrote:
> > > On Tue, Sep 03, 2024 at 09:52:01PM -0700, Josh Poimboeuf wrote:
> > > > I'm not sure I buy that, we should look closer to understand what the
> > > > issue is. Can you share the config and/or toolchain version(s) need to
> > > > trigger the warning?
> > >
> > > .config is from the original report [1], toolchain is
> > > Debian clang version 18.1.8 (9)
> > > Target: x86_64-pc-linux-gnu
> > > Thread model: posix
> > > InstalledDir: /usr/bin
> > >
> > > (Just whatever Debian unstable provides)
> > >
> > > [1]: https://lore.kernel.org/oe-kbuild-all/202408290219.BrPO8twi-lkp@intel.com/
> >
> > The warning is due to a (minor?) Clang bug, almost like it tried to
> > optimize but didn't quite finish.
> ...
> > In this case, mutex is an unconditional guard, so the constructor just
> > returns the original value of '&priv->vpc_mutex'. So if the original
> > '&priv->vpc_mutex' is never NULL, the condition would always be true.
>
> Thanks a lot for that Josh. I have a somewhat trivial reproducer for the
> clang folks to take a look at. I should have some time on Monday to get
> that reported upstream and I will see if I can find anyone to take a
> look at it.
>
> For what it is worth, I don't think the workaround for this is too bad
> and it seems like it only shows up with KCOV.
FWIW, Hans queued the workaround.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2024-09-16 10:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 16:50 [PATCH v1 1/1] platform/x86: ideapad-laptop: Make the scope_guard() clear of its scope Andy Shevchenko
2024-09-03 15:00 ` Gergo Koteles
2024-09-03 15:14 ` Andy Shevchenko
2024-09-03 15:29 ` Gergo Koteles
2024-09-03 15:40 ` Andy Shevchenko
2024-09-04 1:22 ` Nathan Chancellor
2024-09-04 10:28 ` Andy Shevchenko
2024-09-04 13:37 ` Ilpo Järvinen
2024-09-04 4:52 ` Josh Poimboeuf
2024-09-04 10:26 ` Andy Shevchenko
2024-09-06 3:16 ` Josh Poimboeuf
2024-09-13 23:33 ` Nathan Chancellor
2024-09-16 10:40 ` Andy Shevchenko [this message]
2024-09-04 18:14 ` Hans de Goede
2024-09-04 20:18 ` Andy Shevchenko
2024-09-05 8:33 ` Hans de Goede
2024-09-05 8:36 ` Andy Shevchenko
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=ZugLM6oe2caYHLX8@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=ike.pan@canonical.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=nathan@kernel.org \
--cc=peterz@infradead.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=soyer@irl.hu \
/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