Arnd Bergmann 3fc202e81d HID: asus: fix build warning wiht CONFIG_ASUS_WMI disabled
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>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-11-06 13:57:42 +01:00
..
2018-10-31 14:42:31 -07:00
2018-10-29 15:16:01 -07:00
2018-10-27 09:24:24 -07:00
2018-10-25 06:50:48 -07:00
2018-10-29 15:16:01 -07:00
2018-11-01 08:42:21 -07:00
2018-10-16 11:13:50 +02:00
2018-10-25 06:50:48 -07:00
2018-10-29 14:29:58 -07:00
2018-10-11 12:12:55 +02:00
2018-10-30 09:15:31 -07:00
2018-10-29 10:38:10 -07:00
2018-10-31 08:54:16 -07:00
2018-10-31 10:53:29 -07:00
2018-10-31 16:47:55 -07:00
2018-10-31 08:54:16 -07:00
2018-10-31 08:54:16 -07:00
2018-10-25 06:31:56 -07:00
2018-10-25 06:50:48 -07:00
2018-10-26 14:36:21 -07:00
2018-10-22 17:30:06 +01:00
2018-10-26 08:14:13 -07:00
2018-11-01 08:42:21 -07:00
2018-10-26 12:09:58 -07:00
2018-10-29 15:16:01 -07:00
2018-10-31 08:54:16 -07:00
2018-10-26 12:43:13 -07:00
2018-10-31 08:54:16 -07:00
2018-10-29 15:16:01 -07:00
2018-10-25 06:19:15 -07:00
2018-10-31 10:53:29 -07:00
2018-10-25 07:40:30 -07:00
2018-10-11 09:16:44 -07:00
2018-10-31 08:54:16 -07:00
2018-10-31 10:53:29 -07:00
2018-10-31 11:01:38 -07:00
2018-10-31 11:41:37 -07:00