public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH] image.h: Change android_image_get_dtb* to use uint and not u32
Date: Sun, 16 Feb 2020 11:53:23 -0500	[thread overview]
Message-ID: <20200216165323.GC18302@bill-the-cat> (raw)
In-Reply-To: <20200216162314.GA26923@lxhi-065.adit-jv.com>

On Sun, Feb 16, 2020 at 05:23:14PM +0100, Eugeniu Rosca wrote:
> Hi Tom,
> Cc: Masahiro Yamada
> 
> On Fri, Feb 14, 2020 at 12:38:19PM -0500, Tom Rini wrote:
> > The image.h header can be used fairly widely in U-Boot builds.  We
> > cannot use u32 here as it may be used in cases where we don't have that
> > typedef available and don't want to expose it either.  Use uint instead
> > here.
> > 
> > Cc: Eugeniu Rosca <roscaeugeniu@gmail.com>
> > Cc: Sam Protsenko <joe.skb7@gmail.com>
> > Signed-off-by: Tom Rini <trini@konsulko.com>
> > ---
> >  include/image.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/include/image.h b/include/image.h
> > index b316d167d8d7..1dc3b48d8689 100644
> > --- a/include/image.h
> > +++ b/include/image.h
> > @@ -1425,9 +1425,9 @@ int android_image_get_ramdisk(const struct andr_img_hdr *hdr,
> >  			      ulong *rd_data, ulong *rd_len);
> >  int android_image_get_second(const struct andr_img_hdr *hdr,
> >  			      ulong *second_data, ulong *second_len);
> > -bool android_image_get_dtbo(ulong hdr_addr, ulong *addr, u32 *size);
> > -bool android_image_get_dtb_by_index(ulong hdr_addr, u32 index, ulong *addr,
> > -				    u32 *size);
> > +bool android_image_get_dtbo(ulong hdr_addr, ulong *addr, uint *size);
> > +bool android_image_get_dtb_by_index(ulong hdr_addr, uint index, ulong *addr,
> > +				    uint *size);
> 
> While I think the change is harmless and brings some consistency and
> visual comfort when reviewing the types employed in 'include/image.h',
> I can hardly imagine a real-life breakage introduced by u32 in
> 'include/image.h'.

I ran in to this in practice with
http://patchwork.ozlabs.org/project/uboot/list/?series=155410&state=*
applied.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200216/42f6ca21/attachment.sig>

  reply	other threads:[~2020-02-16 16:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14 17:38 [PATCH] image.h: Change android_image_get_dtb* to use uint and not u32 Tom Rini
2020-02-16 16:23 ` Eugeniu Rosca
2020-02-16 16:53   ` Tom Rini [this message]
2020-02-16 22:04     ` Eugeniu Rosca
2020-02-17  7:45       ` Masahiro Yamada
2020-02-17 10:47         ` Eugeniu Rosca
2020-02-17 17:35         ` Tom Rini

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=20200216165323.GC18302@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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