Initial cleanup patch : acpi.c

Richard Hughes hughsient at gmail.com
Mon Mar 13 05:41:48 PST 2006


On Mon, 2006-03-13 at 14:24 +0100, Danny Kukawka wrote:
> On Monday 13 March 2006 12:03, Richard Hughes wrote:
> > Simple patch attached.
> >
> > * Cleans up trailing tabs and spaces.
> > * Adds the omitted battery.reporting.last_full from the coldplug
> > routine. This only affects people that query the key before the function
> > battery_poll_infrequently is called (which is called every hour, or
> > whenever the user plugs in/out the ac_adapter).
> > * Indents some of the larger lines so that they fit on my iBook screen.
> 
> Sorry, but is this really needed ... I have here also machines with XGA and I 
> only need to change my font if the lines are to long ... or is this not 
> possible?

It's an 800x600 screen. I can't see much below 8pt and it not fun to
program with fonts that small.

> Btw.:
> - add variable calculate_per_time is not needed if you use this variable only 
> one time. You should let this as it was.

For readability I added one boolean. The compiler will probably inline
it, so net object code change is (or should be) no different.

> - I don't understand the comment 2 (* Adds the omitted 
> battery.reporting.last_full ... ) in relation to the code and the changes.

battery.reporting.last_full was only being updated in
battery_poll_infrequently, and not in battery coldplug.

> The comment make no sense to me and the change also not really.

Well, thanks for the review. I hope I addressed your concerns. This is
the first of a few cleanups I have planned, but I thought I would do
them slowly and gradually rather than the mega patch that you also
disagreed with.

Richard.



More information about the hal mailing list