]> git.baikalelectronics.ru Git - kernel.git/commit
libertas: avoid -Wempty-body warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 22 Mar 2021 10:43:34 +0000 (11:43 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 17 Apr 2021 18:01:17 +0000 (21:01 +0300)
commit1d728b5b92eb2a4b0037c97bd1421a46244e6c9e
tree783b7d74a4cd2977e0d811478d794e0536d5ce62
parenta7642a852db14daea752f040dcf8f612636ce08f
libertas: avoid -Wempty-body warning

Building without mesh supports shows a couple of warnings with
'make W=1':

drivers/net/wireless/marvell/libertas/main.c: In function 'lbs_start_card':
drivers/net/wireless/marvell/libertas/main.c:1068:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
 1068 |                 lbs_start_mesh(priv);

Change the macros to use the usual "do { } while (0)" instead to shut up
the warnings and make the code a litte more robust.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210322104343.948660-4-arnd@kernel.org
drivers/net/wireless/marvell/libertas/mesh.h