diff mbox series

fastboot: fix fastboot_set_reboot_flag()

Message ID 20210508222524.4511-1-r.stratiienko@gmail.com
State Accepted
Commit 51566bc8c37205d73f45ee97409063fedc1cdfd8
Delegated to: Tom Rini
Headers show
Series fastboot: fix fastboot_set_reboot_flag() | expand

Commit Message

Roman Stratiienko May 8, 2021, 10:25 p.m. UTC
In case CONFIG_FASTBOOT_FLASH_MMC_DEV == 0, compile-time condition
is not met and fastboot_set_reboot_flag() fails.

Fixes: a362ce214f03 ("fastboot: Implement generic fastboot_set_reboot_flag")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
---
 drivers/fastboot/fb_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sean Anderson Nov. 3, 2021, 4:22 p.m. UTC | #1
On 5/8/21 6:25 PM, Roman Stratiienko wrote:
> In case CONFIG_FASTBOOT_FLASH_MMC_DEV == 0, compile-time condition
> is not met and fastboot_set_reboot_flag() fails.
> 
> Fixes: a362ce214f03 ("fastboot: Implement generic fastboot_set_reboot_flag")
> Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
> ---
>   drivers/fastboot/fb_common.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
> index cbcc3683c47..ef399d0c4ab 100644
> --- a/drivers/fastboot/fb_common.c
> +++ b/drivers/fastboot/fb_common.c
> @@ -91,7 +91,7 @@ void fastboot_okay(const char *reason, char *response)
>    */
>   int __weak fastboot_set_reboot_flag(enum fastboot_reboot_reason reason)
>   {
> -#if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC_DEV)
> +#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
>   	static const char * const boot_cmds[] = {
>   		[FASTBOOT_REBOOT_REASON_BOOTLOADER] = "bootonce-bootloader",
>   		[FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot",
> 

Reviewed-by: Sean Anderson <seanga2@gmail.com>
Mattijs Korpershoek Nov. 18, 2021, 2:20 p.m. UTC | #2
Hi Roman,

Thank you for your patch.

Sean Anderson <seanga2@gmail.com> writes:

> On 5/8/21 6:25 PM, Roman Stratiienko wrote:
>> In case CONFIG_FASTBOOT_FLASH_MMC_DEV == 0, compile-time condition
>> is not met and fastboot_set_reboot_flag() fails.
>> 
>> Fixes: a362ce214f03 ("fastboot: Implement generic fastboot_set_reboot_flag")
>> Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
>> ---
>>   drivers/fastboot/fb_common.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
>> index cbcc3683c47..ef399d0c4ab 100644
>> --- a/drivers/fastboot/fb_common.c
>> +++ b/drivers/fastboot/fb_common.c
>> @@ -91,7 +91,7 @@ void fastboot_okay(const char *reason, char *response)
>>    */
>>   int __weak fastboot_set_reboot_flag(enum fastboot_reboot_reason reason)
>>   {
>> -#if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC_DEV)
>> +#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
>>   	static const char * const boot_cmds[] = {
>>   		[FASTBOOT_REBOOT_REASON_BOOTLOADER] = "bootonce-bootloader",
>>   		[FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot",
>> 
>
> Reviewed-by: Sean Anderson <seanga2@gmail.com>

I'm using this in the (out of tree) U-Boot for khadas VIM3L/VIM3 boards:
https://gitlab.com/baylibre/amlogic/atv/u-boot/-/tree/u-boot/v2021.07/integ

Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tom Rini Jan. 28, 2022, 8:15 p.m. UTC | #3
On Sun, May 09, 2021 at 01:25:24AM +0300, Roman Stratiienko wrote:

> In case CONFIG_FASTBOOT_FLASH_MMC_DEV == 0, compile-time condition
> is not met and fastboot_set_reboot_flag() fails.
> 
> Fixes: a362ce214f03 ("fastboot: Implement generic fastboot_set_reboot_flag")
> Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
> Reviewed-by: Sean Anderson <seanga2@gmail.com>
> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
index cbcc3683c47..ef399d0c4ab 100644
--- a/drivers/fastboot/fb_common.c
+++ b/drivers/fastboot/fb_common.c
@@ -91,7 +91,7 @@  void fastboot_okay(const char *reason, char *response)
  */
 int __weak fastboot_set_reboot_flag(enum fastboot_reboot_reason reason)
 {
-#if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC_DEV)
+#ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
 	static const char * const boot_cmds[] = {
 		[FASTBOOT_REBOOT_REASON_BOOTLOADER] = "bootonce-bootloader",
 		[FASTBOOT_REBOOT_REASON_FASTBOOTD] = "boot-fastboot",