From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
kernel@collabora.com, kernel-janitors@vger.kernel.org,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] clk: visconti: Remove dead code
Date: Fri, 28 Jan 2022 21:35:27 +0500 [thread overview]
Message-ID: <20220128163527.1587325-1-usama.anjum@collabora.com> (raw)
rs_id is of unsigned type, u8. The condition rs_id >= 0 will always be
true. Remove the if-else condition and the dead code.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
drivers/clk/visconti/clkc.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/clk/visconti/clkc.c b/drivers/clk/visconti/clkc.c
index 56a8a4ffebca8..5ccf771d05985 100644
--- a/drivers/clk/visconti/clkc.c
+++ b/drivers/clk/visconti/clkc.c
@@ -147,13 +147,9 @@ int visconti_clk_register_gates(struct visconti_clk_provider *ctx,
if (!dev_name)
return -ENOMEM;
- if (clks[i].rs_id >= 0) {
- rson_offset = reset[clks[i].rs_id].rson_offset;
- rsoff_offset = reset[clks[i].rs_id].rsoff_offset;
- rs_idx = reset[clks[i].rs_id].rs_idx;
- } else {
- rson_offset = rsoff_offset = rs_idx = -1;
- }
+ rson_offset = reset[clks[i].rs_id].rson_offset;
+ rsoff_offset = reset[clks[i].rs_id].rsoff_offset;
+ rs_idx = reset[clks[i].rs_id].rs_idx;
div_clk = devm_clk_hw_register_fixed_factor(dev,
dev_name,
--
2.30.2
next reply other threads:[~2022-01-28 16:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 16:35 Muhammad Usama Anjum [this message]
2022-01-31 17:55 ` [PATCH] clk: visconti: Remove dead code Dan Carpenter
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=20220128163527.1587325-1-usama.anjum@collabora.com \
--to=usama.anjum@collabora.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=nobuhiro1.iwamatsu@toshiba.co.jp \
--cc=sboyd@kernel.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