Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1336520 > unrolled thread
| Started by | Punit Agrawal <punit.agrawal@arm.com> |
|---|---|
| First post | 2016-02-17 16:40 +0100 |
| Last post | 2016-02-17 16:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] thermal: devfreq_cooling: remove impossible condition Punit Agrawal <punit.agrawal@arm.com> - 2016-02-17 16:40 +0100
| From | Punit Agrawal <punit.agrawal@arm.com> |
|---|---|
| Date | 2016-02-17 16:40 +0100 |
| Subject | Re: [PATCH] thermal: devfreq_cooling: remove impossible condition |
| Message-ID | <r3cmR-8kt-1@gated-at.bofh.it> |
Sudip Mukherjee <sudipm.mukherjee@gmail.com> writes: > state is an unsigned long and can never be less than 0. > > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> > --- > drivers/thermal/devfreq_cooling.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c > index 01f0015..81631b1 100644 > --- 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]; Makes sense. Acked-by: Punit Agrawal <punit.agrawal@arm.com> Thanks for sending the fix.
Back to top | Article view | linux.kernel
csiph-web