devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Prusov Igor Vladimirovich <Igor.V.Prusov-wnI+JWxWOPs@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] fdtdump: fix output of bytestring properties
Date: Thu, 9 Jul 2015 13:50:26 +1000	[thread overview]
Message-ID: <20150709035026.GA18868@voom.redhat.com> (raw)
In-Reply-To: <559D4DCE.4040000-wnI+JWxWOPs@public.gmane.org>

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

On Wed, Jul 08, 2015 at 07:20:30PM +0300, Prusov Igor Vladimirovich wrote:
> Currently, when fdtdump prints bytestring property, it prints ffffff 
> in front of bytes with first bit equal to 1 (0x80 - 0xff)
> 
> For example:
> property = [80];
> will become
> property = [ffffff80];
> This patch fixes it.

Actually, it's worse than that.  It will print incorrectly on
platforms where char is signed by default, but not on those where it
is unsigned by default.

> Signed-off-by: Igor Prusov <Igor.V.Prusov-wnI+JWxWOPs@public.gmane.org>
> ---
>  util.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for this, but there are a couple of problems with this patch
that make it difficult for me to apply directly.

First, the usual convention is to diff the whole tree, not individual
files, so the resulting patch can be applied with -p1.

Second, it looks like your mailer has mangled the patch, replacing
tabs with spaces, which means it won't apply directly.

Please check those if you send patches in future.

FOr this specific bug, I'd actually prefer a slightly different fix,
so I've gone ahead and applied my own slightly different fix.

-- 
David Gibson			| 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: Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2015-07-09  3:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 16:20 [PATCH] fdtdump: fix output of bytestring properties Prusov Igor Vladimirovich
     [not found] ` <559D4DCE.4040000-wnI+JWxWOPs@public.gmane.org>
2015-07-09  3:50   ` David Gibson [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=20150709035026.GA18868@voom.redhat.com \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=Igor.V.Prusov-wnI+JWxWOPs@public.gmane.org \
    --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@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;
as well as URLs for NNTP newsgroup(s).