On Mon, Dec 10, 2007 at 02:28:39PM +1100, David Gibson wrote:
> +#define check_err(err) \
> +     ({ \
> +             if (BAD_ERROR(err) || ((err < 0) && DEBUG)) \
> +                     printf("%s():%d  %s\n\r", __FUNCTION__, __LINE__, \
> +                            fdt_strerror(err)); \
> +             if (BAD_ERROR(err)) \
> +                     exit(); \
> +             (err < 0) ? -1 : 0; \
> +     })
> +
> +#define offset_devp(off)     \
> +     ({ \
> +             int offset = (off); \
> +             check_err(offset) ? NULL : (void *)(offset+1); \
> +     })
> +
> +#define devp_offset(devp)    (((int)(devp))-1)

How does using offsets as devps work if a devp was previously acquired to a
node that has to be moved due to a change later made in an earlier part of
the tree?

-Scott
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to