All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Herve Codina <herve.codina@bootlin.com>
Cc: Simon Glass <sjg@chromium.org>,
	Devicetree Compiler <devicetree-compiler@vger.kernel.org>
Subject: Re: [PATCH v2 1/4] fdtput: Require a leading '/' with -p
Date: Thu, 29 Oct 2026 13:07:35 +1100	[thread overview]
Message-ID: <auKqW836NgeMQu9L@gractus.seuss> (raw)
In-Reply-To: <20261028211449.261fadb5@bootlin.com>

[-- Attachment #1: Type: text/plain, Size: 2047 bytes --]

On Wed, Oct 28, 2026 at 09:14:49PM +0100, Herve Codina wrote:
> On Wed, 28 Oct 2026 01:34:17 -0600
> Simon Glass <sjg@chromium.org> wrote:
> 
> > With -p, a path which does not start with '/' is created from the root,
> > so a mistyped path silently adds nodes at the top level:
> > 
> >    $ fdtput -cp test.dtb foo/bar
> > 
> > This creates /foo/bar. The same happens for a path which starts with an
> > alias, such as serial0/sub, which creates /serial0/sub rather than
> > adding to the node which the alias points to.
> > 
> > Without -p, fdtput rejects such a path, since fdt_path_offset() treats a
> > path without a leading '/' as starting with an alias:
> > 
> >    $ fdtput -c test.dtb foo/bar
> >    Error at 'foo': FDT_ERR_BADPATH
> > 
> > Report an error with -p too. The next patch allows such a path to start
> > with an alias.
> 
> I would reword "The next patch allows" using "A future patch could allow" or
> I would simply remove the whole sentence ("The next patch ...");

As a rule, that is a better way of phrasing a commit message, so that
it doesn't become inaccurate if this are reordered.  In this case it's
not worth a respin, though.

> 
> Indeed, this current patch can be applied without the next one.
> 
> Other than that:
> Reviewed-by: Herve Codina <herve.codina@bootlin.com>
> 
> Best regards,
> Hervé
> 
> > 
> > This changes the behaviour of -p, so a script which relies on creating
> > nodes this way must add a leading '/'. Do this for the existing test
> > which relies on it, and add a test for the error.
> > 
> > Fixes: f807af192828 ("fdtput: Add -p option to create subnodes along entire path")
> > Suggested-by: David Gibson <david@gibson.dropbear.id.au>
> > Assisted-by: Claude:claude-opus-5-5
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> 

-- 
David Gibson (he or they)	| 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-10-29  2:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28  7:34 [PATCH v2 0/4] fdtput: Make it clearer how to create nodes Simon Glass
2026-10-28  7:34 ` [PATCH v2 1/4] fdtput: Require a leading '/' with -p Simon Glass
2026-10-28 20:14   ` Herve Codina
2026-10-29  2:07     ` David Gibson [this message]
2026-10-29  6:44       ` Simon Glass
2026-10-28  7:34 ` [PATCH v2 2/4] fdtput: Follow an alias when creating nodes " Simon Glass
2026-10-28 20:34   ` Herve Codina
2026-10-28  7:34 ` [PATCH v2 3/4] fdtput: Suggest -p when a node is missing Simon Glass
2026-10-28 21:08   ` Herve Codina
2026-10-29  2:02     ` David Gibson
2026-10-28  7:34 ` [PATCH v2 4/4] fdtput: Name the property when it cannot be deleted Simon Glass
2026-10-28 21:18   ` Herve Codina
2026-10-29  2:06 ` [PATCH v2 0/4] fdtput: Make it clearer how to create nodes 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=auKqW836NgeMQu9L@gractus.seuss \
    --to=david@gibson.dropbear.id.au \
    --cc=devicetree-compiler@vger.kernel.org \
    --cc=herve.codina@bootlin.com \
    --cc=sjg@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.