aboutsummaryrefslogtreecommitdiffstats
path: root/p02
diff options
Diffstat (limited to 'p02')
-rw-r--r--p02218
1 files changed, 0 insertions, 218 deletions
diff --git a/p02 b/p02
deleted file mode 100644
index 48adb99bbf0eff..00000000000000
--- a/p02
+++ /dev/null
@@ -1,218 +0,0 @@
-From e82f2d8eab210dc7eb0dba2bd8e3c64ad485442b Mon Sep 17 00:00:00 2001
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Date: Wed, 30 May 2018 16:15:35 +0200
-Subject: [PATCH] arm: no need to check return value of debugfs_create functions
-
-When calling debugfs functions, there is no need to ever check the
-return value. The function can work or not, but the code logic should
-never do something different based on this.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- arch/arm/include/asm/ptdump.h | 9 +----
- arch/arm/mach-omap1/clock.c | 67 ++++++++---------------------------------
- arch/arm/mach-omap1/pm.c | 7 +---
- arch/arm/mach-omap2/pm-debug.c | 15 +++------
- arch/arm/mm/dump.c | 4 +-
- arch/arm/mm/ptdump_debugfs.c | 8 +---
- 6 files changed, 29 insertions(+), 81 deletions(-)
-
---- a/arch/arm/include/asm/ptdump.h
-+++ b/arch/arm/include/asm/ptdump.h
-@@ -21,13 +21,10 @@ struct ptdump_info {
-
- void ptdump_walk_pgd(struct seq_file *s, struct ptdump_info *info);
- #ifdef CONFIG_ARM_PTDUMP_DEBUGFS
--int ptdump_debugfs_register(struct ptdump_info *info, const char *name);
-+void ptdump_debugfs_register(struct ptdump_info *info, const char *name);
- #else
--static inline int ptdump_debugfs_register(struct ptdump_info *info,
-- const char *name)
--{
-- return 0;
--}
-+static inline void ptdump_debugfs_register(struct ptdump_info *info,
-+ const char *name) { }
- #endif /* CONFIG_ARM_PTDUMP_DEBUGFS */
-
- void ptdump_check_wx(void);
---- a/arch/arm/mach-omap1/clock.c
-+++ b/arch/arm/mach-omap1/clock.c
-@@ -990,84 +990,45 @@ static int debug_clock_show(struct seq_f
-
- DEFINE_SHOW_ATTRIBUTE(debug_clock);
-
--static int clk_debugfs_register_one(struct clk *c)
-+static void clk_debugfs_register_one(struct clk *c)
- {
-- int err;
- struct dentry *d;
- struct clk *pa = c->parent;
-
- d = debugfs_create_dir(c->name, pa ? pa->dent : clk_debugfs_root);
-- if (!d)
-- return -ENOMEM;
- c->dent = d;
-
-- d = debugfs_create_u8("usecount", S_IRUGO, c->dent, &c->usecount);
-- if (!d) {
-- err = -ENOMEM;
-- goto err_out;
-- }
-- d = debugfs_create_ulong("rate", S_IRUGO, c->dent, &c->rate);
-- if (!d) {
-- err = -ENOMEM;
-- goto err_out;
-- }
-- d = debugfs_create_x8("flags", S_IRUGO, c->dent, &c->flags);
-- if (!d) {
-- err = -ENOMEM;
-- goto err_out;
-- }
-- return 0;
--
--err_out:
-- debugfs_remove_recursive(c->dent);
-- return err;
-+ debugfs_create_u8("usecount", S_IRUGO, c->dent, &c->usecount);
-+ debugfs_create_ulong("rate", S_IRUGO, c->dent, &c->rate);
-+ debugfs_create_x8("flags", S_IRUGO, c->dent, &c->flags);
- }
-
--static int clk_debugfs_register(struct clk *c)
-+static void clk_debugfs_register(struct clk *c)
- {
- int err;
- struct clk *pa = c->parent;
-
-- if (pa && !pa->dent) {
-- err = clk_debugfs_register(pa);
-- if (err)
-- return err;
-- }
--
-- if (!c->dent) {
-- err = clk_debugfs_register_one(c);
-- if (err)
-- return err;
-- }
-- return 0;
-+ if (pa && !pa->dent)
-+ clk_debugfs_register(pa);
-+
-+ if (!c->dent)
-+ clk_debugfs_register_one(c);
- }
-
- static int __init clk_debugfs_init(void)
- {
- struct clk *c;
- struct dentry *d;
-- int err;
-
- d = debugfs_create_dir("clock", NULL);
-- if (!d)
-- return -ENOMEM;
- clk_debugfs_root = d;
-
-- list_for_each_entry(c, &clocks, node) {
-- err = clk_debugfs_register(c);
-- if (err)
-- goto err_out;
-- }
--
-- d = debugfs_create_file("summary", S_IRUGO,
-- d, NULL, &debug_clock_fops);
-- if (!d)
-- return -ENOMEM;
-+ list_for_each_entry(c, &clocks, node)
-+ clk_debugfs_register(c);
-+
-+ debugfs_create_file("summary", S_IRUGO, d, NULL, &debug_clock_fops);
-
- return 0;
--err_out:
-- debugfs_remove_recursive(clk_debugfs_root);
-- return err;
- }
- late_initcall(clk_debugfs_init);
-
---- a/arch/arm/mach-omap1/pm.c
-+++ b/arch/arm/mach-omap1/pm.c
-@@ -539,11 +539,8 @@ static void omap_pm_init_debugfs(void)
- struct dentry *d;
-
- d = debugfs_create_dir("pm_debug", NULL);
-- if (!d)
-- return;
--
-- (void) debugfs_create_file("omap_pm", S_IWUSR | S_IRUGO,
-- d, NULL, &omap_pm_debug_fops);
-+ debugfs_create_file("omap_pm", S_IWUSR | S_IRUGO, d, NULL,
-+ &omap_pm_debug_fops);
- }
-
- #endif /* CONFIG_DEBUG_FS */
---- a/arch/arm/mach-omap2/pm-debug.c
-+++ b/arch/arm/mach-omap2/pm-debug.c
-@@ -193,9 +193,8 @@ static int __init pwrdms_setup(struct po
- return 0;
-
- d = debugfs_create_dir(pwrdm->name, (struct dentry *)dir);
-- if (d)
-- (void) debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d,
-- (void *)pwrdm, &pwrdm_suspend_fops);
-+ debugfs_create_file("suspend", S_IRUGO|S_IWUSR, d, pwrdm,
-+ &pwrdm_suspend_fops);
-
- return 0;
- }
-@@ -233,16 +232,14 @@ static int __init pm_dbg_init(void)
- return 0;
-
- d = debugfs_create_dir("pm_debug", NULL);
-- if (!d)
-- return -EINVAL;
-
-- (void) debugfs_create_file("count", 0444, d, NULL, &pm_dbg_counters_fops);
-- (void) debugfs_create_file("time", 0444, d, NULL, &pm_dbg_timers_fops);
-+ debugfs_create_file("count", 0444, d, NULL, &pm_dbg_counters_fops);
-+ debugfs_create_file("time", 0444, d, NULL, &pm_dbg_timers_fops);
-
- pwrdm_for_each(pwrdms_setup, (void *)d);
-
-- (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
-- &enable_off_mode, &pm_dbg_option_fops);
-+ debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
-+ &enable_off_mode, &pm_dbg_option_fops);
- pm_dbg_init_done = 1;
-
- return 0;
---- a/arch/arm/mm/dump.c
-+++ b/arch/arm/mm/dump.c
-@@ -450,7 +450,7 @@ void ptdump_check_wx(void)
- static int ptdump_init(void)
- {
- ptdump_initialize();
-- return ptdump_debugfs_register(&kernel_ptdump_info,
-- "kernel_page_tables");
-+ ptdump_debugfs_register(&kernel_ptdump_info, "kernel_page_tables");
-+ return 0;
- }
- __initcall(ptdump_init);
---- a/arch/arm/mm/ptdump_debugfs.c
-+++ b/arch/arm/mm/ptdump_debugfs.c
-@@ -24,11 +24,7 @@ static const struct file_operations ptdu
- .release = single_release,
- };
-
--int ptdump_debugfs_register(struct ptdump_info *info, const char *name)
-+void ptdump_debugfs_register(struct ptdump_info *info, const char *name)
- {
-- struct dentry *pe;
--
-- pe = debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
-- return pe ? 0 : -ENOMEM;
--
-+ debugfs_create_file(name, 0400, NULL, info, &ptdump_fops);
- }