From patchwork Sat May 8 22:25:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Stratiienko X-Patchwork-Id: 1475940 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=VVHzH7Tz; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fd2384fnzz9tld for ; Sun, 9 May 2021 08:26:08 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6AA2882E69; Sun, 9 May 2021 00:25:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="VVHzH7Tz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AAD2882E60; Sun, 9 May 2021 00:25:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3BE3B82E60 for ; Sun, 9 May 2021 00:25:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=r.stratiienko@gmail.com Received: by mail-lj1-x22a.google.com with SMTP id b21so16096961ljf.11 for ; Sat, 08 May 2021 15:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MmLASGpaikBAYIzAtcnwf8bq/vK0lLqdybinXBc81GI=; b=VVHzH7Tz2Ct9k48MrHEtQs2FqlB5rlU0/F7zSm/BgIFrc8WyNzx3hVowFbyoCC8Ijh 3pqxvWRBqiw+6FjewvQzqAfrpfdvY3X84qTzTfhGOGLVFiHCC8wvOF+1DWQBwSjqH66W juQQJySias2hli+BOpSCKYY4k09Dj25rIBHLQlMKgKa7PK21bki9Xyc0r0axXv7pWZRp WNsuzxh0bYcK0i4iBePaw+oS8km2rw8RkgM3eq4rEhCv+klgoNJyfLyaYZ8h7SjjKAab dz8SwLWar8EDFVWszBnT2XkQSW+SOOsXXb9dgVF7sOa74sGreFDctIpoGGeYeUMlHLpS HzzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MmLASGpaikBAYIzAtcnwf8bq/vK0lLqdybinXBc81GI=; b=npTSwealteLP/lPidf6NHIX6w4V2ZCK6kRvwN3Xmr8qyFUgMjrklw89Di3igpdAQ3N loQdc/4HeWnz2WVa4z5+kL5CQzJwHz7Mj2Lr0iNPUoTfu9eFQdhW7Nfg2/dcgTVPRYZw uCiHEggjGCMQjeBlm7q/5H63/RxLJVHd6008eaUkDDIsVVo9L70PL7j+HFKHk8PUA2Zh 7k1AT+QmWlG6Ms3eeDEiylvqU4nxQsHQR+4FHaeFfMBpGZlAtYAUeuxv4tTL3wGBndki otCQRxzqjG4tsKQ1OhKCY8m3SYednkriZ6b14wufjFys+6V5Ff+XZRqjGPLh3OrwKznj uUWA== X-Gm-Message-State: AOAM530JODxLSEKf1i/Ei6vvlHifANs18soi3wCnc6yRD6qFbcxh8O75 8TlbyUlpqMpZ+DS6OyyiUCZsLGttDjw12A== X-Google-Smtp-Source: ABdhPJwSGbGVdWapZ62CZvBgfjU7NU9hs5WdzzBJJ2sA4b6RQ4agr8IcKTFQaUkUa4k5518qpONA8g== X-Received: by 2002:a05:651c:104e:: with SMTP id x14mr13835502ljm.345.1620512754454; Sat, 08 May 2021 15:25:54 -0700 (PDT) Received: from localhost.localdomain ([188.163.52.44]) by smtp.gmail.com with ESMTPSA id q66sm2478572ljb.3.2021.05.08.15.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 May 2021 15:25:53 -0700 (PDT) From: Roman Stratiienko To: u-boot@lists.denx.de Cc: sjg@chromium.org, roman.kovalivskyi@globallogic.com, erosca@de.adit-jv.com, Roman Stratiienko Subject: [PATCH] fastboot: fix fastboot_set_reboot_flag() Date: Sun, 9 May 2021 01:25:24 +0300 Message-Id: <20210508222524.4511-1-r.stratiienko@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean 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 Reviewed-by: Sean Anderson Tested-by: Mattijs Korpershoek --- 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",