[PATCH] [POWERPC] fix up log_plpar_hcall_return

Will Schmidt will_schmidt at vnet.ibm.com
Thu Mar 8 02:29:05 EST 2007


On Wed, 2007-07-03 at 11:12 +1100, Stephen Rothwell wrote: 
> [sfr done Blue Hair]

Hi Stephen, 

/me looks for blue spraypaint..

> Hi Will,
> 
> On Tue, 06 Mar 2007 17:11:41 -0600 Will Schmidt <will_schmidt at vnet.ibm.com> wrote:
> >
> > This is mostly cosmetic.  This updates log_plpar_hcall_return() to use a
> > case statement rather than an if-then-else jumble, and moves it to
> > rtas.c where it can be near the other rtas related functions.
> 
> You are moving a static function from the only file that calls it.  You
> are exporting it when the only callers are in a file that cannot be part
> of a module and you are (maybe) optimizing something that is only used in
> error paths.

> Sorry, but unless you are doing to introduce others uses, that I don't
> see that this change helps.

Yes.  This moves the function to somewhere a bit more accessible so
others *can* call it.   The comment at the top of the function being
replaced even says something like "find a better place for me...".  

Lparcfg *did* begin it's life as a module, and I'm sure I've turned it
back into a module at least once.   I dont know when it was last
reverted, but suspect it was done by someone who didnt know about
EXPORT_PER_CPU_SYMBOL_GPL, but I digress.. 
I've got a patch to turn lparcfg back into a module, but wanted to start
with this simpler cleanup patch first.

All that, and I've wanted to get rid of that particular if-else mess for
a while.  You are right that it's an error path optimization, though
this change isn't meant as much for optimization as fixing up the horrid
coding style that was initially used.

> [sfr redons normal hair]
How about Purple?  :-)

> 
> I don't mean to sound harsh  :-)
Not a problem.    depending on what other comments I get back, I'll
reorganize a bit and submit a larger patchset with other changes too. 

-Will

> 
> --
> Cheers,
> Stephen Rothwell                    sfr at canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/




More information about the Linuxppc-dev mailing list