From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Song, Youquan" <youquan.song@intel.com>
Cc: "Wu, Fengguang" <fengguang.wu@intel.com>,
"yuanhan.liu@linux.intel.com" <yuanhan.liu@linux.intel.com>,
Rik van Riel <riel@redhat.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Youquan Song <youquan.song@linux.intel.com>
Subject: Re: [PATCH] cpuidle: fix warning when compile
Date: Wed, 24 Oct 2012 23:03:18 +0200 [thread overview]
Message-ID: <4386557.NfbZYeZWxd@vostro.rjw.lan> (raw)
In-Reply-To: <70A3B115BE79814398B8E4E7C4AE18EE13A10B@SHSMSX101.ccr.corp.intel.com>
On Wednesday 24 of October 2012 02:14:13 Song, Youquan wrote:
> >> int64_t thresh = LLONG_MAX; /* Discard outliers above this value. */
>
> >Shouldn't this one be uint64_t too?
>
> Thanks Rafael! Fenggung also asked me the similar question.
> But I think, the compile only complains about do_div() at SH 32bit
> architecture, the above int64_t definition should be OK and I do not
> find any issue without changing it to uint64_t.
OK
I fixed up the original patch.
Thanks,
Rafael
> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> Sent: Wednesday, October 24, 2012 8:28 AM
> To: Song, Youquan
> Cc: Wu, Fengguang; yuanhan.liu@linux.intel.com; Rik van Riel; linux-pm@vger.kernel.org; Youquan Song
> Subject: Re: [PATCH] cpuidle: fix warning when compile
>
> On Tuesday 23 of October 2012 22:45:28 Youquan Song wrote:
> > Fix the warning complain when compile the kernel.
> >
> > drivers/cpuidle/governors/menu.c: In function 'get_typical_interval':
> > drivers/cpuidle/governors/menu.c:268:2: warning: comparison of
> > distinct pointer types lacks a cast [enabled by default]
> > drivers/cpuidle/governors/menu.c:277:2: warning: comparison of
> > distinct pointer types lacks a cast [enabled by default]
> >
> > Signed-off-by: Youquan Song <youquan.song@intel.com>
> > ---
> > drivers/cpuidle/governors/menu.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/cpuidle/governors/menu.c
> > b/drivers/cpuidle/governors/menu.c
> > index 26d5667..2efee27 100644
> > --- a/drivers/cpuidle/governors/menu.c
> > +++ b/drivers/cpuidle/governors/menu.c
> > @@ -248,7 +248,7 @@ static enum hrtimer_restart
> > menu_hrtimer_notify(struct hrtimer *hrtimer) static u32
> > get_typical_interval(struct menu_device *data) {
> > int i = 0, divisor = 0;
> > - int64_t max = 0, avg = 0, stddev = 0;
> > + uint64_t max = 0, avg = 0, stddev = 0;
> > int64_t thresh = LLONG_MAX; /* Discard outliers above this value. */
>
> Shouldn't this one be uint64_t too?
>
> > unsigned int ret = 0;
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
prev parent reply other threads:[~2012-10-24 20:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 2:45 [PATCH] cpuidle: fix warning when compile Youquan Song
2012-10-23 14:42 ` Fengguang Wu
2012-10-24 0:28 ` Rafael J. Wysocki
2012-10-24 2:14 ` Song, Youquan
2012-10-24 21:03 ` Rafael J. Wysocki [this message]
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=4386557.NfbZYeZWxd@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=fengguang.wu@intel.com \
--cc=linux-pm@vger.kernel.org \
--cc=riel@redhat.com \
--cc=youquan.song@intel.com \
--cc=youquan.song@linux.intel.com \
--cc=yuanhan.liu@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox