summaryrefslogtreecommitdiff
path: root/sound/core/pcm_memory.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/pcm_memory.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/pcm_memory.c')
-rw-r--r--sound/core/pcm_memory.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c
index 2878c4c23583..542a75babdee 100644
--- a/sound/core/pcm_memory.c
+++ b/sound/core/pcm_memory.c
@@ -214,7 +214,9 @@ static inline void preallocate_info_init(struct snd_pcm_substream *substream)
}
#else /* !CONFIG_SND_VERBOSE_PROCFS */
-#define preallocate_info_init(s)
+static inline void preallocate_info_init(struct snd_pcm_substream *substream)
+{
+}
#endif /* CONFIG_SND_VERBOSE_PROCFS */
/*