lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220128163527.1587325-1-usama.anjum@collabora.com>
Date:   Fri, 28 Jan 2022 21:35:27 +0500
From:   Muhammad Usama Anjum <usama.anjum@...labora.com>
To:     Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>
Cc:     Muhammad Usama Anjum <usama.anjum@...labora.com>,
        kernel@...labora.com, kernel-janitors@...r.kernel.org,
        linux-clk@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] clk: visconti: Remove dead code

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@...labora.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ