* [PATCH] Staging: comedi: comedidev: Fixed a macro definition code style issue
@ 2010-07-23 6:11 Michael Jensen
2010-07-23 8:53 ` Jiri Slaby
0 siblings, 1 reply; 5+ messages in thread
From: Michael Jensen @ 2010-07-23 6:11 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Michael Jensen
Fixed a code style issue.
Signed-off-by: Michael Jensen <emjay1988@gmail.com>
---
drivers/staging/comedi/comedidev.h | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index 4eb2b77..a46e859 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -61,10 +61,11 @@
module_init(x ## _init_module); \
module_exit(x ## _cleanup_module);
-#define COMEDI_MODULE_MACROS \
- MODULE_AUTHOR("Comedi http://www.comedi.org"); \
+#define COMEDI_MODULE_MACROS do { \
+ MODULE_AUTHOR("Comedi http://www.comedi.org"); \
MODULE_DESCRIPTION("Comedi low-level driver"); \
- MODULE_LICENSE("GPL");
+ MODULE_LICENSE("GPL"); \
+} while (0)
#define COMEDI_INITCLEANUP(x) \
COMEDI_MODULE_MACROS \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Staging: comedi: comedidev: Fixed a macro definition code style issue
2010-07-23 6:11 [PATCH] Staging: comedi: comedidev: Fixed a macro definition code style issue Michael Jensen
@ 2010-07-23 8:53 ` Jiri Slaby
2010-07-23 9:17 ` Michael Jensen
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Slaby @ 2010-07-23 8:53 UTC (permalink / raw)
To: Michael Jensen; +Cc: gregkh, devel, linux-kernel
On 07/23/2010 08:11 AM, Michael Jensen wrote:
> Fixed a code style issue.
>
> Signed-off-by: Michael Jensen <emjay1988@gmail.com>
> ---
> drivers/staging/comedi/comedidev.h | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
> index 4eb2b77..a46e859 100644
> --- a/drivers/staging/comedi/comedidev.h
> +++ b/drivers/staging/comedi/comedidev.h
> @@ -61,10 +61,11 @@
> module_init(x ## _init_module); \
> module_exit(x ## _cleanup_module);
>
> -#define COMEDI_MODULE_MACROS \
> - MODULE_AUTHOR("Comedi http://www.comedi.org"); \
> +#define COMEDI_MODULE_MACROS do { \
> + MODULE_AUTHOR("Comedi http://www.comedi.org"); \
> MODULE_DESCRIPTION("Comedi low-level driver"); \
> - MODULE_LICENSE("GPL");
> + MODULE_LICENSE("GPL"); \
> +} while (0)
Hmm, does this compile?
--
js
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Staging: comedi: comedidev: Fixed a macro definition code style issue
2010-07-23 8:53 ` Jiri Slaby
@ 2010-07-23 9:17 ` Michael Jensen
2010-07-23 10:36 ` Jiri Slaby
0 siblings, 1 reply; 5+ messages in thread
From: Michael Jensen @ 2010-07-23 9:17 UTC (permalink / raw)
To: Jiri Slaby; +Cc: gregkh, devel, linux-kernel
On Fri, Jul 23, 2010 at 6:53 PM, Jiri Slaby <jirislaby@gmail.com> wrote:
>
<snip>
> Hmm, does this compile?
>
> --
> js
I did build the comedi directory (as per Greg's "Write and submit your
first kernel patch" video), and didn't get any errors (once I'd done
the configuration)...
Did I miss something?
[apologies, resending because gmail sent HTML versions to the mailing
lists (ack!)]
--
Regards,
Michael Jensen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Staging: comedi: comedidev: Fixed a macro definition code style issue
2010-07-23 9:17 ` Michael Jensen
@ 2010-07-23 10:36 ` Jiri Slaby
2010-07-23 12:07 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Slaby @ 2010-07-23 10:36 UTC (permalink / raw)
To: Michael Jensen; +Cc: gregkh, devel, linux-kernel
On 07/23/2010 11:17 AM, Michael Jensen wrote:
> On Fri, Jul 23, 2010 at 6:53 PM, Jiri Slaby <jirislaby@gmail.com> wrote:
>>
> <snip>
>> Hmm, does this compile?
>>
> I did build the comedi directory (as per Greg's "Write and submit your
> first kernel patch" video), and didn't get any errors (once I'd done
> the configuration)...
>
> Did I miss something?
Then the macro is probably unused (or unused in your configuration).
Either way, the macro seems to be intended for use in the top-level
scope, so do { } while (0) cannot be used there.
--
js
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Staging: comedi: comedidev: Fixed a macro definition code style issue
2010-07-23 10:36 ` Jiri Slaby
@ 2010-07-23 12:07 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2010-07-23 12:07 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Michael Jensen, devel, linux-kernel
On Fri, Jul 23, 2010 at 12:36:44PM +0200, Jiri Slaby wrote:
> On 07/23/2010 11:17 AM, Michael Jensen wrote:
> > On Fri, Jul 23, 2010 at 6:53 PM, Jiri Slaby <jirislaby@gmail.com> wrote:
> >>
> > <snip>
> >> Hmm, does this compile?
> >>
> > I did build the comedi directory (as per Greg's "Write and submit your
> > first kernel patch" video), and didn't get any errors (once I'd done
> > the configuration)...
> >
> > Did I miss something?
>
> Then the macro is probably unused (or unused in your configuration).
> Either way, the macro seems to be intended for use in the top-level
> scope, so do { } while (0) cannot be used there.
I think we might have now removed all users of that macro, so it should
just be deleted.
Michael, can you do that instead of the do/while stuff here, as that is
not a valid change.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-23 12:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-23 6:11 [PATCH] Staging: comedi: comedidev: Fixed a macro definition code style issue Michael Jensen
2010-07-23 8:53 ` Jiri Slaby
2010-07-23 9:17 ` Michael Jensen
2010-07-23 10:36 ` Jiri Slaby
2010-07-23 12:07 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox