All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: remove bogus highest / lowest logic from clock rate
@ 2010-06-25  7:19 Guennadi Liakhovetski
  2010-06-25  7:45 ` [PATCH] sh: remove bogus highest / lowest logic from clock rate rounding Paul Mundt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Guennadi Liakhovetski @ 2010-06-25  7:19 UTC (permalink / raw)
  To: linux-sh

The use of highest and lowest in clk_rate_table_round() is completely bogus
and superfluous. Remove it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/sh/clk.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/drivers/sh/clk.c b/drivers/sh/clk.c
index 5d84ada..691f829 100644
--- a/drivers/sh/clk.c
+++ b/drivers/sh/clk.c
@@ -73,22 +73,14 @@ long clk_rate_table_round(struct clk *clk,
 {
 	unsigned long rate_error, rate_error_prev = ~0UL;
 	unsigned long rate_best_fit = rate;
-	unsigned long highest, lowest;
 	int i;
 
-	highest = lowest = 0;
-
 	for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
 		unsigned long freq = freq_table[i].frequency;
 
 		if (freq = CPUFREQ_ENTRY_INVALID)
 			continue;
 
-		if (freq > highest)
-			highest = freq;
-		if (freq < lowest)
-			lowest = freq;
-
 		rate_error = abs(freq - rate);
 		if (rate_error < rate_error_prev) {
 			rate_best_fit = freq;
@@ -99,11 +91,6 @@ long clk_rate_table_round(struct clk *clk,
 			break;
 	}
 
-	if (rate >= highest)
-		rate_best_fit = highest;
-	if (rate <= lowest)
-		rate_best_fit = lowest;
-
 	return rate_best_fit;
 }
 
-- 
1.6.2.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-25  9:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-25  7:19 [PATCH] sh: remove bogus highest / lowest logic from clock rate Guennadi Liakhovetski
2010-06-25  7:45 ` [PATCH] sh: remove bogus highest / lowest logic from clock rate rounding Paul Mundt
2010-06-25  8:27 ` [PATCH] sh: remove bogus highest / lowest logic from clock rate Guennadi Liakhovetski
2010-06-25  9:19 ` [PATCH] sh: remove bogus highest / lowest logic from clock rate rounding Paul Mundt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.