From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] image: fix bootm failure for FIT image
Date: Fri, 15 Aug 2014 12:04:13 -0600 [thread overview]
Message-ID: <53EE4B9D.7020400@wwwdotorg.org> (raw)
In-Reply-To: <1408124953-4708-1-git-send-email-pengw@nvidia.com>
On 08/15/2014 11:49 AM, Bryan Wu wrote:
> Commit b3dd64f5d537b41fc52a03e697271774891f4a70 introduced a bug for
Can we spell out the commit description too, so it's easier to know what
it refers too, and is useful if someone cherry-picks the commit so the
commit ID changes:
Commit b3dd64f5d537 "bootm: use genimg_get_kernel_addr()" introduced...
> booting FIT image. It's because calling fit_parse_config() twice will
> give us wrong value in img_addr.
>
> Add a new version for CONFIG_FIT of genimg_get_kernel_addr() and
> return fit_uname_config and fit_uname_kernel for CONFIG_FIT.
> diff --git a/common/image.c b/common/image.c
> -ulong genimg_get_kernel_addr(char * const img_addr)
> -{
> #if defined(CONFIG_FIT)
> - const char *fit_uname_config = NULL;
> - const char *fit_uname_kernel = NULL;
> +ulong genimg_get_kernel_addr(char * const img_addr,
> + const char **fit_uname_config,
> + const char **fit_uname_kernel)
> +#else
> +ulong genimg_get_kernel_addr(char * const img_addr)
> #endif
Indentation looks wrong on that #endif.
Wouldn't it be better to avoid repeating the common parts, so this instead:
ulong genimg_get_kernel_addr(char * const img_addr,
#if defined(CONFIG_FIT)
const char **fit_uname_config,
const char **fit_uname_kernel)
#endif
)
{
> diff --git a/include/configs/jetson-tk1.h b/include/configs/jetson-tk1.h
> +#define CONFIG_FIT
I think that crept in by mistake.
> diff --git a/include/image.h b/include/image.h
> index ca2fe86..a47c146 100644
> +#if defined(CONFIG_FIT)
> +ulong genimg_get_kernel_addr(char * const img_addr,
> + const char **fit_uname_config,
> + const char **fit_uname_kernel);
> +#else
> ulong genimg_get_kernel_addr(char * const img_addr);
> +#endif
Same comment about #ifdef placement here.
next prev parent reply other threads:[~2014-08-15 18:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-15 17:49 [U-Boot] [PATCH] image: fix bootm failure for FIT image Bryan Wu
2014-08-15 17:50 ` Bryan Wu
2014-08-15 17:53 ` York Sun
2014-08-15 18:06 ` York Sun
2014-08-15 18:09 ` Bryan Wu
2014-08-15 18:04 ` Stephen Warren [this message]
2014-08-15 18:25 ` Bryan Wu
2014-08-15 19:33 ` Simon Glass
2014-08-15 23:17 ` Bryan Wu
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=53EE4B9D.7020400@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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.