From patchwork Thu Aug 5 12:42:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matwey V. Kornilov" X-Patchwork-Id: 492265 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp248027jap; Thu, 5 Aug 2021 05:43:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDTywW9p2Q7eHsSNF4Q+RMCbsYD1jydUxxLPc38lppheLFUJXghePnOzCubVOw2IPhqI8q X-Received: by 2002:a05:6402:516f:: with SMTP id d15mr6509857ede.210.1628167393346; Thu, 05 Aug 2021 05:43:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628167393; cv=none; d=google.com; s=arc-20160816; b=T9Z/XKspVmq0H5tC/Nsng5A8Sdgv7KdZBC9GA+z5BMdTiLmCVd3nF2pnQiLl99lUxm FjYPLaHTEkypT6RRVygdbm+HFMZyZM/aAHy6xiv54ES+Ux2NLFEyH9ciERfYGDU1XqFC ycU/RXGCo3uuLnfAF2S4Yrg9kIiuYdJLR0Tn2Cki0aZJ5AOE951IEgsuJktbXvMdfLaL tNpLxRnDryYFix1FQup8Hnxm8vHao026igxMSscAL9SAHm+y2IAg8Y3A7BMtZG1xRKev nxe+h20PHWX0ouC7RykZ4RgDtakT6sF6Re4MYINJzzMoR7wbDJx+Fk/rbDNls4pBHcty m2rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=RjevYsthhdPDoAy2QYRhfUuy4lVVDCPX/6EPQuQN2PM=; b=Sl01dVtvrxE0HrgGrInZuDf+nTJj1DCCwMKX5SQi7GA+CZxJ7THGXfQZ5jt9RvHwVo wDQNtthO94W4eCA07eokEoTTslC+Ahx5c2ix3z3/EyFpQ+yCI9/tJvxqzXqxZuB5nj5Q B343SW3C0LCWcogzxCcdEKWY1pl3qi9axhqQknfnQnPueW5kMWGtKpKben/1yvnknBCx bnn/mOdrND85LWh4wkzFUFexr4C/aG2GRRswekW8KKaEafhD3myf66WarOIDK6wwSNSm rYC2w5wtHOWimlbEd10ROVVjt7vABa9K0kvAMQekiEkD02UPFi5CgEr+DRJh/dlHGf6x +PfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DuWBKDf9; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id ay5si5075664edb.146.2021.08.05.05.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 05:43:13 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DuWBKDf9; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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) 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-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-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 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(-) -- 2.31.1 Reviewed-by: Simon Glass 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