diff mbox

[U-Boot,v2,2/4] fdt_support: define stub for fdt_fixup_mtdparts

Message ID e05d0658a2de4395993e2d1b3e312f26@rwthex-s1-b.rwth-ad.de
State Accepted
Commit f4ae23a7cd6fff3e0b9d250411b6714c6a1a2930
Delegated to: Stefano Babic
Headers show

Commit Message

Christopher Spinrath July 12, 2016, 9:37 p.m. UTC
From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>

Define an inline stub for fdt_fixup_mtdparts in the case that
CONFIG_FDT_FIXUP_PARTITIONS is not defined. This avoids the need
to guard every call to this function by a proper #ifdef in board
files.

Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
---

Notes:
    Changes since v1:
     - this is a new patch in v2 that is required to address the review
       comments for patch 3 (remove #ifdef guards)

 include/fdt_support.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Simon Glass July 12, 2016, 9:57 p.m. UTC | #1
On 12 July 2016 at 15:37,  <christopher.spinrath@rwth-aachen.de> wrote:
> From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
>
> Define an inline stub for fdt_fixup_mtdparts in the case that
> CONFIG_FDT_FIXUP_PARTITIONS is not defined. This avoids the need
> to guard every call to this function by a proper #ifdef in board
> files.
>
> Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
> ---
>
> Notes:
>     Changes since v1:
>      - this is a new patch in v2 that is required to address the review
>        comments for patch 3 (remove #ifdef guards)
>
>  include/fdt_support.h | 6 ++++++
>  1 file changed, 6 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
Igor Grinberg July 14, 2016, 8:16 a.m. UTC | #2
On 07/13/2016 12:37 AM, christopher.spinrath@rwth-aachen.de wrote:
> From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
> 
> Define an inline stub for fdt_fixup_mtdparts in the case that
> CONFIG_FDT_FIXUP_PARTITIONS is not defined. This avoids the need
> to guard every call to this function by a proper #ifdef in board
> files.
> 
> Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>

Thanks!

Reviewed-by: Igor Grinberg <grinberg@compulab.co.il>
diff mbox

Patch

diff --git a/include/fdt_support.h b/include/fdt_support.h
index d34e959..7318098 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -172,7 +172,13 @@  int fdt_increase_size(void *fdt, int add_len);
 
 int fdt_fixup_nor_flash_size(void *blob);
 
+#if defined(CONFIG_FDT_FIXUP_PARTITIONS)
 void fdt_fixup_mtdparts(void *fdt, void *node_info, int node_info_size);
+#else
+static inline void fdt_fixup_mtdparts(void *fdt, void *node_info,
+					int node_info_size) {}
+#endif
+
 void fdt_del_node_and_alias(void *blob, const char *alias);
 u64 fdt_translate_address(void *blob, int node_offset, const __be32 *in_addr);
 int fdt_node_offset_by_compat_reg(void *blob, const char *compat,