From patchwork Tue Jul 5 08:26:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 644606 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rkH9Q25Gvz9s5J for ; Tue, 5 Jul 2016 18:29:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 35B20A760A; Tue, 5 Jul 2016 10:28:09 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id csle9vUwscrI; Tue, 5 Jul 2016 10:28:09 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CD30DA754C; Tue, 5 Jul 2016 10:27:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D3000A750A for ; Tue, 5 Jul 2016 10:26:52 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JVytbG-5i6RX for ; Tue, 5 Jul 2016 10:26:52 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by theia.denx.de (Postfix) with ESMTP id 029BAA74D0 for ; Tue, 5 Jul 2016 10:26:49 +0200 (CEST) Received: by mail.free-electrons.com (Postfix, from userid 110) id BE0E3349; Tue, 5 Jul 2016 10:26:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 8CD06243; Tue, 5 Jul 2016 10:26:48 +0200 (CEST) From: Maxime Ripard To: Pantelis Antoniou , Simon Glass Date: Tue, 5 Jul 2016 10:26:34 +0200 Message-Id: <20160705082646.25044-2-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160705082646.25044-1-maxime.ripard@free-electrons.com> References: <20160705082646.25044-1-maxime.ripard@free-electrons.com> Cc: Thomas Petazzoni , Tom Rini , u-boot@lists.denx.de, Alexander Kaplan , devicetree-compiler@vger.kernel.org, David Gibson Subject: [U-Boot] [PATCH v4 01/13] cmd: fdt: Narrow the check for fdt addr X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" The current code only checks if the fdt subcommand is fdt addr by checking whether it starts with 'a'. Since this is a pretty widely used letter, narrow down that check a bit. Acked-by: Simon Glass Acked-by: Pantelis Antoniou Signed-off-by: Maxime Ripard --- cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/fdt.c b/cmd/fdt.c index 898217ffe5f8..0f5923e75a41 100644 --- a/cmd/fdt.c +++ b/cmd/fdt.c @@ -87,7 +87,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* * Set the address of the fdt */ - if (argv[1][0] == 'a') { + if (strncmp(argv[1], "ad", 2) == 0) { unsigned long addr; int control = 0; struct fdt_header *blob;