Re: [PATCH 1/3] thermal: step_wise: fix: Prevent from binary overflow when trend is dropping

2014-10-08 Thread Zhang Rui
On Wed, 2014-09-24 at 10:27 +0200, Lukasz Majewski wrote: > It turns out that some boards can have instance->lower greater than 0 and > when thermal trend is dropping it results with next_target equal to -1. > > Since the next_target is defined as unsigned long it is interpreted as > 0x an

Re: [PATCH 1/3] thermal: step_wise: fix: Prevent from binary overflow when trend is dropping

2014-10-03 Thread Lukasz Majewski
Hi Eduardo, > Hello Lukasz, > > On Wed, Sep 24, 2014 at 10:27:10AM +0200, Lukasz Majewski wrote: > > It turns out that some boards can have instance->lower greater than > > 0 and when thermal trend is dropping it results with next_target > > equal to -1. > > > > Since the next_target is defined

Re: [PATCH 1/3] thermal: step_wise: fix: Prevent from binary overflow when trend is dropping

2014-10-02 Thread Eduardo Valentin
Hello Lukasz, On Wed, Sep 24, 2014 at 10:27:10AM +0200, Lukasz Majewski wrote: > It turns out that some boards can have instance->lower greater than 0 and > when thermal trend is dropping it results with next_target equal to -1. > > Since the next_target is defined as unsigned long it is interpre

[PATCH 1/3] thermal: step_wise: fix: Prevent from binary overflow when trend is dropping

2014-09-24 Thread Lukasz Majewski
It turns out that some boards can have instance->lower greater than 0 and when thermal trend is dropping it results with next_target equal to -1. Since the next_target is defined as unsigned long it is interpreted as 0x and larger than instance->upper. As a result the next_target is set to