Thread (9 messages) 9 messages, 3 authors, 2012-12-17

Re: [PATCH 2/2] cpuidle: fix sysfs output for power_usage

From: Rafael J. Wysocki <hidden>
Date: 2012-12-17 07:51:37
Also in: lkml

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:
quoted
On Friday, December 14, 2012 03:17:37 PM Sivaram Nair wrote:
quoted
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"?

Should we actually print them at all in those case?  Perhaps it'll be better to
make the file appear empty then?

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help