Commit 7f480466 authored by Stephen Boyd's avatar Stephen Boyd

clk: Drop !clk checks in debugfs dumping

These recursive functions have checks for !clk being passed in, but the
callers are always looping through lists and therefore the pointers
can't be NULL. Drop the checks to simplify the code.
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
Link: https://lkml.kernel.org/r/20190826234729.145593-1-sboyd@kernel.org
parent 1ccc0ddf
...@@ -2849,9 +2849,6 @@ static struct hlist_head *orphan_list[] = { ...@@ -2849,9 +2849,6 @@ static struct hlist_head *orphan_list[] = {
static void clk_summary_show_one(struct seq_file *s, struct clk_core *c, static void clk_summary_show_one(struct seq_file *s, struct clk_core *c,
int level) int level)
{ {
if (!c)
return;
seq_printf(s, "%*s%-*s %7d %8d %8d %11lu %10lu %5d %6d\n", seq_printf(s, "%*s%-*s %7d %8d %8d %11lu %10lu %5d %6d\n",
level * 3 + 1, "", level * 3 + 1, "",
30 - level * 3, c->name, 30 - level * 3, c->name,
...@@ -2866,9 +2863,6 @@ static void clk_summary_show_subtree(struct seq_file *s, struct clk_core *c, ...@@ -2866,9 +2863,6 @@ static void clk_summary_show_subtree(struct seq_file *s, struct clk_core *c,
{ {
struct clk_core *child; struct clk_core *child;
if (!c)
return;
clk_summary_show_one(s, c, level); clk_summary_show_one(s, c, level);
hlist_for_each_entry(child, &c->children, child_node) hlist_for_each_entry(child, &c->children, child_node)
...@@ -2900,9 +2894,6 @@ static void clk_dump_one(struct seq_file *s, struct clk_core *c, int level) ...@@ -2900,9 +2894,6 @@ static void clk_dump_one(struct seq_file *s, struct clk_core *c, int level)
{ {
unsigned long min_rate, max_rate; unsigned long min_rate, max_rate;
if (!c)
return;
clk_core_get_boundaries(c, &min_rate, &max_rate); clk_core_get_boundaries(c, &min_rate, &max_rate);
/* This should be JSON format, i.e. elements separated with a comma */ /* This should be JSON format, i.e. elements separated with a comma */
...@@ -2923,9 +2914,6 @@ static void clk_dump_subtree(struct seq_file *s, struct clk_core *c, int level) ...@@ -2923,9 +2914,6 @@ static void clk_dump_subtree(struct seq_file *s, struct clk_core *c, int level)
{ {
struct clk_core *child; struct clk_core *child;
if (!c)
return;
clk_dump_one(s, c, level); clk_dump_one(s, c, level);
hlist_for_each_entry(child, &c->children, child_node) { hlist_for_each_entry(child, &c->children, child_node) {
......
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