public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale•com>
To: David Gibson <david@gibson•dropbear.id.au>
Cc: linuxppc-dev@ozlabs•org, Paul Mackerras <paulus@samba•org>
Subject: Re: [PATCH 2/3] Use embedded libfdt in the bootwrapper
Date: Mon, 10 Dec 2007 11:32:17 -0600	[thread overview]
Message-ID: <20071210173217.GB4497@loki.buserror.net> (raw)
In-Reply-To: <20071210032839.71412DDDFA@ozlabs.org>

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

  reply	other threads:[~2007-12-10 17:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-10  3:23 [0/3] Merge libfdt into the bootwrapper David Gibson
2007-12-10  3:28 ` [PATCH 2/3] Use embedded libfdt in " David Gibson
2007-12-10 17:32   ` Scott Wood [this message]
2007-12-10 23:10     ` David Gibson
2007-12-10 23:19       ` Scott Wood
2007-12-10 23:27         ` Scott Wood
2007-12-10 23:32         ` David Gibson
2007-12-10  3:28 ` [PATCH 3/3] Kill flatdevtree.c David Gibson
2007-12-10  3:28 ` [PATCH 1/3] Merge libfdt upstream source David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071210173217.GB4497@loki.buserror.net \
    --to=scottwood@freescale$(echo .)com \
    --cc=david@gibson$(echo .)dropbear.id.au \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox