All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/6] autoboot: rename abortboot_{keyed, normal} to __abortboot
Date: Wed, 22 Jun 2016 07:51:18 +0200	[thread overview]
Message-ID: <576A2756.7000809@denx.de> (raw)
In-Reply-To: <1466487167-18987-5-git-send-email-yamada.masahiro@socionext.com>

Hello Masahiro,

Am 21.06.2016 um 07:32 schrieb Masahiro Yamada:
> Because abortboot_keyed() and abortboot_normal() are not compiled
> at the same time, we can rename both of them to __abortboot().
> This allows to drop #ifdef from the caller.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
>   common/autoboot.c | 10 +++-------
>   1 file changed, 3 insertions(+), 7 deletions(-)

Thanks!

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
>
> diff --git a/common/autoboot.c b/common/autoboot.c
> index 35deece..eb31c88 100644
> --- a/common/autoboot.c
> +++ b/common/autoboot.c
> @@ -182,7 +182,7 @@ static int passwd_abort(uint64_t etime)
>    * Watch for 'delay' seconds for autoboot stop or autoboot delay string.
>    * returns: 0 -  no key string, allow autoboot 1 - got key string, abort
>    */
> -static int abortboot_keyed(int bootdelay)
> +static int __abortboot(int bootdelay)
>   {
>   	int abort;
>   	uint64_t etime = endtick(bootdelay);
> @@ -216,7 +216,7 @@ static int abortboot_keyed(int bootdelay)
>   static int menukey;
>   #endif
>
> -static int abortboot_normal(int bootdelay)
> +static int __abortboot(int bootdelay)
>   {
>   	int abort = 0;
>   	unsigned long ts;
> @@ -274,11 +274,7 @@ static int abortboot_normal(int bootdelay)
>
>   static int abortboot(int bootdelay)
>   {
> -#ifdef CONFIG_AUTOBOOT_KEYED
> -	return abortboot_keyed(bootdelay);
> -#else
> -	return abortboot_normal(bootdelay);
> -#endif
> +	return __abortboot(bootdelay);
>   }
>
>   static void process_fdt_options(const void *blob)
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  parent reply	other threads:[~2016-06-22  5:51 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21  5:32 [U-Boot] [PATCH 0/6] autoboot cleanups Masahiro Yamada
2016-06-21  5:32 ` [U-Boot] [PATCH 1/6] ARM: socfpga: move CONFIG_BOOTDELAY to Kconfig for IS1 board Masahiro Yamada
2016-06-21 11:40   ` Pavel Machek
2016-06-22  5:49   ` Heiko Schocher
2016-06-21  5:32 ` [U-Boot] [PATCH 2/6] doc: bootdelay: drop explanation about CONFIG_BOOTDELAY from README Masahiro Yamada
2016-06-21 16:05   ` Simon Glass
2016-06-22  5:49   ` Heiko Schocher
2016-06-21  5:32 ` [U-Boot] [PATCH 3/6] autoboot: remove CONFIG_ZERO_BOOTDELAY_CHECK Masahiro Yamada
2016-06-21  5:43   ` Stefan Roese
2016-06-21 16:01   ` Igor Grinberg
2016-06-21 16:05   ` Simon Glass
2016-06-22  5:30   ` Vladimir Zapolskiy
2016-06-22  5:50   ` Heiko Schocher
2016-06-22  6:42   ` Christian Riesch
2016-06-22 10:46   ` Hannes Schmelzer
2016-06-21  5:32 ` [U-Boot] [PATCH 4/6] autoboot: rename abortboot_{keyed, normal} to __abortboot Masahiro Yamada
2016-06-21  5:44   ` Stefan Roese
2016-06-21 16:06   ` Simon Glass
2016-06-22  5:51   ` Heiko Schocher [this message]
2016-06-21  5:32 ` [U-Boot] [PATCH 5/6] autoboot: move CONFIG_SILENT_CONSOLE handling Masahiro Yamada
2016-06-21  5:46   ` Stefan Roese
2016-06-21 16:06   ` Simon Glass
2016-06-22  5:51   ` Heiko Schocher
2016-06-21  5:32 ` [U-Boot] [PATCH 6/6] autoboot: move bootdelay >= 0 check to abortboot() Masahiro Yamada
2016-06-21  5:47   ` Stefan Roese
2016-06-21 16:06     ` Simon Glass
2016-06-22  5:57   ` Heiko Schocher

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=576A2756.7000809@denx.de \
    --to=hs@denx.de \
    --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.