提交 0702d9ee 编写于 作者: K Kevin Cernekee 提交者: Rafael J. Wysocki

PM: Fix signed/unsigned warning in dpm_show_time()

Seen on MIPS32, gcc 4.4.3, 2.6.36-rc4:

drivers/base/power/main.c: In function 'dpm_show_time':
drivers/base/power/main.c:415: warning: comparison of distinct pointer types lacks a cast

do_div() takes unsigned parameters:

uint32_t do_div(uint64_t *n, uint32_t base);

Using an unsigned variable for usecs64 should not cause any problems,
because calltime >= starttime .
Signed-off-by: NKevin Cernekee <cernekee@gmail.com>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
上级 ac5c24ec
......@@ -407,7 +407,7 @@ static void pm_dev_err(struct device *dev, pm_message_t state, char *info,
static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info)
{
ktime_t calltime;
s64 usecs64;
u64 usecs64;
int usecs;
calltime = ktime_get();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册