From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Kevin Cernekee <cernekee@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>,
linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PM: Fix signed/unsigned warning
Date: Mon, 20 Sep 2010 21:27:24 +0200 [thread overview]
Message-ID: <201009202127.24691.rjw@sisk.pl> (raw)
In-Reply-To: <8136c24e8aaf577b86dfdfc40b0d01e6@localhost>
On Monday, September 20, 2010, Kevin Cernekee wrote:
> 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: Kevin Cernekee <cernekee@gmail.com>
OK, I'm going to apply it.
Thanks,
Rafael
> ---
> drivers/base/power/main.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> index 276d5a7..db67719 100644
> --- a/drivers/base/power/main.c
> +++ b/drivers/base/power/main.c
> @@ -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();
>
next prev parent reply other threads:[~2010-09-20 19:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-20 18:33 [PATCH] PM: Fix signed/unsigned warning Kevin Cernekee
2010-09-20 19:27 ` Rafael J. Wysocki [this message]
2010-09-20 19:27 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2010-09-20 18:33 Kevin Cernekee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201009202127.24691.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=cernekee@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.