Staging: comedi: comedidev: Fixed a macro definition code style issue
PATCH 1/1 Staging: comedi: comedidev: Fixed a macro definition code style issue
Fixed a code style issue.
--- drivers/staging/comedi/comedidev.h | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
drivers/staging/comedi/comedidev.h +4 -3
@@ -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 \
Signature · 1 line
1.7.0.4
Quoted 13 lines · Michael Jensen
Fixed a code style issue.
Signed-off-by Michael Jensen <[email protected]>--- drivers/staging/comedi/comedidev.h | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)drivers/staging/comedi/comedidev.h +0
-0@@ -61,10 +61,11 @@ module_init(x ## _init_module); \
drivers/staging/comedi/comedidev.h line 68
Quoted 10 lines
drivers/staging/comedi/comedidev.h +4
-3module_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?
Signature · 1 line
js
Quoted 1 line · Jiri Slaby
<snip>
Quoted 4 lines
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
Quoted 10 lines · Michael Jensen
Quoted 1 line · Jiri Slaby
<snip>
Quoted 2 lines
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.
Signature · 1 line
js
Quoted 10 lines · Jiri Slaby
Quoted 9 lines · Michael Jensen
Quoted 1 line · Jiri Slaby
<snip>
Quoted 2 lines
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)...
Quoted 5 lines
Quoted 1 line
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