From: Rajagopal Venkat <rajagopal.venkat@linaro.org>
To: mturquette@linaro.org
Cc: patches@linaro.org, linaro-dev@lists.linaro.org,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Rajagopal Venkat <rajagopal.venkat@linaro.org>
Subject: [PATCH] clk: remove unreachable code
Date: Wed, 9 Jan 2013 11:59:48 +0530 [thread overview]
Message-ID: <1357712988-22317-1-git-send-email-rajagopal.venkat@linaro.org> (raw)
In-Reply-To: <1357650191-30842-1-git-send-email-rajagopal.venkat@linaro.org>
while reparenting a clock, NULL check is done for clock in
consideration and its new parent. So re-check is not required.
If done, else part becomes unreachable.
Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
---
drivers/clk/clk.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 251e45d..1c4097c 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1040,7 +1040,6 @@ void __clk_reparent(struct clk *clk, struct clk *new_parent)
{
#ifdef CONFIG_COMMON_CLK_DEBUG
struct dentry *d;
- struct dentry *new_parent_d;
#endif
if (!clk || !new_parent)
@@ -1048,22 +1047,14 @@ void __clk_reparent(struct clk *clk, struct clk *new_parent)
hlist_del(&clk->child_node);
- if (new_parent)
- hlist_add_head(&clk->child_node, &new_parent->children);
- else
- hlist_add_head(&clk->child_node, &clk_orphan_list);
+ hlist_add_head(&clk->child_node, &new_parent->children);
#ifdef CONFIG_COMMON_CLK_DEBUG
if (!inited)
goto out;
- if (new_parent)
- new_parent_d = new_parent->dentry;
- else
- new_parent_d = orphandir;
-
d = debugfs_rename(clk->dentry->d_parent, clk->dentry,
- new_parent_d, clk->name);
+ new_parent->dentry, clk->name);
if (d)
clk->dentry = d;
else
--
1.7.10.4
next prev parent reply other threads:[~2013-01-09 6:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 13:03 [PATCH] clk: remove unreachable code Rajagopal Venkat
2013-01-09 5:50 ` Tushar Behera
[not found] ` <50ED0517.5090907-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-01-09 5:58 ` Rajagopal Venkat
2013-01-09 6:29 ` Rajagopal Venkat [this message]
2013-01-09 6:35 ` Tushar Behera
[not found] ` <1357712988-22317-1-git-send-email-rajagopal.venkat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-01-15 22:45 ` Mike Turquette
2013-01-16 12:45 ` Rajagopal Venkat
[not found] ` <CA+Z25wW=g+-Uo2DLpD=0ADjWTh5DKQb5ePPXR1tz0LXH3_b-xg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-18 17:43 ` Mike Turquette
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1357712988-22317-1-git-send-email-rajagopal.venkat@linaro.org \
--to=rajagopal.venkat@linaro.org \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=patches@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).