Re: [RFC PATCH 1/3] STM trace event: Adding generic buffer interface driver

From: Paul Bolle
Date: Sat Jun 06 2015 - 08:27:51 EST


On Fri, 2015-06-05 at 13:37 +0800, Chunyan Zhang wrote:
> --- a/drivers/stm/Kconfig
> +++ b/drivers/stm/Kconfig

> +config STM_TRACE_EVENT
> + tristate "Redirect/copy the output from kernel trace event to
> STM engine"
> + depends on STM
> + help
> + This option can be used to redirect or copy the output from
> kernel trace
> + event to STM engine. Enabling this option will introduce a slight
> + timing effect.
> +
> + If you want to send kernel trace event messages over STM devices,
> + say Y.

It seems your mailer (or some mailserver) mangled this part.

> --- /dev/null
> +++ b/drivers/stm/stm_trace_event.c

> +static int stm_trace_event_init(void)
> +{
> + return stm_source_register_device(NULL, &stm_trace_event_data);
> +}

Is there are reason not to mark this __init?

> +static void stm_trace_event_exit(void)
> +{
> + stm_source_unregister_device(&stm_trace_event_data);
> +}

Ditto, but here it's __exit, of course.

> +module_init(stm_trace_event_init);
> +module_exit(stm_trace_event_exit);

(These are not rhetorical questions. I actually wonder whether there a
reasons not to mark module_init() and module_exit() functions with
__init and __exit.)


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/