Staging: ft1000-usb: wrap macros in do while
authorAnders Darander <anders.darander@gmail.com>
Tue, 1 Apr 2014 06:29:39 +0000 (08:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:48:36 +0000 (13:48 -0700)
Fix coding style issue by wrapping the macro in a do {} while (0).

Signed-off-by: Anders Darander <anders.darander@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ft1000/ft1000-usb/ft1000_proc.c

index 2575d0d6bff3b124f18020785a10771e0e958f69..28f07a7650987db6f35888e7cb2e197d8719e6fb 100644 (file)
 
 
 #define seq_putx(m, message, size, var) \
-       seq_printf(m, message); \
-       for (i = 0; i < (size - 1); i++) \
-               seq_printf(m, "%02x:", var[i]); \
-       seq_printf(m, "%02x\n", var[i])
+       do { \
+               seq_printf(m, message); \
+               for (i = 0; i < (size - 1); i++) \
+                       seq_printf(m, "%02x:", var[i]); \
+               seq_printf(m, "%02x\n", var[i]);        \
+       } while (0)
 
 #define seq_putd(m, message, size, var) \
-       seq_printf(m, message); \
-       for (i = 0; i < (size - 1); i++) \
-               seq_printf(m, "%d.", var[i]); \
-       seq_printf(m, "%d\n", var[i])
-
+       do { \
+               seq_printf(m, message); \
+               for (i = 0; i < (size - 1); i++) \
+                       seq_printf(m, "%d.", var[i]); \
+               seq_printf(m, "%d\n", var[i]);        \
+       } while (0)
 
 #define FTNET_PROC init_net.proc_net