Merge tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core and debugfs updates from Greg KH: "Here is the "big" driver core and debugfs changes for 5.3-rc1 It's a lot of different patches, all across the tree due to some api changes and lots of debugfs cleanups. Other than the debugfs cleanups, in this set of changes we have: - bus iteration function cleanups - scripts/get_abi.pl tool to display and parse Documentation/ABI entries in a simple way - cleanups to Documenatation/ABI/ entries to make them parse easier due to typos and other minor things - default_attrs use for some ktype users - driver model documentation file conversions to .rst - compressed firmware file loading - deferred probe fixes All of these have been in linux-next for a while, with a bunch of merge issues that Stephen has been patient with me for" * tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (102 commits) debugfs: make error message a bit more verbose orangefs: fix build warning from debugfs cleanup patch ubifs: fix build warning after debugfs cleanup patch driver: core: Allow subsystems to continue deferring probe drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT arch_topology: Remove error messages on out-of-memory conditions lib: notifier-error-inject: no need to check return value of debugfs_create functions swiotlb: no need to check return value of debugfs_create functions ceph: no need to check return value of debugfs_create functions sunrpc: no need to check return value of debugfs_create functions ubifs: no need to check return value of debugfs_create functions orangefs: no need to check return value of debugfs_create functions nfsd: no need to check return value of debugfs_create functions lib: 842: no need to check return value of debugfs_create functions debugfs: provide pr_fmt() macro debugfs: log errors when something goes wrong drivers: s390/cio: Fix compilation warning about const qualifiers drivers: Add generic helper to match by of_node driver_find_device: Unify the match function with class_find_device() bus_find_device: Unify the match callback with class_find_device ...
This commit is contained in:
@@ -103,39 +103,25 @@ static int bdi_debug_stats_show(struct seq_file *m, void *v)
|
||||
}
|
||||
DEFINE_SHOW_ATTRIBUTE(bdi_debug_stats);
|
||||
|
||||
static int bdi_debug_register(struct backing_dev_info *bdi, const char *name)
|
||||
static void bdi_debug_register(struct backing_dev_info *bdi, const char *name)
|
||||
{
|
||||
if (!bdi_debug_root)
|
||||
return -ENOMEM;
|
||||
|
||||
bdi->debug_dir = debugfs_create_dir(name, bdi_debug_root);
|
||||
if (!bdi->debug_dir)
|
||||
return -ENOMEM;
|
||||
|
||||
bdi->debug_stats = debugfs_create_file("stats", 0444, bdi->debug_dir,
|
||||
bdi, &bdi_debug_stats_fops);
|
||||
if (!bdi->debug_stats) {
|
||||
debugfs_remove(bdi->debug_dir);
|
||||
bdi->debug_dir = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
debugfs_create_file("stats", 0444, bdi->debug_dir, bdi,
|
||||
&bdi_debug_stats_fops);
|
||||
}
|
||||
|
||||
static void bdi_debug_unregister(struct backing_dev_info *bdi)
|
||||
{
|
||||
debugfs_remove(bdi->debug_stats);
|
||||
debugfs_remove(bdi->debug_dir);
|
||||
debugfs_remove_recursive(bdi->debug_dir);
|
||||
}
|
||||
#else
|
||||
static inline void bdi_debug_init(void)
|
||||
{
|
||||
}
|
||||
static inline int bdi_debug_register(struct backing_dev_info *bdi,
|
||||
static inline void bdi_debug_register(struct backing_dev_info *bdi,
|
||||
const char *name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void bdi_debug_unregister(struct backing_dev_info *bdi)
|
||||
{
|
||||
|
@@ -304,8 +304,7 @@ static int __init init_cleancache(void)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct dentry *root = debugfs_create_dir("cleancache", NULL);
|
||||
if (root == NULL)
|
||||
return -ENXIO;
|
||||
|
||||
debugfs_create_u64("succ_gets", 0444, root, &cleancache_succ_gets);
|
||||
debugfs_create_u64("failed_gets", 0444, root, &cleancache_failed_gets);
|
||||
debugfs_create_u64("puts", 0444, root, &cleancache_puts);
|
||||
|
@@ -77,63 +77,40 @@ static void pfn_inject_exit(void)
|
||||
|
||||
static int pfn_inject_init(void)
|
||||
{
|
||||
struct dentry *dentry;
|
||||
|
||||
hwpoison_dir = debugfs_create_dir("hwpoison", NULL);
|
||||
if (hwpoison_dir == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
/*
|
||||
* Note that the below poison/unpoison interfaces do not involve
|
||||
* hardware status change, hence do not require hardware support.
|
||||
* They are mainly for testing hwpoison in software level.
|
||||
*/
|
||||
dentry = debugfs_create_file("corrupt-pfn", 0200, hwpoison_dir,
|
||||
NULL, &hwpoison_fops);
|
||||
if (!dentry)
|
||||
goto fail;
|
||||
debugfs_create_file("corrupt-pfn", 0200, hwpoison_dir, NULL,
|
||||
&hwpoison_fops);
|
||||
|
||||
dentry = debugfs_create_file("unpoison-pfn", 0200, hwpoison_dir,
|
||||
NULL, &unpoison_fops);
|
||||
if (!dentry)
|
||||
goto fail;
|
||||
debugfs_create_file("unpoison-pfn", 0200, hwpoison_dir, NULL,
|
||||
&unpoison_fops);
|
||||
|
||||
dentry = debugfs_create_u32("corrupt-filter-enable", 0600,
|
||||
hwpoison_dir, &hwpoison_filter_enable);
|
||||
if (!dentry)
|
||||
goto fail;
|
||||
debugfs_create_u32("corrupt-filter-enable", 0600, hwpoison_dir,
|
||||
&hwpoison_filter_enable);
|
||||
|
||||
dentry = debugfs_create_u32("corrupt-filter-dev-major", 0600,
|
||||
hwpoison_dir, &hwpoison_filter_dev_major);
|
||||
if (!dentry)
|
||||
goto fail;
|
||||
debugfs_create_u32("corrupt-filter-dev-major", 0600, hwpoison_dir,
|
||||
&hwpoison_filter_dev_major);
|
||||
|
||||
dentry = debugfs_create_u32("corrupt-filter-dev-minor", 0600,
|
||||
hwpoison_dir, &hwpoison_filter_dev_minor);
|
||||
if (!dentry)
|
||||
goto fail;
|
||||
debugfs_create_u32("corrupt-filter-dev-minor", 0600, hwpoison_dir,
|
||||
&hwpoison_filter_dev_minor);
|
||||
|
||||
dentry = debugfs_create_u64("corrupt-filter-flags-mask", 0600,
|
||||
hwpoison_dir, &hwpoison_filter_flags_mask);
|
||||
if (!dentry)
|
||||
goto fail;
|
||||
debugfs_create_u64("corrupt-filter-flags-mask", 0600, hwpoison_dir,
|
||||
&hwpoison_filter_flags_mask);
|
||||
|
||||
dentry = debugfs_create_u64("corrupt-filter-flags-value", 0600,
|
||||
hwpoison_dir, &hwpoison_filter_flags_value);
|
||||
if (!dentry)
|
||||
goto fail;
|
||||
debugfs_create_u64("corrupt-filter-flags-value", 0600, hwpoison_dir,
|
||||
&hwpoison_filter_flags_value);
|
||||
|
||||
#ifdef CONFIG_MEMCG
|
||||
dentry = debugfs_create_u64("corrupt-filter-memcg", 0600,
|
||||
hwpoison_dir, &hwpoison_filter_memcg);
|
||||
if (!dentry)
|
||||
goto fail;
|
||||
debugfs_create_u64("corrupt-filter-memcg", 0600, hwpoison_dir,
|
||||
&hwpoison_filter_memcg);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
pfn_inject_exit();
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
module_init(pfn_inject_init);
|
||||
|
@@ -2105,14 +2105,9 @@ void __init kmemleak_init(void)
|
||||
*/
|
||||
static int __init kmemleak_late_init(void)
|
||||
{
|
||||
struct dentry *dentry;
|
||||
|
||||
kmemleak_initialized = 1;
|
||||
|
||||
dentry = debugfs_create_file("kmemleak", 0644, NULL, NULL,
|
||||
&kmemleak_fops);
|
||||
if (!dentry)
|
||||
pr_warn("Failed to create the debugfs kmemleak file\n");
|
||||
debugfs_create_file("kmemleak", 0644, NULL, NULL, &kmemleak_fops);
|
||||
|
||||
if (kmemleak_error) {
|
||||
/*
|
||||
|
@@ -575,8 +575,6 @@ static void __init zs_stat_init(void)
|
||||
}
|
||||
|
||||
zs_stat_root = debugfs_create_dir("zsmalloc", NULL);
|
||||
if (!zs_stat_root)
|
||||
pr_warn("debugfs 'zsmalloc' stat dir creation failed\n");
|
||||
}
|
||||
|
||||
static void __exit zs_stat_exit(void)
|
||||
@@ -647,29 +645,15 @@ DEFINE_SHOW_ATTRIBUTE(zs_stats_size);
|
||||
|
||||
static void zs_pool_stat_create(struct zs_pool *pool, const char *name)
|
||||
{
|
||||
struct dentry *entry;
|
||||
|
||||
if (!zs_stat_root) {
|
||||
pr_warn("no root stat dir, not creating <%s> stat dir\n", name);
|
||||
return;
|
||||
}
|
||||
|
||||
entry = debugfs_create_dir(name, zs_stat_root);
|
||||
if (!entry) {
|
||||
pr_warn("debugfs dir <%s> creation failed\n", name);
|
||||
return;
|
||||
}
|
||||
pool->stat_dentry = entry;
|
||||
pool->stat_dentry = debugfs_create_dir(name, zs_stat_root);
|
||||
|
||||
entry = debugfs_create_file("classes", S_IFREG | 0444,
|
||||
pool->stat_dentry, pool,
|
||||
&zs_stats_size_fops);
|
||||
if (!entry) {
|
||||
pr_warn("%s: debugfs file entry <%s> creation failed\n",
|
||||
name, "classes");
|
||||
debugfs_remove_recursive(pool->stat_dentry);
|
||||
pool->stat_dentry = NULL;
|
||||
}
|
||||
debugfs_create_file("classes", S_IFREG | 0444, pool->stat_dentry, pool,
|
||||
&zs_stats_size_fops);
|
||||
}
|
||||
|
||||
static void zs_pool_stat_destroy(struct zs_pool *pool)
|
||||
|
@@ -1253,8 +1253,6 @@ static int __init zswap_debugfs_init(void)
|
||||
return -ENODEV;
|
||||
|
||||
zswap_debugfs_root = debugfs_create_dir("zswap", NULL);
|
||||
if (!zswap_debugfs_root)
|
||||
return -ENOMEM;
|
||||
|
||||
debugfs_create_u64("pool_limit_hit", 0444,
|
||||
zswap_debugfs_root, &zswap_pool_limit_hit);
|
||||
|
Reference in New Issue
Block a user