Commit 6ddb23c7 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

fault_inject: silence a warning

lib/fault-inject.c:168: warning: 'debugfs_create_ul_MAX_STACK_TRACE_DEPTH' defined but not used
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d316ee57
...@@ -139,12 +139,14 @@ static void debugfs_ul_set(void *data, u64 val) ...@@ -139,12 +139,14 @@ static void debugfs_ul_set(void *data, u64 val)
*(unsigned long *)data = val; *(unsigned long *)data = val;
} }
#ifdef CONFIG_FAULT_INJECTION_STACKTRACE_FILTER
static void debugfs_ul_set_MAX_STACK_TRACE_DEPTH(void *data, u64 val) static void debugfs_ul_set_MAX_STACK_TRACE_DEPTH(void *data, u64 val)
{ {
*(unsigned long *)data = *(unsigned long *)data =
val < MAX_STACK_TRACE_DEPTH ? val < MAX_STACK_TRACE_DEPTH ?
val : MAX_STACK_TRACE_DEPTH; val : MAX_STACK_TRACE_DEPTH;
} }
#endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */
static u64 debugfs_ul_get(void *data) static u64 debugfs_ul_get(void *data)
{ {
...@@ -159,6 +161,7 @@ static struct dentry *debugfs_create_ul(const char *name, mode_t mode, ...@@ -159,6 +161,7 @@ static struct dentry *debugfs_create_ul(const char *name, mode_t mode,
return debugfs_create_file(name, mode, parent, value, &fops_ul); return debugfs_create_file(name, mode, parent, value, &fops_ul);
} }
#ifdef CONFIG_FAULT_INJECTION_STACKTRACE_FILTER
DEFINE_SIMPLE_ATTRIBUTE(fops_ul_MAX_STACK_TRACE_DEPTH, debugfs_ul_get, DEFINE_SIMPLE_ATTRIBUTE(fops_ul_MAX_STACK_TRACE_DEPTH, debugfs_ul_get,
debugfs_ul_set_MAX_STACK_TRACE_DEPTH, "%llu\n"); debugfs_ul_set_MAX_STACK_TRACE_DEPTH, "%llu\n");
...@@ -169,6 +172,7 @@ static struct dentry *debugfs_create_ul_MAX_STACK_TRACE_DEPTH( ...@@ -169,6 +172,7 @@ static struct dentry *debugfs_create_ul_MAX_STACK_TRACE_DEPTH(
return debugfs_create_file(name, mode, parent, value, return debugfs_create_file(name, mode, parent, value,
&fops_ul_MAX_STACK_TRACE_DEPTH); &fops_ul_MAX_STACK_TRACE_DEPTH);
} }
#endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */
static void debugfs_atomic_t_set(void *data, u64 val) static void debugfs_atomic_t_set(void *data, u64 val)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment