From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] bootm: propagate register_image_handler return value
Date: Wed, 7 Oct 2020 10:06:32 +0200 [thread overview]
Message-ID: <20201007080632.GK11648@pengutronix.de> (raw)
In-Reply-To: <20201005080643.25199-1-a.fatoum@pengutronix.de>
On Mon, Oct 05, 2020 at 10:06:43AM +0200, Ahmad Fatoum wrote:
> While register_image_handler can't currently fail, it still returns an
> error code. Propagate that error code along instead of having a blanket
> return 0. This makes the code a little more compact.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/arm/mach-stm32mp/stm32image.c | 4 +---
> arch/arm/mach-zynq/bootm-zynqimg.c | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/mach-stm32mp/stm32image.c b/arch/arm/mach-stm32mp/stm32image.c
> index 84975c5c3bf1..207df6894d4e 100644
> --- a/arch/arm/mach-stm32mp/stm32image.c
> +++ b/arch/arm/mach-stm32mp/stm32image.c
> @@ -43,8 +43,6 @@ static struct image_handler image_handler_stm32_image_v1_handler = {
>
> static int stm32mp_register_stm32image_image_handler(void)
> {
> - register_image_handler(&image_handler_stm32_image_v1_handler);
> -
> - return 0;
> + return register_image_handler(&image_handler_stm32_image_v1_handler);
> }
> late_initcall(stm32mp_register_stm32image_image_handler);
> diff --git a/arch/arm/mach-zynq/bootm-zynqimg.c b/arch/arm/mach-zynq/bootm-zynqimg.c
> index e903ab667905..77ed6880e4b6 100644
> --- a/arch/arm/mach-zynq/bootm-zynqimg.c
> +++ b/arch/arm/mach-zynq/bootm-zynqimg.c
> @@ -42,8 +42,6 @@ static struct image_handler zynq_image_handler = {
>
> static int zynq_register_image_handler(void)
> {
> - register_image_handler(&zynq_image_handler);
> -
> - return 0;
> + return register_image_handler(&zynq_image_handler);
> }
> late_initcall(zynq_register_image_handler);
> --
> 2.28.0
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2020-10-07 8:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 8:06 Ahmad Fatoum
2020-10-07 8:06 ` Sascha Hauer [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=20201007080632.GK11648@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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