UPSTREAM: thermal: power_allocator: req_range multiplication should be a 64 bit type
authorJavi Merino <javi.merino@arm.com>
Wed, 6 Apr 2016 18:30:18 +0000 (19:30 +0100)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 13 May 2016 02:34:42 +0000 (10:34 +0800)
commit8985e0cc58a4a8075cd709291914749f432c271e
treef4a494beb9b2abdd0074be6ef59069842d801889
parent33d117f2af7b9a74e08cf29a31470dc0be72a6b3
UPSTREAM: thermal: power_allocator: req_range multiplication should be a 64 bit type

req_range is declared as a u64 to cope with overflows in the
multiplication of two u32.  As both req_power and power_range are u32,
we need to make sure the multiplication is done with u64 types.

Change-Id: I1aea92f12e48338be2681a9b2ba84756b6cc8cf8
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
(cherry picked from commit f9d038144a171d42e057143b247ff7a12a5b06f5)
drivers/thermal/power_allocator.c