On 12/10/2015 05:29 PM, Patrick Bellasi wrote:
[ ... ]
+void stats_add(struct stats *s, s32 value) +{
- /*
* In order to prevent an overflow in the statistic code, we
* limit the value to 2^24 - 1, if it is greater we just
* ignore it with a WARN_ON_ONCE letting know to userspace we
* are dealing with out-of-range values.
*/
- if (WARN_ON_ONCE(value >= ((2<<24) - 1)))
^^^^^^^^^^^
Should this not be ((1<<24) -1)?
Ah yes :)
-- http://www.linaro.org/ Linaro.org │ Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro Facebook | http://twitter.com/#!/linaroorg Twitter | http://www.linaro.org/linaro-blog/ Blog