projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4b23c5
)
devfreq_cooling: no need to check state with negative number
author
Shawn Lin
<shawn.lin@rock-chips.com>
Mon, 22 Aug 2016 08:08:06 +0000
(16:08 +0800)
committer
Zhang Rui
<rui.zhang@intel.com>
Tue, 27 Sep 2016 06:02:16 +0000
(14:02 +0800)
We could see that state is defined as unsigned type, so it
should never be less than zero. Let' remove this check.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/devfreq_cooling.c
patch
|
blob
|
history
diff --git
a/drivers/thermal/devfreq_cooling.c
b/drivers/thermal/devfreq_cooling.c
index
01f0015
..
81631b1
100644
(file)
--- a/
drivers/thermal/devfreq_cooling.c
+++ b/
drivers/thermal/devfreq_cooling.c
@@
-312,7
+312,7
@@
static int devfreq_cooling_state2power(struct thermal_cooling_device *cdev,
unsigned long freq;
u32 static_power;
- if (state
< 0 || state
>= dfc->freq_table_size)
+ if (state >= dfc->freq_table_size)
return -EINVAL;
freq = dfc->freq_table[state];