Re: [RFC]: Standardizing the SAL calls in arch/ia64

From: Jes Sorensen <jes_at_sgi.com>
Date: 2006-01-17 19:11:16
>>>>> "Prarit" == Prarit Bhargava <prarit@sgi.com> writes:

Prarit> After looking at the SAL calls in arch/ia64, I suggest that we
Prarit> standardize the SAL calls by using:

Prarit> #define SAL_CALL_RETURN(isrv) do { \ return isrv.status; \ }
Prarit> while (0)

Prarit> b) return status and isrv.v0,

Prarit> #define SAL_CALL_RETURN_V0(isrv, value) do { \ *value =
Prarit> isrv.v0; \ return isrv.status; \ } while (0)

Prarit> #define SAL_RETVAL_DECLARE(isrv) do { \ struct ia64_sal_retval
Prarit> isrv = { 0,0,0,0 }; \ }while (0)

Prarit> Thoughts, concerns?

Hi Prarit,

I agree with the principle, the current SAL code is an utter
mess. However, rather than obfuscating the code with a bunch of
macros, I'd prefer to simply stick a guideline at the top of the
relevant files and then change the code to match that. In particular
declaring variables within macros and macros that call 'return' aren't
good for making the code easy to read.

Cheers,
Jes
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Jan 17 19:11:54 2006

This archive was generated by hypermail 2.1.8 : 2006-01-17 19:12:09 EST