Skip to content

Commit

Permalink
thermal: devfreq_cooling: Make power a u64
Browse files Browse the repository at this point in the history
The prototype of do_div() is:

uint32_t do_div(uint64_t *n, uint32_t base);

Make power u64 to avoid the following warning:

   drivers/thermal/devfreq_cooling.c: In function 'get_dynamic_power':
   drivers/thermal/devfreq_cooling.c:267:2: warning: comparison of distinct pointer types lacks a cast [enabled by default]
   drivers/thermal/devfreq_cooling.c:267:2: warning: right shift count >= width of type [enabled by default]
   drivers/thermal/devfreq_cooling.c:267:2: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default]
   include/asm-generic/div64.h:35:17: note: expected 'uint64_t *' but argument is of type 'long unsigned int *'

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
  • Loading branch information
Javi Merino authored and Eduardo Valentin committed Nov 2, 2015
1 parent 3c99c2c commit 61c8e8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/devfreq_cooling.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ static unsigned long
get_dynamic_power(struct devfreq_cooling_device *dfc, unsigned long freq,
unsigned long voltage)
{
unsigned long power;
u64 power;
u32 freq_mhz;
struct devfreq_cooling_power *dfc_power = dfc->power_ops;

Expand Down

0 comments on commit 61c8e8a

Please sign in to comment.