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>
This commit is contained in:
parent
b38e274fdb
commit
a2c49a9ac9
1 changed files with 8 additions and 3 deletions
|
@ -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 */
|
/* we use this macro to help us write into the buffer */
|
||||||
#undef SPRINTF
|
#undef SPRINTF
|
||||||
#define SPRINTF(args...) \
|
#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()
|
* proc_info()
|
||||||
|
@ -279,8 +282,10 @@ static int proc_info(struct Scsi_Host *host, char *buffer, char **start,
|
||||||
pos += sprintf(pos, " Quirks:");
|
pos += sprintf(pos, " Quirks:");
|
||||||
|
|
||||||
#define US_FLAG(name, value) \
|
#define US_FLAG(name, value) \
|
||||||
if (us->fflags & value)\
|
do { \
|
||||||
pos += sprintf(pos, " " #name);
|
if (us->fflags & value) \
|
||||||
|
pos += sprintf(pos, " " #name); \
|
||||||
|
} while (0);
|
||||||
US_DO_ALL_FLAGS
|
US_DO_ALL_FLAGS
|
||||||
#undef US_FLAG
|
#undef US_FLAG
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue