Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1542377
| Path | csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
| Newsgroups | linux.kernel |
| Subject | Re: linux-next: build warning after merge of the drivers-x86 tree |
| Date | Thu, 15 Dec 2016 01:10:02 +0100 |
| Message-ID | <sOrMu-78L-47@gated-at.bofh.it> (permalink) |
| References | <sO877-14y-17@gated-at.bofh.it> <sOqdI-5Va-27@gated-at.bofh.it> <sOqGK-6gP-17@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201601; t=1481760139; bh=y/w6/vZeBYU50bNQrKLebzvF6zJkBflIYawFPqax/54=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=l71874G7sh6+CnLULQFJxIhOxphFrFd/10I84TfuULpItc0DzaCEELXmK090MifXh GSORFCFbE5RZcYQr59DIw5aB9DQ1u71tzy8K/98XPoyui81o083q5cOqqEsaomvJRT fZ2bj7GA5A/eujR+26HvfLeiv5uOjoaVj8nGRscU= |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 53 |
| Organization | linux.* mail to news gateway |
| X-Original-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> |
| X-Original-Date | Thu, 15 Dec 2016 11:02:19 +1100 |
| X-Original-Message-ID | <20161215110219.61fec1a0@canb.auug.org.au> |
| X-Original-References | <20161214135044.57dc96f5@canb.auug.org.au> <20161214222138.GA116314@f23x64.localdomain> <20161214225914.GA7743@f23x64.localdomain> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1542377 |
Show key headers only | View raw
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
linux-next: build warning after merge of the drivers-x86 tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-12-14 04:10 +0100
Re: linux-next: build warning after merge of the drivers-x86 tree Darren Hart <dvhart@infradead.org> - 2016-12-14 23:30 +0100
Re: linux-next: build warning after merge of the drivers-x86 tree Darren Hart <dvhart@infradead.org> - 2016-12-15 00:00 +0100
Re: linux-next: build warning after merge of the drivers-x86 tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-12-15 01:10 +0100
Re: linux-next: build warning after merge of the drivers-x86 tree Darren Hart <dvhart@infradead.org> - 2016-12-15 05:10 +0100
csiph-web