* [PATCH 2/2] staging :keucr:scsiglue.c : fixed a macros should not be colon terminated issue
@ 2014-03-02 12:51 Keerthimai Janarthanan
2014-03-05 1:10 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Keerthimai Janarthanan @ 2014-03-02 12:51 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Keerthimai Janarthanan
fixed a coding style issue.
Signed-off-by: Keerthimai Janarthanan <keerthimaipb@gmail.com>
---
drivers/staging/keucr/scsiglue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/keucr/scsiglue.c b/drivers/staging/keucr/scsiglue.c
index ac3d34d..fce19a4 100644
--- a/drivers/staging/keucr/scsiglue.c
+++ b/drivers/staging/keucr/scsiglue.c
@@ -277,7 +277,7 @@ static int show_info(struct seq_file *m, struct Scsi_Host *host)
do { \
if (us->fflags & value) \
SPRINTF(" " #name); \
- } while (0);
+ } while (0)
US_DO_ALL_FLAGS
#undef US_FLAG
seq_putc(m, '\n');
--
1.8.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] staging :keucr:scsiglue.c : fixed a macros should not be colon terminated issue
2014-03-02 12:51 [PATCH 2/2] staging :keucr:scsiglue.c : fixed a macros should not be colon terminated issue Keerthimai Janarthanan
@ 2014-03-05 1:10 ` Greg KH
2014-03-05 1:44 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2014-03-05 1:10 UTC (permalink / raw)
To: Keerthimai Janarthanan; +Cc: devel, linux-kernel
On Sun, Mar 02, 2014 at 06:21:16PM +0530, Keerthimai Janarthanan wrote:
> fixed a coding style issue.
>
> Signed-off-by: Keerthimai Janarthanan <keerthimaipb@gmail.com>
> ---
> drivers/staging/keucr/scsiglue.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/keucr/scsiglue.c b/drivers/staging/keucr/scsiglue.c
> index ac3d34d..fce19a4 100644
> --- a/drivers/staging/keucr/scsiglue.c
> +++ b/drivers/staging/keucr/scsiglue.c
> @@ -277,7 +277,7 @@ static int show_info(struct seq_file *m, struct Scsi_Host *host)
> do { \
> if (us->fflags & value) \
> SPRINTF(" " #name); \
> - } while (0);
> + } while (0)
You just broke the build.
Please ALWAYS test your patches, don't break someone else's build with
broken patches...
Please be more careful.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] staging :keucr:scsiglue.c : fixed a macros should not be colon terminated issue
2014-03-05 1:10 ` Greg KH
@ 2014-03-05 1:44 ` Joe Perches
0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2014-03-05 1:44 UTC (permalink / raw)
To: Greg KH; +Cc: Keerthimai Janarthanan, devel, linux-kernel
On Tue, 2014-03-04 at 17:10 -0800, Greg KH wrote:
> On Sun, Mar 02, 2014 at 06:21:16PM +0530, Keerthimai Janarthanan wrote:
> > fixed a coding style issue.
[]
> > diff --git a/drivers/staging/keucr/scsiglue.c b/drivers/staging/keucr/scsiglue.c
[]
> > @@ -277,7 +277,7 @@ static int show_info(struct seq_file *m, struct Scsi_Host *host)
> > do { \
> > if (us->fflags & value) \
> > SPRINTF(" " #name); \
> > - } while (0);
> > + } while (0)
>
> You just broke the build.
>
> Please ALWAYS test your patches, don't break someone else's build with
> broken patches...
>
> Please be more careful.
Thanks Greg.
Keerthimai, a possibly "better" fix would be to add a
do { ... } while (0) guard and semicolons to the relatively
ugly US_DO_ALL_FLAGS macro and US_FLAG uses in
include/linux/usb_usual.h
include/linux/usb_usual.h:#define US_DO_ALL_FLAGS \
include/linux/usb_usual.h- US_FLAG(SINGLE_LUN, 0x00000001) \
include/linux/usb_usual.h- /* allow access to only LUN 0 */ \
include/linux/usb_usual.h- US_FLAG(NEED_OVERRIDE, 0x00000002) \
include/linux/usb_usual.h- /* unusual_devs entry is necessary */ \
...
and then add a semicolon to the uses of US_DO_ALL_FLAGS
and then remove a semicolon as above.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-05 1:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-02 12:51 [PATCH 2/2] staging :keucr:scsiglue.c : fixed a macros should not be colon terminated issue Keerthimai Janarthanan
2014-03-05 1:10 ` Greg KH
2014-03-05 1:44 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox