diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fault-inject.c | 21 | ||||
-rw-r--r-- | lib/kobject.c | 2 |
2 files changed, 1 insertions, 22 deletions
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index c5c7a762b850..d7d501ea856d 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c @@ -182,27 +182,6 @@ static struct dentry *debugfs_create_stacktrace_depth( #endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */ -static int debugfs_atomic_t_set(void *data, u64 val) -{ - atomic_set((atomic_t *)data, val); - return 0; -} - -static int debugfs_atomic_t_get(void *data, u64 *val) -{ - *val = atomic_read((atomic_t *)data); - return 0; -} - -DEFINE_SIMPLE_ATTRIBUTE(fops_atomic_t, debugfs_atomic_t_get, - debugfs_atomic_t_set, "%lld\n"); - -static struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, - struct dentry *parent, atomic_t *value) -{ - return debugfs_create_file(name, mode, parent, value, &fops_atomic_t); -} - struct dentry *fault_create_debugfs_attr(const char *name, struct dentry *parent, struct fault_attr *attr) { diff --git a/lib/kobject.c b/lib/kobject.c index b7e29a6056d3..4a1f33d43548 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -805,7 +805,7 @@ static struct kset *kset_create(const char *name, kset = kzalloc(sizeof(*kset), GFP_KERNEL); if (!kset) return NULL; - retval = kobject_set_name(&kset->kobj, name); + retval = kobject_set_name(&kset->kobj, "%s", name); if (retval) { kfree(kset); return NULL; |