From: Jiri Slaby on
On 07/23/2010 08:11 AM, Michael Jensen wrote:
> Fixed a code style issue.
>
> Signed-off-by: Michael Jensen <emjay1988(a)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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Jiri Slaby on
On 07/23/2010 11:17 AM, Michael Jensen wrote:
> On Fri, Jul 23, 2010 at 6:53 PM, Jiri Slaby <jirislaby(a)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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/