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>] [day] [month] [year] [list]
Date:	Tue,  3 Apr 2012 21:34:06 -0400
From:	jhbird.choi@...il.com
To:	linux-kernel@...r.kernel.org
Cc:	MyungJoo Ham <myungjoo.ham@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Jonghwan Choi <jhbird.choi@...sung.com>
Subject: [PATCH] PM / devfreq : Remove duplicate freq check code in exynos4_bus.c

From: Jonghwan Choi <jhbird.choi@...sung.com>

New freq & old freq is already checked before exynos42xx_set_busclk().
"if (old_freq == freq) return 0" is existed at the begin of a
exynos4_bus_target().

Signed-off-by: Jonghwan Choi <jhbird.choi@...sung.com>
---
 drivers/devfreq/exynos4_bus.c |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
index 88ddc77..d94998c 100644
--- a/drivers/devfreq/exynos4_bus.c
+++ b/drivers/devfreq/exynos4_bus.c
@@ -648,18 +648,17 @@ static int exynos4_bus_target(struct device *dev, unsigned long *_freq,
 	if (err)
 		goto out;
 
-	if (old_freq != freq) {
-		switch (data->type) {
-		case TYPE_BUSF_EXYNOS4210:
-			err = exynos4210_set_busclk(data, opp);
-			break;
-		case TYPE_BUSF_EXYNOS4x12:
-			err = exynos4x12_set_busclk(data, opp);
-			break;
-		default:
-			err = -EINVAL;
-		}
+	switch (data->type) {
+	case TYPE_BUSF_EXYNOS4210:
+		err = exynos4210_set_busclk(data, opp);
+		break;
+	case TYPE_BUSF_EXYNOS4x12:
+		err = exynos4x12_set_busclk(data, opp);
+		break;
+	default:
+		err = -EINVAL;
 	}
+
 	if (err)
 		goto out;
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ