devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts/dtc: dtx_diff: fix documentation for redirect workaround
Date: Wed, 12 Jan 2022 13:45:57 -0600	[thread overview]
Message-ID: <1f4e0d22-efea-e2f7-4c85-78953c142c0f@gmail.com> (raw)
In-Reply-To: <20220112101441.23088-1-matthias.schiffer@ew.tq-group.com>

Hi Matthisas,

On 1/12/22 4:14 AM, Matthias Schiffer wrote:
> dtx_diff suggests to use <(...) syntax to pipe two inputs into it, but
> this has never worked: The /proc/self/fds/... paths passed by the shell
> will fail the `[ -f "${dtx}" ] && [ -r "${dtx}" ]` check in compile_to_dts,
> but even with this check removed, the function cannot work: hexdump will
> eat up the DTB magic, making the subsequent dtc call fail, as a pipe
> cannot be rewound.

Thanks for catching this.

I would rather just remove this first workaround entirely instead of
changing it to use 'diff'.  Can you redo the patch to do the removal?

Thanks,

Frank


> 
> Change the example to use `diff -u` directly.
> 
> Fixes: 10eadc253ddf ("dtc: create tool to diff device trees")
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> ---
>  scripts/dtc/dtx_diff | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/dtc/dtx_diff b/scripts/dtc/dtx_diff
> index d3422ee15e30..f97eb83420a4 100755
> --- a/scripts/dtc/dtx_diff
> +++ b/scripts/dtc/dtx_diff
> @@ -62,7 +62,7 @@ Otherwise DTx is treated as a dts source file (aka .dts).
>     may not work since \${ARCH} is part of the include path.  Two possible
>     workarounds:
>  
> -      `basename $0` \\
> +      diff -u \\
>            <(ARCH=arch_of_dtx_1 `basename $0` DTx_1) \\
>            <(ARCH=arch_of_dtx_2 `basename $0` DTx_2)
>  
> 


      reply	other threads:[~2022-01-12 19:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 10:14 [PATCH] scripts/dtc: dtx_diff: fix documentation for redirect workaround Matthias Schiffer
2022-01-12 19:45 ` Frank Rowand [this message]

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=1f4e0d22-efea-e2f7-4c85-78953c142c0f@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.schiffer@ew.tq-group.com \
    --cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).