From 87a76301091f8ff0c24e31c8befc6a4f699536f1 Mon Sep 17 00:00:00 2001 From: Anders Darander Date: Tue, 1 Apr 2014 08:29:39 +0200 Subject: [PATCH] Staging: ft1000-usb: wrap macros in do while Fix coding style issue by wrapping the macro in a do {} while (0). Signed-off-by: Anders Darander Signed-off-by: Greg Kroah-Hartman --- .../staging/ft1000/ft1000-usb/ft1000_proc.c | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c index 2575d0d6bff3..28f07a765098 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_proc.c @@ -32,17 +32,20 @@ #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 -- 2.34.1