From b04e29f99165bfe34f0fed9a9390daac5bb6d2ec Mon Sep 17 00:00:00 2001 From: Santosh Mardi Date: Tue, 13 Nov 2018 14:57:42 +0530 Subject: [PATCH] PM / devfreq: bw_hwmon: use unsigned parameter for bytes_to_mbps In bytes_to_mbps function, the parameter is all unsigned, so change the decleration of the function to include unsigned long long to avoid compilation errors in 32 bit environment. Also changed the return value as unsigned long to avoid any data loss possible in 64 bit environment. Change-Id: I90aebfe32e86ebc17c414d6f3c0c3cbd6dddb0bd Signed-off-by: Santosh Mardi --- drivers/devfreq/governor_bw_hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/governor_bw_hwmon.c b/drivers/devfreq/governor_bw_hwmon.c index 2a57dc847279..fd95f4f145a8 100644 --- a/drivers/devfreq/governor_bw_hwmon.c +++ b/drivers/devfreq/governor_bw_hwmon.c @@ -154,7 +154,7 @@ out: \ #define MAX_MS 500U /* Returns MBps of read/writes for the sampling window. */ -static unsigned int bytes_to_mbps(long long bytes, unsigned int us) +static unsigned long bytes_to_mbps(unsigned long long bytes, unsigned int us) { bytes *= USEC_PER_SEC; do_div(bytes, us);