Subject: Re: [PATCH]Enabling Auto poweron after power is restored.

From: [email-masked] (Linas Vepstas)
Date: Mon, 4 Dec 2006 13:31:14 -0600

On Mon, Dec 04, 2006 at 09:48:58AM -0600, Will Schmidt wrote:
> 
> You could eliminate the temp variable rtas_poweron_auto_token, and
> rewrite as something like:
> 
>                if (rtas_token("ibm,power-off-ups") == RTAS_UNKNOWN_SERVICE) {
>                        rc = rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1);
>                        printk(KERN_EMERG "Power-off called instead %d\n", rc );

Heh. I encouraged Manish to create the temp variable in an earlier round
of reviews. My personal taste is that nested subroutine calls are both
ugly and hard to debug, e.g. if rtas_token() for some reason returns
unexpected values, etc.

--linas