diff options
| author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2019-03-07 19:27:52 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-07 21:32:00 -0500 |
| commit | a4507fedcd2580d510d8d91ac6b99537f869f62a (patch) | |
| tree | 1079ad8d77b105e6d90c5e3ff6eb79700393a9e9 /include/linux/dynamic_debug.h | |
| parent | 513770f54edba8b19c2175a151e02f1dfc911d87 (diff) | |
dynamic_debug: add static inline stub for ddebug_add_module
For symmetry with ddebug_remove_module, and to avoid a bit of ifdeffery
in module.c, move the declaration of ddebug_add_module inside #if
defined(CONFIG_DYNAMIC_DEBUG) and add a corresponding no-op stub in the
#else branch.
Link: http://lkml.kernel.org/r/20190212214150.4807-10-linux@rasmusvillemoes.dk
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Jason Baron <jbaron@akamai.com>
Cc: David Sterba <dsterba@suse.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/dynamic_debug.h')
| -rw-r--r-- | include/linux/dynamic_debug.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index b17725400f75..3f8977cfa479 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
| @@ -47,10 +47,10 @@ struct _ddebug { | |||
| 47 | } __attribute__((aligned(8))); | 47 | } __attribute__((aligned(8))); |
| 48 | 48 | ||
| 49 | 49 | ||
| 50 | int ddebug_add_module(struct _ddebug *tab, unsigned int n, | ||
| 51 | const char *modname); | ||
| 52 | 50 | ||
| 53 | #if defined(CONFIG_DYNAMIC_DEBUG) | 51 | #if defined(CONFIG_DYNAMIC_DEBUG) |
| 52 | int ddebug_add_module(struct _ddebug *tab, unsigned int n, | ||
| 53 | const char *modname); | ||
| 54 | extern int ddebug_remove_module(const char *mod_name); | 54 | extern int ddebug_remove_module(const char *mod_name); |
| 55 | extern __printf(2, 3) | 55 | extern __printf(2, 3) |
| 56 | void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); | 56 | void __dynamic_pr_debug(struct _ddebug *descriptor, const char *fmt, ...); |
| @@ -152,6 +152,12 @@ do { \ | |||
| 152 | #include <linux/string.h> | 152 | #include <linux/string.h> |
| 153 | #include <linux/errno.h> | 153 | #include <linux/errno.h> |
| 154 | 154 | ||
| 155 | static inline int ddebug_add_module(struct _ddebug *tab, unsigned int n, | ||
| 156 | const char *modname) | ||
| 157 | { | ||
| 158 | return 0; | ||
| 159 | } | ||
| 160 | |||
| 155 | static inline int ddebug_remove_module(const char *mod) | 161 | static inline int ddebug_remove_module(const char *mod) |
| 156 | { | 162 | { |
| 157 | return 0; | 163 | return 0; |
