dynamic_debug: combine parse_args callbacks together
authorJim Cromie <jim.cromie@gmail.com>
Fri, 27 Apr 2012 20:30:37 +0000 (14:30 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Apr 2012 20:24:34 +0000 (16:24 -0400)
commit6ab676e96422f33a873006096f928feeded7ce3b
treedbb5ae0912831f528db8cd654ca96a294a5afb33
parentf0b919d967284313be4a767ba92ab5a88cb27410
dynamic_debug: combine parse_args callbacks together

Refactor ddebug_dyndbg_boot_param_cb and ddebug_dyndbg_module_param_cb
into a common helper function, and call it from both.  The handling of
foo.dyndbg is unneeded by the latter, but harmless.

The 2 callers differ only by pr_info and the return code they pass to
the helper for when an unknown param is handled.  I could slightly
reduce dmesg clutter by putting the vpr_info in the common helper,
after the return on_err, but that loses __func__ context, is overly
silent on module_cb unknown param errors, and the clutter is only when
dynamic_debug.verbose=1 anyway.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/dynamic_debug.c