Re: [PATCH v7 4/5]: core: Add kernel message dumper to call on oopses and panics

Ingo Molnar
2009-10-15T09:32:48Z

* Simon Kagstrom <simon.kagstrom@netinsight.net> wrote:

> --- /dev/null
> +++ b/include/linux/kmsg_dump.h

> +enum kmsg_dump_reason {
> + kmsg_dump_oops,
> + kmsg_dump_panic,
> +};

Please capitalize constants - lower case suggests it's some sort of
variable which it is not.

> +void dump_kmsg(enum kmsg_dump_reason reason);
> +
> +int register_kmsg_dumper(struct kmsg_dumper *dumper);
> +
> +void unregister_kmsg_dumper(struct kmsg_dumper *dumper);

Please rename these APIs to be more in line with how we name new kernel
APIs. Something like:

kmsg_dump()
kmsg_dumper_register()
kmsg_dumper_unregister()

(we start with the subsystem as a prefix, then we go from more generic
to less generic words.)

Might even make sense to name them all kmsg_dump:

kmsg_dump()
kmsg_dump_register()
kmsg_dump_unregister()

Thanks,

Ingo