Staging: keucr: scsiglue: fixed a do while coding style issue
authorWilliam Blair <wdblair@bu.edu>
Wed, 13 Jun 2012 05:16:49 +0000 (01:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Jun 2012 19:20:16 +0000 (12:20 -0700)
Added a do ... while (0) to a multi statement macro and reformatted a similar macro.

Signed-off-by: William Blair <wdblair@bu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/keucr/scsiglue.c

index e1f3931d41e0c9b24ee75c5ea10506e5ae320ed8..083b20e6253e3cc446c39f2c464d267553971e46 100644 (file)
@@ -230,7 +230,10 @@ void usb_stor_report_bus_reset(struct us_data *us)
 /* we use this macro to help us write into the buffer */
 #undef SPRINTF
 #define SPRINTF(args...) \
-       do { if (pos < buffer+length) pos += sprintf(pos, ## args); } while (0)
+       do { \
+               if (pos < buffer+length) \
+                       pos += sprintf(pos, ## args); \
+       } while (0)
 
 /*
  * proc_info()
@@ -279,8 +282,10 @@ static int proc_info(struct Scsi_Host *host, char *buffer, char **start,
                pos += sprintf(pos, "       Quirks:");
 
 #define US_FLAG(name, value) \
-       if (us->fflags & value)\
-               pos += sprintf(pos, " " #name);
+       do { \
+               if (us->fflags & value) \
+                       pos += sprintf(pos, " " #name); \
+       } while (0);
 US_DO_ALL_FLAGS
 #undef US_FLAG