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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1514596392-22270-13-git-send-email-pure.logic@nexus-software.ie>
Date:   Sat, 30 Dec 2017 01:12:51 +0000
From:   Bryan O'Donoghue <pure.logic@...us-software.ie>
To:     mturquette@...libre.com, sboyd@...eaurora.org,
        linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org
Cc:     pure.logic@...us-software.ie, Akinobu Mita <akinobu.mita@...il.com>
Subject: [PATCH 12/33] clk: cdce925: remove unnecessary long casts on return

Due to the old function signature of clk_ops->round_rate the cdce925
round_rate functions end up doing a cast of an internal unsigned long to a
long. After updating clk_ops->round_rate() to be an unsigned long though
the cast isn't necessary.

Remove the extraneous cast from:

- cdce925_pll_round_rate
- cdce925_clk_round_rate
- cdce925_clk_y1_round_rate

Signed-off-by: Bryan O'Donoghue <pure.logic@...us-software.ie>
Cc: Michael Turquette <mturquette@...libre.com>
Cc: Stephen Boyd <sboyd@...eaurora.org>
Cc: Akinobu Mita <akinobu.mita@...il.com>
Cc: linux-clk@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---
 drivers/clk/clk-cdce925.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/clk-cdce925.c b/drivers/clk/clk-cdce925.c
index 341e744..eecc262 100644
--- a/drivers/clk/clk-cdce925.c
+++ b/drivers/clk/clk-cdce925.c
@@ -149,7 +149,7 @@ static unsigned long cdce925_pll_round_rate(struct clk_hw *hw,
 	u16 n, m;
 
 	cdce925_pll_find_rate(rate, *parent_rate, &n, &m);
-	return (long)cdce925_pll_calculate_rate(*parent_rate, n, m);
+	return cdce925_pll_calculate_rate(*parent_rate, n, m);
 }
 
 static int cdce925_pll_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -449,7 +449,7 @@ static unsigned long cdce925_clk_round_rate(struct clk_hw *hw,
 	}
 
 	if (divider)
-		return (long)(l_parent_rate / divider);
+		return l_parent_rate / divider;
 	return 0;
 }
 
@@ -497,7 +497,7 @@ static unsigned long cdce925_clk_y1_round_rate(struct clk_hw *hw,
 	u16 divider = cdce925_y1_calc_divider(rate, l_parent_rate);
 
 	if (divider)
-		return (long)(l_parent_rate / divider);
+		return l_parent_rate / divider;
 	return 0;
 }
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ