From patchwork Fri Sep 7 11:15:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 146207 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1037696ljw; Fri, 7 Sep 2018 04:17:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbHNdKGoDICszTm34B2dabSB83nq9osgzOTvM/wwcW1kBRWh7jkre74kOMJLeg3Ciuz7F9S X-Received: by 2002:a50:eacb:: with SMTP id u11-v6mr8551980edp.7.1536319022219; Fri, 07 Sep 2018 04:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536319022; cv=none; d=google.com; s=arc-20160816; b=oscEgDdOXKBb6tYonNhvHs8T+RPbD074n6T8wijfpLKziUNspxoCfXJHe48Uvp1Zh5 dSI8Ff/RR02BwSwbUhQV8MW2JVAW+fuiI6HKPuo4umhf/88b+ZK2AJzM7vZj68YOmFD9 0rZYRSXNNckIk6YCPX3Xtmys4OUYb66dZIdRiqb5QhMPwPaoW75VIzMfaYFcKKwAFqEb lcAE5Uyka+SGQWAXAG1DC022jaoWoJdXjETN1l2sfYMiAKEGiVKFnAbBjMRlZV1XEUZ0 1g97CYrBHO6cn0WkyWhlbwqbF8L46ZB1cowoPijU0gljOffvN9UjIH8EqwdPsPttRVeL 58Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:dkim-filter; bh=m1GToVQU3pKdbqQesKdTk4lAriyC6hlGkXzglCP4zrk=; b=ZAC526lDwe/u0Em0b/dM10haNycNhKRfdjRan9spVj9vQCXZvzsKfErb5PAzH2x/+X dnd9IOPNH44s8lgvocZU0Ywgwc4hE6x7+cWTCnHq8C9QOnLym9BPHXfnoMGgbVZ9oMhL b+sGUBLinBcqigS2fTpf7An+J/wA48qZopO69UhdXT0Y7TQSrOniEUWkVhXKEV6UI+9q VwNkrOzEh9p4oOXq0ufby/rDBq73inhvULzs8h6ig0Tp+8S2seVdsCxZ6rBnT7Z3DKeZ 0AeAZ9FOg7jb15+bmADVrJeHx83DP/QsC7nt8kN0A+n1qEI39gCgeDrLuUEFhz1ObMrv g6tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=nCKvnzsk; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id g14-v6si171845edv.426.2018.09.07.04.17.01; Fri, 07 Sep 2018 04:17:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=nCKvnzsk; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 6D027C21E16; Fri, 7 Sep 2018 11:16:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C0E59C21D83; Fri, 7 Sep 2018 11:16:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0383DC21BE5; Fri, 7 Sep 2018 11:16:54 +0000 (UTC) Received: from conuserg-09.nifty.com (conuserg-09.nifty.com [210.131.2.76]) by lists.denx.de (Postfix) with ESMTPS id 018F3C21BE5 for ; Fri, 7 Sep 2018 11:16:53 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id w87BFtdQ026766; Fri, 7 Sep 2018 20:15:56 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w87BFtdQ026766 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1536318956; bh=dC3n0n7f4uD/fkPo3/wXRCADDbRgZ+ooaNs738o/8Xo=; h=From:To:Cc:Subject:Date:From; b=nCKvnzsk5fxHkjfufHdNzCvvSwCcGAgOA82XOZejn3JNy4m4vmzXdpjZCFrJr+9Kz WcVMP9Kx0PWPjqgcHdRSaHOChkzkvs6Bbior9bTQ8x7sKCMTT3G661YUcbovIU0Gwd /KIZrHHNc+xRlmMbJvGnB4rlcvzcT7bxT3Z4gIgk1QW2VLa4P8Qx7E4f6tiXPColmw y0Rc2e5Up4NoZXYlqqj3oUT3B2UAV4vC43W+PSXTvufr9YaA/sxdcgxu84CFXyBWBd Y3CgiOhfhoQLu9iEVrICkkQjn9jB3eqjNrwBLGLSBpumvX/78/jtea0KOVpO7Obhm1 W64kLjqepD0Qg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 7 Sep 2018 20:15:42 +0900 Message-Id: <1536318942-12061-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Cc: Tom Rini , Marek Vasut Subject: [U-Boot] [PATCH] dm: fix alignment in DM dump when 2-digit index exists X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" If there exist 10 or more nodes of the same type, the alignment of "dm tree" command is broken. Signed-off-by: Masahiro Yamada Reviewed-by: Bin Meng Tested-by: Bin Meng --- drivers/core/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/core/dump.c b/drivers/core/dump.c index d7cdb14..c86f889 100644 --- a/drivers/core/dump.c +++ b/drivers/core/dump.c @@ -16,7 +16,7 @@ static void show_devices(struct udevice *dev, int depth, int last_flag) struct udevice *child; /* print the first 11 characters to not break the tree-format. */ - printf(" %-10.10s %d [ %c ] %-10.10s ", dev->uclass->uc_drv->name, + printf(" %-10.10s %2d [ %c ] %-10.10s ", dev->uclass->uc_drv->name, dev_get_uclass_index(dev, NULL), dev->flags & DM_FLAG_ACTIVATED ? '+' : ' ', dev->driver->name);