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: 967318 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="nCKvnzsk"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 426FJb5mhzz9s55 for ; Fri, 7 Sep 2018 21:17:03 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 324A2C21DED; Fri, 7 Sep 2018 11:16:59 +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);