diff mbox

[U-Boot,v3,10/72] fdt: Update fdt_get_base_address() to use const

Message ID 20170519021002.1098-11-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass May 19, 2017, 2:09 a.m. UTC
This function does not change the device tree so adjust it to use const
for this parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 common/fdt_support.c  | 2 +-
 include/fdt_support.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Glass May 25, 2017, 12:07 a.m. UTC | #1
This function does not change the device tree so adjust it to use const
for this parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 common/fdt_support.c  | 2 +-
 include/fdt_support.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-dm
diff mbox

Patch

diff --git a/common/fdt_support.c b/common/fdt_support.c
index c6a76b7ad2..c63b27bbb6 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -1539,7 +1539,7 @@  int fdt_verify_alias_address(void *fdt, int anode, const char *alias, u64 addr)
 /*
  * Returns the base address of an SOC or PCI node
  */
-u64 fdt_get_base_address(void *fdt, int node)
+u64 fdt_get_base_address(const void *fdt, int node)
 {
 	int size;
 	u32 naddr;
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 955c121713..6fea5c7da0 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -207,7 +207,7 @@  int fdt_add_edid(void *blob, const char *compat, unsigned char *buf);
 
 int fdt_verify_alias_address(void *fdt, int anode, const char *alias,
 			      u64 addr);
-u64 fdt_get_base_address(void *fdt, int node);
+u64 fdt_get_base_address(const void *fdt, int node);
 int fdt_read_range(void *fdt, int node, int n, uint64_t *child_addr,
 		   uint64_t *addr, uint64_t *len);