From: Hans de Goede <hdegoede@redhat.com>
To: M D <whenov@gmail.com>, Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Mark Gross <mark.gross@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the drivers-x86 tree
Date: Fri, 20 Aug 2021 12:11:40 +0200 [thread overview]
Message-ID: <d6099b61-d825-5a3d-4088-da865db35451@redhat.com> (raw)
In-Reply-To: <CAA2grmaYg8Qc4LXhcFAvNRN-zJaPcq+y3=MFVSFETr2pNb-Vgw@mail.gmail.com>
Hi,
On 8/20/21 9:31 AM, M D wrote:
> On Fri, Aug 20, 2021 at 1:00 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> Hi all,
>>
>> After merging the drivers-x86 tree, today's linux-next build (x86_64
>> allmodconfig) failed like this:
>>
>> drivers/platform/x86/ideapad-laptop.c: In function 'ideapad_wmi_notify':
>> drivers/platform/x86/ideapad-laptop.c:1469:3: error: a label can only be part of a statement and a declaration is not a statement
>> 1469 | unsigned long result;
>> | ^~~~~~~~
>>
>> Caused by commit
>>
>> 18cfd76e7b84 ("ideapad-laptop: Fix Legion 5 Fn lock LED")
>>
>> I have used the drivers-x86 tree from next-20210819 for today.
>>
>> --
>> Cheers,
>> Stephen Rothwell
>
> Hi Stephen,
>
> Thanks for your work!
>
> This error occurs because only a statement is allowed after a label,
> but a definition is not a statement in C99.
> This can be fixed by wrapping the case block with curly braces like this:
> case 208: {
> ...
> }
Yes, or just move the declaration of result to the beginning of
the function, which is a bit cleaner IMHO.
I've moved the declaration to the beginning of the function and
squashed this fix into the original commit. I'll do a forced
push with the squashed in fix to for-next as soon as a test-compile
completes.
Stephen, as always thank you your work on linux-next and for reporting this.
> However I don't know why my compiler did not report this error. I was
> using gcc 11.1.0 under Arch Linux.
Yes gcc 11.2.1 under Fedora also happily compiles this, and this
sat in my review-hans branch for a while and got happily compiled
by "kernel test robot <lkp@intel.com> " there too.
So this compile error slipped through the crack of all our (compile)
testing until Stephen caught it :)
Regards,
Hans
next prev parent reply other threads:[~2021-08-20 10:11 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-20 5:00 linux-next: build failure after merge of the drivers-x86 tree Stephen Rothwell
2021-08-20 7:31 ` M D
2021-08-20 10:11 ` Hans de Goede [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-07-28 16:48 Mark Brown
2021-07-28 17:01 ` Andy Shevchenko
2021-07-28 17:27 ` Kammela, Gayatri
2021-07-28 17:55 ` Hans de Goede
2021-07-28 17:59 ` Kammela, Gayatri
2019-10-15 2:00 Stephen Rothwell
2019-10-15 8:04 ` Andy Shevchenko
2019-10-15 11:42 ` Stephen Rothwell
2018-06-12 1:23 Stephen Rothwell
2018-06-12 3:28 ` dvhart
2018-06-12 5:18 ` Darren Hart
2015-06-05 10:13 Michael Ellerman
2015-06-08 4:52 ` Darren Hart
2015-06-04 8:13 Stephen Rothwell
2015-06-04 17:51 ` Radim Krčmář
2015-06-08 4:27 ` Darren Hart
2012-08-20 6:11 Stephen Rothwell
2012-08-20 6:44 ` AceLan Kao
2012-03-22 4:33 Stephen Rothwell
2012-03-21 5:52 Stephen Rothwell
2012-03-21 11:19 ` Matthew Garrett
2011-02-22 5:22 Stephen Rothwell
2011-02-22 6:26 ` Mattia Dongili
2011-02-22 11:46 ` Mattia Dongili
2011-02-22 14:34 ` Matthew Garrett
2011-02-22 22:22 ` Stephen Rothwell
2011-02-14 5:39 Stephen Rothwell
2011-02-14 22:42 ` Rafael J. Wysocki
2011-03-25 4:44 ` Stephen Rothwell
2011-02-08 3:45 Stephen Rothwell
2011-02-08 3:50 ` Matthew Garrett
2010-12-07 2:24 Stephen Rothwell
2010-10-05 4:11 Stephen Rothwell
2010-10-05 10:36 ` Ike Panhc
2010-10-06 10:45 ` Ike Panhc
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=d6099b61-d825-5a3d-4088-da865db35451@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mark.gross@intel.com \
--cc=sfr@canb.auug.org.au \
--cc=whenov@gmail.com \
/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).