summaryrefslogtreecommitdiffstats
path: root/drivers/staging/keucr/scsiglue.c
diff options
context:
space:
mode:
authorWilliam Blair2012-06-13 07:16:49 +0200
committerGreg Kroah-Hartman2012-06-13 21:20:16 +0200
commita2c49a9ac993fa2b4795890d5fa56f2fc002453e (patch)
tree55c8fc3d3da66e8bc43fd8a9f9861201c2f66918 /drivers/staging/keucr/scsiglue.c
parentstaging bcm: spelling of suppress in code (diff)
downloadkernel-qcow2-linux-a2c49a9ac993fa2b4795890d5fa56f2fc002453e.tar.gz
kernel-qcow2-linux-a2c49a9ac993fa2b4795890d5fa56f2fc002453e.tar.xz
kernel-qcow2-linux-a2c49a9ac993fa2b4795890d5fa56f2fc002453e.zip
Staging: keucr: scsiglue: fixed a do while coding style issue
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>
Diffstat (limited to 'drivers/staging/keucr/scsiglue.c')
-rw-r--r--drivers/staging/keucr/scsiglue.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/staging/keucr/scsiglue.c b/drivers/staging/keucr/scsiglue.c
index e1f3931d41e0..083b20e6253e 100644
--- a/drivers/staging/keucr/scsiglue.c
+++ b/drivers/staging/keucr/scsiglue.c
@@ -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