Devicetree
 help / color / mirror / Atom feed
From: Scott Wood <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: libfdt: Property iteration
Date: Mon, 27 Oct 2008 17:14:41 -0500	[thread overview]
Message-ID: <20081027221441.GA8763@ld0162-tx32.am.freescale.net> (raw)

A while back when discussing property iterators
(http://ozlabs.org/pipermail/linuxppc-dev/2008-January/049891.html), you
said that you'd prefer not to expose property offsets, because more
common uses would be affected by changing offsets.  I'm looking again at
this, and was wondering what alternative and would-be-broken use cases
you were thinking of?

We could operate on property indices or names at an efficiency cost. 
Most nodes should be small enough that the cost isn't too much, but I'd
like to know which use cases really need it.  The ones I'd use it for
involve reading from one tree and adding to another, so moving offsets
aren't an issue.

Even in a use case where one makes in-place changes while iterating over
properties, changes to the property currently being iterated over should
only move later properties -- the next call to fdt_next_prop would be
based on the start of the property that was modified, which did not
change.

-Scott

             reply	other threads:[~2008-10-27 22:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27 22:14 Scott Wood [this message]
     [not found] ` <20081027221441.GA8763-VKaLA/mbEU932VTgPCOETVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2008-11-07  2:54   ` libfdt: Property iteration David Gibson
     [not found]     ` <20081107025444.GK6692-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-11-07  3:39       ` 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=20081027221441.GA8763@ld0162-tx32.am.freescale.net \
    --to=scottwood-kzfg59tc24xl57midrcfdg@public.gmane.org \
    --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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