From: Sivaram Nair <sivaramn@nvidia.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "rafael.j.wysocki@intel.com" <rafael.j.wysocki@intel.com>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>,
"shuox.liu@intel.com" <shuox.liu@intel.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"yanmin_zhang@intel.com" <yanmin_zhang@intel.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] cpuidle: fix sysfs output for power_usage
Date: Mon, 17 Dec 2012 10:46:07 +0200 [thread overview]
Message-ID: <20121217084607.GN10090@sivaramn-lnx> (raw)
In-Reply-To: <4160971.sv9ruOS3QC@vostro.rjw.lan>
On Mon, Dec 17, 2012 at 08:56:45AM +0100, Rafael J. Wysocki wrote:
> On Monday, December 17, 2012 09:38:15 AM Sivaram Nair wrote:
> > On Sat, Dec 15, 2012 at 01:03:02AM +0100, Rafael J. Wysocki wrote:
> > > On Friday, December 14, 2012 03:17:37 PM Sivaram Nair wrote:
> > > > cpuidle_state->power_usage is signed; so change the corresponding sysfs
> > > > ops to output signed value instead of unsigned.
> > >
> > > What's actually wrong with printing it as an unsigned int?
> >
> > power_usage could have negative values (for example cpuidle/driver.c
> > inits this value to -1, -2 etc. when drv->power_specified is not set) and
> > these shows up badly in the sysfs output.
>
> Does "badly" mean "as big positive numbers"?
Yes (sorry for not being clearer).
>
> Should we actually print them at all in those case? Perhaps it'll be better to
> make the file appear empty then?
May be, but why is power_usage signed in the first place? I also noticed
Daniel Lezcano's patches that reduces the scope of this variable. So,
perhaps we can just ignore this change.
-Sivaram
next prev parent reply other threads:[~2012-12-17 8:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 13:17 [PATCH 1/2] cpuidle: fix finding state with min power_usage Sivaram Nair
2012-12-14 13:17 ` Sivaram Nair
2012-12-14 13:17 ` [PATCH 2/2] cpuidle: fix sysfs output for power_usage Sivaram Nair
2012-12-14 13:17 ` Sivaram Nair
2012-12-15 0:03 ` Rafael J. Wysocki
2012-12-17 7:38 ` Sivaram Nair
2012-12-17 7:56 ` Rafael J. Wysocki
2012-12-17 8:46 ` Sivaram Nair [this message]
2012-12-17 12:09 ` Rafael J. Wysocki
2012-12-14 17:43 ` [PATCH 1/2] cpuidle: fix finding state with min power_usage Rik van Riel
2012-12-15 0:02 ` Rafael J. Wysocki
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=20121217084607.GN10090@sivaramn-lnx \
--to=sivaramn@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@sisk.pl \
--cc=shuox.liu@intel.com \
--cc=yanmin_zhang@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 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.