On Wed, Dec 12, 2007 at 03:45:28PM +1100, Stephen Rothwell wrote:
> On Tue, 11 Dec 2007 15:23:04 -0600 Scott Wood <[EMAIL PROTECTED]> wrote:
> >
> > #define offset_devp(off) \
> > ({ \
> > - int offset = (off); \
> > - check_err(offset) ? NULL : (void *)(offset+1); \
> > + int _offset = (off); \
> > + check_err(_offset) ? NULL : (void *)(_offset+1); \
> > })
>
> Just wondering if this could be a static inline function?
Alas, not really. If we did that, then the __FUNCTION__ and __LINE__
we use in the error message inside check_err() would always refer to
the offset_devp() function, which would be substantially less useful
than referring to the function which invoked the offset_devp() macro.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: Digital signature
_______________________________________________ Linuxppc-dev mailing list [email protected] https://ozlabs.org/mailman/listinfo/linuxppc-dev
