Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CBD2C4338F for ; Thu, 5 Aug 2021 12:43:14 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 411A061131 for ; Thu, 5 Aug 2021 12:43:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 411A061131 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B878982DEF; Thu, 5 Aug 2021 14:43:10 +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="DuWBKDf9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A61C82DFE; Thu, 5 Aug 2021 14:43:09 +0200 (CEST) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (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 53B9782D91 for ; Thu, 5 Aug 2021 14:43:06 +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=matwey.kornilov@gmail.com Received: by mail-lj1-x232.google.com with SMTP id b21so6856288ljo.13 for ; Thu, 05 Aug 2021 05:43:06 -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=RjevYsthhdPDoAy2QYRhfUuy4lVVDCPX/6EPQuQN2PM=; b=DuWBKDf9GYumXGEU1WfDtuu8aOJWrsJtRDmXd2V/K60atnQ17B1LYaPTVTfOqS8qS1 T5KH4iq1nyePYz7hi+yTu082I5xtH6XcLBG7hqYB3vgYmC1gII6RcPG8Jsy2x0fBDNKK BQgPqXPiKdVl431nWyiL5suG8aPj7gpwj3OrvT1aFVuajWfUXqBHMZLL1IG1voFZIdyd XHfQ2vfDFhkXfgECY2xGMNlh/yxQ4cNCXlncAA9z1gk3gvK0h1zY1UjYX8PVvcyTjKvy FbECYW7nqhqFbUQHNM1EhAINYeMaEuCuK0CSL07HhpMMnkxKAcAN7hSc05LWWLu5WcfU gTvw== 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=RjevYsthhdPDoAy2QYRhfUuy4lVVDCPX/6EPQuQN2PM=; b=fYetjzfKbXTAMhdc7IEdI/KcRv1InpxRYT9DSSGbbHW4E1YJ1ggCnXrtKbeopwLnNf O2159g0x4CpbWTybunvb34cedPp4hfqwsbu31IfmiQIrgVZzBW97fEd/oe9xx1lNzMd3 kyp13E9hcrHF4iKhOyibh4/RM1RINFnbpk038qN/XFrMNrONnOio4fr5bw3TBh3XHT6C FEfhTYKzEOeeNzgg3TdZKkZIhiyKqK+hoAx9DFsNaGbZvvbI5HPB8l6GlwFn+6nNUyLb 5x3oGMuHtY29KBNlPv1fR+DOpEVHZQy4WiYSVn8a6Fa9QEEJcdser1PAZGVoubXPd9s7 h/aQ== X-Gm-Message-State: AOAM530jtoP8MuNIhY/1Rx3tWGpTdjcq8jhvjubyfuDW+Ledhc2oO3mV c+hIRX5gS/lAPusAnsk3PO4= X-Google-Smtp-Source: ABdhPJzSbHcHr/HVaRP3+9oQz6QqxcRW2bYzCRI6fwcYVPlqHn4kybfX08JcidHE0bvZwV4Hxzwtdw== X-Received: by 2002:a2e:990c:: with SMTP id v12mr3048424lji.57.1628167385406; Thu, 05 Aug 2021 05:43:05 -0700 (PDT) Received: from oak.local ([2001:470:28:561:2991:a833:31da:2248]) by smtp.gmail.com with ESMTPSA id l13sm406130ljj.43.2021.08.05.05.43.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 05:43:04 -0700 (PDT) From: "Matwey V. Kornilov" To: trini@konsulko.com, vigneshr@ti.com Cc: u-boot@lists.denx.de, "Matwey V. Kornilov" Subject: [PATCH] tiny-printf: Handle %pM format when CONFIG_SPL_NET_SUPPORT is enabled Date: Thu, 5 Aug 2021 15:42:51 +0300 Message-Id: <20210805124251.4306-1-matwey.kornilov@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean %pM format string is used to print MAC-address and this is required while SPL network boot. This patch fixes the SPL boot issues like the following: Trying to boot from USB eth ## Error: flags type check failure for "ethaddr" <= "40309614M" (type: m) ## Error inserting "ethaddr" variable, errno=1 eth0: eth_cpsw## Error: flags type check failure for "eth1addr" <= "81f01114M" (type: m) ## Error inserting "eth1addr" variable, errno=1 , eth1: usb_ether eth_cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT ! Problem booting with BOOTP SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### Signed-off-by: Matwey V. Kornilov --- lib/tiny-printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index 8fc7e48d99..0b2fabf118 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -269,7 +269,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va) } break; case 'p': -#ifdef DEBUG +#if IS_ENABLED(CONFIG_SPL_NET_SUPPORT) || defined(DEBUG) pointer(info, fmt, va_arg(va, void *)); /* * Skip this because it pulls in _ctype which is -- 2.31.1