]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerEduardo Valentin <edubezval@gmail.com>
Wed, 20 Apr 2016 23:22:45 +0000 (16:22 -0700)
commitc6330ab2d09f74ba548516817d812d9e101d694a
treef369a61f4a975566158427a691cc509e6d3e9cb2
parent1f5108d3e0afb78e121183b557f6f28c8e1414eb
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.

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>
drivers/thermal/power_allocator.c