From patchwork Thu Jul 19 07:28:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 142330 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1423440ljj; Thu, 19 Jul 2018 00:32:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe6XaC0RTYXL/5QtBuwQBWVvGCKMOTMD96/HsaT0OhoeGYv/INP8mVvVDj/5/iP58qvcJSK X-Received: by 2002:a50:8fe6:: with SMTP id y93-v6mr10280321edy.290.1531985563082; Thu, 19 Jul 2018 00:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531985563; cv=none; d=google.com; s=arc-20160816; b=kFQZGnhZYm8pzWBodtjueX6LBDIvNra6brldOyGWJddOmqnt1YWVJWdB4NbJUAv3Sp 8J6zCm9LyklmAn+eZP3pSEY5+aMfhsBRUXqp93o0e2YZQCrjtZ8pP2cO6QurHPO7piGB dZuwUKYKwr3PoL2P+kBVCSEaTKFPcnmhjNZ0CftVOvY/U8QK8dVrPiKruRxqWyKZ2WZu sNGx64mueLpU9fFoeWKa6QLcW93w5mM2IA6oBqocARWIu0jNsrrPJ02CvX0EhrikuJOO JytCoyz4Z/dITIdlr70NzJA+HWeUdFd6B6Irc/DT0nSjinyPHWCPS1Oi/tYVzEubtnW3 PGMA== 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:references:in-reply-to:message-id :date:to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=7qxGd6TGVJpWCYXpDIpOnvbEjlHrPVgVggLoK+kr8W8=; b=lyVdwzinC44quF01+ANhNxnXNwXs4ukOiruiJM3Q9xhYjsp4QT6LfoYYZltv4KWfun T7PQiU07VJm2rFOQ+OdupSMuylpcYm9RmlrhKPNHc0Iwl+kHVPmrRfzeqHLpGkLzUuhh dGOXFbyRV0Xn4ygbzy6Gq6nfKdYmCflvfp36aGSgt8JRSA0AVJ/JsBtUsQyVVjF34XJE 3J1vNBihKe0HH0Z5VV7OlMDyxV0yQjXeRDQh8MikgHSJ0RJiQfa1sHWrdfLGEQ5rCU0r SNI8uWlcMcRQIAkUY7FNEcKaoq+gLQNJzF4ovOZPWoQ5oYdQbpTZJGhTM4XbOT/d5Z6l IymQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=Akfc97yb; 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 e15-v6si432258edr.447.2018.07.19.00.32.42; Thu, 19 Jul 2018 00:32:43 -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=Akfc97yb; 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 A79FBC21FCD; Thu, 19 Jul 2018 07:30:33 +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 68F34C21FA5; Thu, 19 Jul 2018 07:30:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 360C5C21FA5; Thu, 19 Jul 2018 07:29:02 +0000 (UTC) Received: from conuserg-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by lists.denx.de (Postfix) with ESMTPS id C00EFC21FC0 for ; Thu, 19 Jul 2018 07:29:01 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w6J7STUB021119; Thu, 19 Jul 2018 16:28:30 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w6J7STUB021119 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1531985311; bh=WC28ofTFnd+Vf5rHtnrMhnOd1EORIS2edQzejI++AEA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Akfc97yb5BFhI5yMj79WmErbxopCV3Uvhsz6C3ExPyjPb9xnMO0XqP3YrkNYmxXxK 94/s3Ty9kmhsyYk4m0uyYGqcHxnWiN8XDR2FBSTCq/dfC2EevBAn/cu3+7k80dt1C0 GwD/BkBomn8xbvUBS9c6dX2yFqYhUXPUWAF1EV3MreZTdCy8g67tzxhl/NTfw3RV6/ MJ1ezCMSDVPX1MjqsJLodPDmi2RcWVVkDHR9KMvDmXymU4IYbzMeo5P+1j9JJtAzNI mJ7E/VoOjqMddxQFcBmdi6T7dle9ak16H7B4rzNRedWsxKU7ORrePRnbDobUdR32yC TKKJ+5nnQlgXA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 19 Jul 2018 16:28:23 +0900 Message-Id: <1531985307-4208-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531985307-4208-1-git-send-email-yamada.masahiro@socionext.com> References: <1531985307-4208-1-git-send-email-yamada.masahiro@socionext.com> Cc: Nikita Kiryanov , Stefan Agner , Naveen Burmi Subject: [U-Boot] [PATCH 2/6] board: constify struct node_info array 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" Add 'const' (also 'static' in some places) to struct node_info arrays to save memory footprint. Signed-off-by: Masahiro Yamada --- board/CarMediaLab/flea3/flea3.c | 2 +- board/compulab/cm_fx6/cm_fx6.c | 2 +- board/freescale/bsc9131rdb/bsc9131rdb.c | 2 +- board/freescale/bsc9132qds/bsc9132qds.c | 2 +- board/gateworks/gw_ventana/gw_ventana.c | 2 +- board/isee/igep003x/board.c | 2 +- board/isee/igep00x0/igep00x0.c | 2 +- board/toradex/colibri_imx7/colibri_imx7.c | 2 +- board/toradex/colibri_vf/colibri_vf.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c index c0f33b8..9eec1b7 100644 --- a/board/CarMediaLab/flea3/flea3.c +++ b/board/CarMediaLab/flea3/flea3.c @@ -205,7 +205,7 @@ u32 get_board_rev(void) */ int ft_board_setup(void *blob, bd_t *bd) { - struct node_info nodes[] = { + static const struct node_info nodes[] = { { "physmap-flash.0", MTD_DEV_TYPE_NOR, }, /* NOR flash */ { "mxc_nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */ }; diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index c114cdc..d42f57d 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -519,7 +519,7 @@ int cm_fx6_setup_ecspi(void) { return 0; } #ifdef CONFIG_OF_BOARD_SETUP #define USDHC3_PATH "/soc/aips-bus@02100000/usdhc@02198000/" -struct node_info nodes[] = { +static const struct node_info nodes[] = { /* * Both entries target the same flash chip. The st,m25p compatible * is used in the vendor device trees, while upstream uses (the diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c index 367152f..9d9c83f 100644 --- a/board/freescale/bsc9131rdb/bsc9131rdb.c +++ b/board/freescale/bsc9131rdb/bsc9131rdb.c @@ -53,7 +53,7 @@ int checkboard(void) #if defined(CONFIG_OF_BOARD_SETUP) #ifdef CONFIG_FDT_FIXUP_PARTITIONS -struct node_info nodes[] = { +static const struct node_info nodes[] = { { "fsl,ifc-nand", MTD_DEV_TYPE_NAND, }, }; #endif diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c index 6885668..36a5528 100644 --- a/board/freescale/bsc9132qds/bsc9132qds.c +++ b/board/freescale/bsc9132qds/bsc9132qds.c @@ -357,7 +357,7 @@ void fdt_del_node_compat(void *blob, const char *compatible) #if defined(CONFIG_OF_BOARD_SETUP) #ifdef CONFIG_FDT_FIXUP_PARTITIONS -struct node_info nodes[] = { +static const struct node_info nodes[] = { { "cfi-flash", MTD_DEV_TYPE_NOR, }, { "fsl,ifc-nand", MTD_DEV_TYPE_NAND, }, }; diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index b86924e..c4ec974 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -1114,7 +1114,7 @@ int ft_board_setup(void *blob, bd_t *bd) { struct ventana_board_info *info = &ventana_info; struct ventana_eeprom_config *cfg; - struct node_info nodes[] = { + static const struct node_info nodes[] = { { "sst,w25q256", MTD_DEV_TYPE_NOR, }, /* SPI flash */ { "fsl,imx6q-gpmi-nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */ }; diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c index cc55bcc..965a009 100644 --- a/board/isee/igep003x/board.c +++ b/board/isee/igep003x/board.c @@ -211,7 +211,7 @@ int board_late_init(void) int ft_board_setup(void *blob, bd_t *bd) { #ifdef CONFIG_FDT_FIXUP_PARTITIONS - static struct node_info nodes[] = { + static const struct node_info nodes[] = { { "ti,omap2-nand", MTD_DEV_TYPE_NAND, }, }; diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index 45a414c..367af82 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -157,7 +157,7 @@ static int ft_enable_by_compatible(void *blob, char *compat, int enable) int ft_board_setup(void *blob, bd_t *bd) { #ifdef CONFIG_FDT_FIXUP_PARTITIONS - static struct node_info nodes[] = { + static const struct node_info nodes[] = { { "ti,omap2-nand", MTD_DEV_TYPE_NAND, }, { "ti,omap2-onenand", MTD_DEV_TYPE_ONENAND, }, }; diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index cd98ec8..c05ca0c 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -408,7 +408,7 @@ int checkboard(void) int ft_board_setup(void *blob, bd_t *bd) { #if defined(CONFIG_FDT_FIXUP_PARTITIONS) - static struct node_info nodes[] = { + static const struct node_info nodes[] = { { "fsl,imx7d-gpmi-nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */ }; diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index 83c3503..4db1757 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -580,7 +580,7 @@ int ft_board_setup(void *blob, bd_t *bd) { int ret = 0; #ifdef CONFIG_FDT_FIXUP_PARTITIONS - static struct node_info nodes[] = { + static const struct node_info nodes[] = { { "fsl,vf610-nfc", MTD_DEV_TYPE_NAND, }, /* NAND flash */ };