From patchwork Thu May 11 07:52:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick DELAUNAY X-Patchwork-Id: 760970 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wNlqD2JSPz9sDF for ; Thu, 11 May 2017 17:58:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 01F6BC21E22; Thu, 11 May 2017 07:57:24 +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.7 required=5.0 tests=RCVD_IN_DNSWL_LOW 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 127AFC21E35; Thu, 11 May 2017 07:53:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C9ED4C21E36; Thu, 11 May 2017 07:52:34 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lists.denx.de (Postfix) with ESMTPS id A4B33C21D27 for ; Thu, 11 May 2017 07:52:30 +0000 (UTC) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v4B7dR67008225; Thu, 11 May 2017 09:52:29 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-.pphosted.com with ESMTP id 2abhecsck9-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 11 May 2017 09:52:29 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C9B013F; Thu, 11 May 2017 07:52:28 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 82796110D; Thu, 11 May 2017 07:52:28 +0000 (GMT) Received: from localhost (10.201.23.85) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.339.0; Thu, 11 May 2017 09:52:28 +0200 From: Patrick Delaunay To: Date: Thu, 11 May 2017 09:52:03 +0200 Message-ID: <1494489128-24806-14-git-send-email-patrick.delaunay@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1494489128-24806-1-git-send-email-patrick.delaunay@st.com> References: <1494489128-24806-1-git-send-email-patrick.delaunay@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.85] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-05-11_05:, , signatures=0 Cc: Franck Albesa , Christophe Kerello , Steve Rae , Gerald Baeza , Patrick Delaunay , Maxime Ripard Subject: [U-Boot] [PATCH v6 13/18] cmd: mtdparts: move PART_ADD_DESC_MAXLEN 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Signed-off-by: Patrick Delaunay Reviewed-by: Simon Glass --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None cmd/mtdparts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c index 112bf1f..796bb98 100644 --- a/cmd/mtdparts.c +++ b/cmd/mtdparts.c @@ -108,6 +108,9 @@ DECLARE_GLOBAL_DATA_PTR; * field for read-only partitions */ #define MTD_WRITEABLE_CMD 1 +/* max size for partition description */ +#define PART_ADD_DESC_MAXLEN 64 + /* default values for mtdids and mtdparts variables */ #if !defined(MTDIDS_DEFAULT) #ifdef CONFIG_MTDIDS_DEFAULT @@ -1985,7 +1988,6 @@ static int do_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc, /* mtdparts add [@] [ro] */ if (((argc == 5) || (argc == 6)) && (strncmp(argv[1], "add", 3) == 0)) { -#define PART_ADD_DESC_MAXLEN 64 char tmpbuf[PART_ADD_DESC_MAXLEN]; #if defined(CONFIG_CMD_MTDPARTS_SPREAD) struct mtd_info *mtd;