From: Jiri Kosina <jikos@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Hans de Goede <hdegoede@redhat.com>,
Colin Ian King <colin.king@canonical.com>,
Peter Hutterer <peter.hutterer@who-t.net>,
Mustafa Kuscu <mustafakuscu@gmail.com>,
Daniel Drake <drake@endlessm.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: asus: fix build warning wiht CONFIG_ASUS_WMI disabled
Date: Tue, 6 Nov 2018 13:58:03 +0100 (CET) [thread overview]
Message-ID: <nycvar.YFH.7.76.1811061357520.21975@cbobk.fhfr.pm> (raw)
In-Reply-To: <20181102151443.758229-1-arnd@arndb.de>
On Fri, 2 Nov 2018, Arnd Bergmann wrote:
> asus_wmi_evaluate_method() is an empty dummy function when CONFIG_ASUS_WMI
> is disabled, or not reachable from a built-in device driver. This leads to
> a theoretical evaluation of an uninitialized variable that the compiler
> complains about, failing to check that the hardcoded return value makes
> this an unreachable code path:
>
> In file included from include/linux/printk.h:336,
> from include/linux/kernel.h:14,
> from include/linux/list.h:9,
> from include/linux/dmi.h:5,
> from drivers/hid/hid-asus.c:29:
> drivers/hid/hid-asus.c: In function 'asus_input_configured':
> include/linux/dynamic_debug.h:135:3: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> __dynamic_dev_dbg(&descriptor, dev, fmt, \
> ^~~~~~~~~~~~~~~~~
> drivers/hid/hid-asus.c:359:6: note: 'value' was declared here
> u32 value;
> ^~~~~
>
> With an extra IS_ENABLED() check, the warning goes away.
>
> Fixes: 3b692c55e58d ("HID: asus: only support backlight when it's not driven by WMI")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied to for-4.20/upstream-fixes. Thanks,
--
Jiri Kosina
SUSE Labs
prev parent reply other threads:[~2018-11-06 12:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 15:14 Arnd Bergmann
2018-11-03 22:16 ` Geert Uytterhoeven
2018-11-06 12:58 ` Jiri Kosina [this message]
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=nycvar.YFH.7.76.1811061357520.21975@cbobk.fhfr.pm \
--to=jikos@kernel.org \
--cc=arnd@arndb.de \
--cc=benjamin.tissoires@redhat.com \
--cc=colin.king@canonical.com \
--cc=drake@endlessm.com \
--cc=hdegoede@redhat.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mustafakuscu@gmail.com \
--cc=peter.hutterer@who-t.net \
/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
all inboxes | Powered by JetHome®