summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2017-10-05 20:18:42 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2017-10-05 20:21:02 +0900
commit6c3eb77746717f91bc3129b08b027d73d0dc04c4 (patch)
treeeb23d55609de886f325b1d61d77f59691e131a27
parent75cb6151c65f0b5cafe8161ad968cd29f2004660 (diff)
downloadlinux-3.10-artik-tizen.tar.gz
linux-3.10-artik-tizen.tar.bz2
linux-3.10-artik-tizen.zip
Remove build warnings including unused-varable and aggressive-loop-optimizations. After the commit 642f6f62a65e ("PM / devfreq: exynos5422: remove unused frequiencies"), the length of freq array is less than LV_END, so it should use ARRAY_SIZE() instead of LV_END. Change-Id: I2f6c3d87ae5ae667c6bdf950db3d476d8fb0c059 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rw-r--r--drivers/devfreq/exynos5422_bus_int.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/devfreq/exynos5422_bus_int.c b/drivers/devfreq/exynos5422_bus_int.c
index c6e6d79be19..bdc873b9d15 100644
--- a/drivers/devfreq/exynos5422_bus_int.c
+++ b/drivers/devfreq/exynos5422_bus_int.c
@@ -781,7 +781,7 @@ static void exynos5_int_set_freq(struct busfreq_data_int *data,
printk("Set int target: %ld\n", target_freq);
#endif
/* Find setting value with target and previous frequency */
- for (i = 0; i < LV_END; i++) {
+ for (i = 0; i < ARRAY_SIZE(int_bus_opp_list); i++) {
if (int_bus_opp_list[i].freq == target_freq)
target_idx = int_bus_opp_list[i].idx;
if (int_bus_opp_list[i].freq == pre_freq)
@@ -924,7 +924,7 @@ static void exynos5_int_update_state(unsigned int target_freq)
/*
* Find setting value with target frequency
*/
- for (i = LV_0; i < LV_END; i++) {
+ for (i = 0; i < ARRAY_SIZE(int_bus_opp_list); i++) {
if (int_bus_opp_list[i].freq == target_freq)
target_idx = i;
}
@@ -981,7 +981,7 @@ static int exynos5_int_busfreq_target(struct device *dev,
target_volt = get_limit_voltage(target_volt, data->volt_offset);
#endif
- for (i = LV_0; i < LV_END; i++) {
+ for (i = 0; i < ARRAY_SIZE(int_bus_opp_list); i++) {
if (int_bus_opp_list[i].freq == freq)
target_idx = int_bus_opp_list[i].idx;
}
@@ -1125,7 +1125,7 @@ static ssize_t int_show_state(struct device *dev, struct device_attribute *attr,
{
unsigned int i;
ssize_t len = 0;
- ssize_t write_cnt = (ssize_t)((PAGE_SIZE / LV_END) - 2);
+ ssize_t __maybe_unused write_cnt = (ssize_t)((PAGE_SIZE / LV_END) - 2);
int count = opp_get_opp_count(dev->parent);
for (i = LV_0; i < count; i++)
@@ -1394,7 +1394,7 @@ static int exynos5_devfreq_int_probe(struct platform_device *pdev)
volt = opp_get_voltage(opp);
rcu_read_unlock();
regulator_set_voltage(data->vdd_int, volt, volt + VOLT_STEP);
- for (i = LV_0; i < LV_END; i++) {
+ for (i = 0; i < ARRAY_SIZE(int_bus_opp_list); i++) {
if (int_bus_opp_list[i].freq == exynos5_int_devfreq_profile.initial_freq)
index = int_bus_opp_list[i].idx;
}