Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1260887

[PATCH 2/2] thermal: devfreq_cooling: Make power a u64

From Javi Merino <javi.merino@arm.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] thermal: devfreq_cooling: Make power a u64
Date 2015-11-02 20:10 +0100
Message-ID <qqsEq-Gy-5@gated-at.bofh.it> (permalink)
References <qqsEp-Gy-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/thermal/devfreq_cooling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
index 31e40a9a9fd0..d1b7c32e7406 100644
--- a/drivers/thermal/devfreq_cooling.c
+++ b/drivers/thermal/devfreq_cooling.c
@@ -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;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] Fixes for devfreq cooling Javi Merino <javi.merino@arm.com> - 2015-11-02 20:10 +0100
  [PATCH 2/2] thermal: devfreq_cooling: Make power a u64 Javi Merino <javi.merino@arm.com> - 2015-11-02 20:10 +0100
  [PATCH 1/2] thermal: devfreq_cooling: use a thermal_cooling_device for register and unregister Javi Merino <javi.merino@arm.com> - 2015-11-02 20:10 +0100

csiph-web