Re: [PATCH v2] firmware: arm_scmi: fix divide by zero when sustained_perf_level is zero

2018-09-06 Thread Sudeep Holla
On 06/09/18 17:59, Olof Johansson wrote: > Hi, > > On Thu, Sep 06, 2018 at 04:10:39PM +0100, Sudeep Holla wrote: >> Firmware can provide zero as values for sustained performance level and >> corresponding sustained frequency in kHz in order to hide the actual >> frequencies and provide only abs

Re: [PATCH v2] firmware: arm_scmi: fix divide by zero when sustained_perf_level is zero

2018-09-06 Thread Olof Johansson
Hi, On Thu, Sep 06, 2018 at 04:10:39PM +0100, Sudeep Holla wrote: > Firmware can provide zero as values for sustained performance level and > corresponding sustained frequency in kHz in order to hide the actual > frequencies and provide only abstract values. It may endup with divide > by zero scen

[PATCH v2] firmware: arm_scmi: fix divide by zero when sustained_perf_level is zero

2018-09-06 Thread Sudeep Holla
Firmware can provide zero as values for sustained performance level and corresponding sustained frequency in kHz in order to hide the actual frequencies and provide only abstract values. It may endup with divide by zero scenario resulting in kernel panic. Let's set the multiplication factor to one