From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] FIT: delete unnecessary casts
Date: Thu, 19 Sep 2013 19:22:36 +0200 [thread overview]
Message-ID: <523B32DC.8010801@myspectrum.nl> (raw)
In-Reply-To: <1379560218-16256-1-git-send-email-yamada.m@jp.panasonic.com>
On 09/19/2013 05:10 AM, Masahiro Yamada wrote:
> Becuase fdt_check_header function takes (const void *)
> type argument, the argument should be passed to it
> without being casted to (char *).
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> ---
>
> Changes for v2:
> - fix commit log (purely cosmetic)
> (s/img_addr/the argument/)
>
>
> common/image-fdt.c | 2 +-
> common/image-fit.c | 2 +-
> common/image.c | 6 +-----
> tools/fit_image.c | 2 +-
> 4 files changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/common/image-fdt.c b/common/image-fdt.c
> index 2e22cca..6f9ce7d 100644
> --- a/common/image-fdt.c
> +++ b/common/image-fdt.c
> @@ -55,7 +55,7 @@ static const image_header_t *image_get_fdt(ulong fdt_addr)
> fdt_error("uImage is compressed");
> return NULL;
> }
> - if (fdt_check_header((char *)image_get_data(fdt_hdr)) != 0) {
> + if (fdt_check_header((void *)image_get_data(fdt_hdr)) != 0) {
> fdt_error("uImage data is not a fdt");
> return NULL;
> }
Not that I care, this is fine with me. Was just
wondering if this cast is needed at all. AFAIK
it is a cpp thing (and MSVC?) to require it.
Regards,
Jeroen
next prev parent reply other threads:[~2013-09-19 17:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 3:10 [U-Boot] [PATCH v2] FIT: delete unnecessary casts Masahiro Yamada
2013-09-19 17:22 ` Jeroen Hofstee [this message]
2013-09-21 1:59 ` Simon Glass
2013-09-21 12:07 ` [U-Boot] [U-Boot,v2] " 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=523B32DC.8010801@myspectrum.nl \
--to=jeroen@myspectrum.nl \
--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 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.