summaryrefslogtreecommitdiff
path: root/sound/core/seq_device.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2021-03-22 11:31:10 +0100
committerTakashi Iwai <tiwai@suse.de>2021-03-22 12:26:00 +0100
commit940ba1f5e18d4411c4e87ef902dc811a10d341d0 (patch)
tree88d8d9e17402e37a13b3505eb495bc2ee50cb181 /sound/core/seq_device.c
parentd2b6f15bc18ac8fbce25398290774c21f5b2cd44 (diff)
ALSA: core: avoid -Wempty-body warnings
Building with 'make W=1' shows some warnings about empty function-style macros: sound/core/pcm_memory.c: In function 'preallocate_pages': sound/core/pcm_memory.c:236:49: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 236 | preallocate_info_init(substream); sound/core/seq_device.c: In function 'snd_seq_device_dev_register': sound/core/seq_device.c:163:41: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 163 | queue_autoload_drivers(); Change them to empty inline functions, which are more robust here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20210322103128.547199-1-arnd@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq_device.c')
-rw-r--r--sound/core/seq_device.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/core/seq_device.c b/sound/core/seq_device.c
index 7ed13cb32ef8..382275c5b193 100644
--- a/sound/core/seq_device.c
+++ b/sound/core/seq_device.c
@@ -133,10 +133,19 @@ void snd_seq_device_load_drivers(void)
flush_work(&autoload_work);
}
EXPORT_SYMBOL(snd_seq_device_load_drivers);
-#define cancel_autoload_drivers() cancel_work_sync(&autoload_work)
+
+static inline void cancel_autoload_drivers(void)
+{
+ cancel_work_sync(&autoload_work);
+}
#else
-#define queue_autoload_drivers() /* NOP */
-#define cancel_autoload_drivers() /* NOP */
+static inline void queue_autoload_drivers(void)
+{
+}
+
+static inline void cancel_autoload_drivers(void)
+{
+}
#endif
/*