linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Darren Hart <dvhart@infradead.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Lyude <lyude@redhat.com>,
	Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: linux-next: build warning after merge of the drivers-x86 tree
Date: Thu, 15 Dec 2016 11:02:19 +1100	[thread overview]
Message-ID: <20161215110219.61fec1a0@canb.auug.org.au> (raw)
In-Reply-To: <20161214225914.GA7743@f23x64.localdomain>

Hi Darren,

On Wed, 14 Dec 2016 14:59:14 -0800 Darren Hart <dvhart@infradead.org> wrote:
>
> On Wed, Dec 14, 2016 at 02:21:38PM -0800, Darren Hart wrote:
> > On Wed, Dec 14, 2016 at 01:50:44PM +1100, Stephen Rothwell wrote:  
> > > 
> > > After merging the drivers-x86 tree, today's linux-next build (x86_64
> > > allmodconfig) produced this warning:
> > > 
> > > In file included from include/linux/kernel.h:13:0,
> > >                  from drivers/platform/x86/thinkpad_acpi.c:52:
> > > drivers/platform/x86/thinkpad_acpi.c: In function 'hotkey_init':
> > > include/linux/printk.h:299:2: warning: 'type' may be used uninitialized in this function [-Wmaybe-uninitialized]
> > >   printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
> > >   ^
> > > drivers/platform/x86/thinkpad_acpi.c:3147:8: note: 'type' was declared here
> > >   char *type;
> > >         ^
> > > In file included from include/linux/kernel.h:13:0,
> > >                  from drivers/platform/x86/thinkpad_acpi.c:52:
> > > include/linux/printk.h:299:2: warning: 'in_tablet_mode' may be used uninitialized in this function [-Wmaybe-uninitialized]
> > >   printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
> > >   ^
> > > drivers/platform/x86/thinkpad_acpi.c:3146:6: note: 'in_tablet_mode' was declared here
> > >   int in_tablet_mode, res;
> > >       ^
> > > 
> > > Introduced by commit
> > > 
> > >   b31800283868 ("platform/x86: thinkpad_acpi: Move tablet detection into separate function")
> > > 
> > > I can't tell if this is a false positive or not.  
> > 
> > That's an uninitialized local variable. Not sure how I missed that. I'll
> > fix it up today. Thank you for the report.  
> 
> OK, no, it's a false positive because tp_features.hotkey_tablet is assigned in
> both places where in_tablet_mode is assigned, and if the former is 0 (global
> scope), the function returns without calling pr_info.

How about "type".

> Lyude, Henrique, please confirm.
> 
> Regardless, I'll add a patch to init in_tablet_mode to 0 so it is explicit - but
> will not rebase as it isn't technically an error.

No problem, it is only a warning after all.

-- 
Cheers,
Stephen Rothwell

  reply	other threads:[~2016-12-15  0:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14  2:50 linux-next: build warning after merge of the drivers-x86 tree Stephen Rothwell
2016-12-14 22:21 ` Darren Hart
2016-12-14 22:59   ` Darren Hart
2016-12-15  0:02     ` Stephen Rothwell [this message]
2016-12-15  4:07       ` Darren Hart
  -- strict thread matches above, loose matches on Subject: below --
2024-01-05  6:29 Stephen Rothwell
2023-02-03  2:53 Stephen Rothwell
2023-02-03  9:25 ` Hans de Goede
2021-02-04  5:13 Stephen Rothwell
2021-02-04  7:38 ` Hans de Goede
2021-02-04 15:05   ` Andy Shevchenko
2020-02-10 23:35 Stephen Rothwell
2020-02-10 23:39 ` Kammela, Gayatri
2020-02-11 21:07 ` Andy Shevchenko
2020-01-10  3:57 Stephen Rothwell
2020-01-10  9:47 ` Andy Shevchenko
2017-06-30  4:00 Stephen Rothwell
2017-06-30  5:12 ` Arvind Yadav
2017-07-01  3:32 ` Darren Hart
2017-05-19  3:23 Stephen Rothwell
2017-05-19 22:09 ` Darren Hart
2017-05-22 18:03   ` Andy Shevchenko
2017-05-25 23:34     ` Stephen Rothwell
2017-05-26  8:25       ` Arnd Bergmann
2017-05-26  8:35         ` Stephen Rothwell
2017-05-26  9:04           ` Andy Shevchenko
2017-05-26  9:07             ` Stephen Rothwell
2017-05-26  9:52               ` Andy Shevchenko
2010-08-27  1:59 Stephen Rothwell
2010-08-27  2:51 ` Matthew Garrett
2010-08-27  7:40   ` Dmitry Torokhov
2010-08-30  2:51     ` Stephen Rothwell
2010-06-25  3:25 Stephen Rothwell
2010-06-25  3:31 ` Matthew Garrett
2010-06-25  3:41 ` Matthew Garrett
2010-06-25  4:16   ` Stephen Rothwell

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=20161215110219.61fec1a0@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dvhart@infradead.org \
    --cc=hmh@hmh.eng.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=lyude@redhat.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).