aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2014-06-16 05:55:13 -0400
committerMatthew Garrett <matthew.garrett@nebula.com>2014-08-16 04:23:49 -0400
commitc4960cf01f70d86c6440ad5dd540d0c82381785d (patch)
treef07a7944a7d2ff0f75e2ed5cd9046f23066889ca /drivers/platform
parentbdc3ae7221213963f438faeaa69c8b4a2195f491 (diff)
fujitsu-laptop: Clear build warnings
When CONFIG_FUJITSU_LAPTOP_DEBUG is disabled and W=1, the fujitsu-laptop driver builds with the following warnings: drivers/platform/x86/fujitsu-laptop.c: In function "bl_update_status": drivers/platform/x86/fujitsu-laptop.c:409:8: warning: suggest braces around empty body in an "if" statement [-Wempty-body] ret); ^ drivers/platform/x86/fujitsu-laptop.c:418:8: warning: suggest braces around empty body in an "if" statement [-Wempty-body] ret); ^ Rework the debug printk helper macro to get rid of these. I verified that this change has no effect on the generated binary, both in the debug and non-debug case. Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by: Jonathan Woithe <jwoithe@just42.net> Cc: Matthew Garrett <matthew.garrett@nebula.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index e6f336270c21..4be0e5e36b12 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -129,15 +129,14 @@
129#define FUJLAPTOP_DBG_INFO 0x0004 129#define FUJLAPTOP_DBG_INFO 0x0004
130#define FUJLAPTOP_DBG_TRACE 0x0008 130#define FUJLAPTOP_DBG_TRACE 0x0008
131 131
132#define dbg_printk(a_dbg_level, format, arg...) \ 132#ifdef CONFIG_FUJITSU_LAPTOP_DEBUG
133#define vdbg_printk(a_dbg_level, format, arg...) \
133 do { if (dbg_level & a_dbg_level) \ 134 do { if (dbg_level & a_dbg_level) \
134 printk(FUJLAPTOP_DEBUG "%s: " format, __func__ , ## arg); \ 135 printk(FUJLAPTOP_DEBUG "%s: " format, __func__ , ## arg); \
135 } while (0) 136 } while (0)
136#ifdef CONFIG_FUJITSU_LAPTOP_DEBUG
137#define vdbg_printk(a_dbg_level, format, arg...) \
138 dbg_printk(a_dbg_level, format, ## arg)
139#else 137#else
140#define vdbg_printk(a_dbg_level, format, arg...) 138#define vdbg_printk(a_dbg_level, format, arg...) \
139 do { } while (0)
141#endif 140#endif
142 141
143/* Device controlling the backlight and associated keys */ 142/* Device controlling the backlight and associated keys */