From bc07c2cc73cd11d103ea40f93f29e6c81479f7c9 Mon Sep 17 00:00:00 2001 From: Hollis Blanchard Date: Tue, 2 Dec 2008 09:37:09 -0600 Subject: Ppc: fix build warnings Signed-off-by: Hollis Blanchard Signed-off-by: Avi Kivity --- hw/device_tree.c | 14 +++++++------- hw/device_tree.h | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/device_tree.c b/hw/device_tree.c index e73129d41..2621ff112 100644 --- a/hw/device_tree.c +++ b/hw/device_tree.c @@ -31,7 +31,7 @@ /* This function reads device-tree property files that are of * a single cell size */ -uint32_t read_proc_dt_prop_cell(char *path_in_device_tree) +uint32_t read_proc_dt_prop_cell(const char *path_in_device_tree) { char *buf = NULL; int i; @@ -65,7 +65,7 @@ uint32_t read_proc_dt_prop_cell(char *path_in_device_tree) #ifdef CONFIG_LIBFDT /* support functions */ -static int get_offset_of_node(void *fdt, char *node_path) +static int get_offset_of_node(void *fdt, const char *node_path) { int node_offset; node_offset = fdt_path_offset(fdt, node_path); @@ -78,7 +78,7 @@ static int get_offset_of_node(void *fdt, char *node_path) } /* public functions */ -void *load_device_tree(char *filename_path, unsigned long load_addr) +void *load_device_tree(const char *filename_path, unsigned long load_addr) { int dt_file_size; int dt_file_load_size; @@ -134,7 +134,7 @@ fail: return NULL; } -void dump_device_tree_to_file(void *fdt, char *filename) +void dump_device_tree_to_file(void *fdt, const char *filename) { int fd; fd = open(filename, O_RDWR|O_CREAT, O_RDWR); @@ -148,7 +148,7 @@ void dump_device_tree_to_file(void *fdt, char *filename) close(fd); } -void dt_cell(void *fdt, char *node_path, char *property, +void dt_cell(void *fdt, const char *node_path, const char *property, uint32_t val) { int offset; @@ -163,7 +163,7 @@ void dt_cell(void *fdt, char *node_path, char *property, } /* This function is to manipulate a cell with multiple values */ -void dt_cell_multi(void *fdt, char *node_path, char *property, +void dt_cell_multi(void *fdt, const char *node_path, const char *property, uint32_t *val_array, int size) { int offset; @@ -177,7 +177,7 @@ void dt_cell_multi(void *fdt, char *node_path, char *property, } } -void dt_string(void *fdt, char *node_path, char *property, +void dt_string(void *fdt, const char *node_path, const char *property, char *string) { int offset; diff --git a/hw/device_tree.h b/hw/device_tree.h index 05a81ef70..a3113095b 100644 --- a/hw/device_tree.h +++ b/hw/device_tree.h @@ -11,16 +11,16 @@ */ /* device-tree proc support functions */ -uint32_t read_proc_dt_prop_cell(char *path_in_device_tree); +uint32_t read_proc_dt_prop_cell(const char *path_in_device_tree); #ifdef CONFIG_LIBFDT /* device tree functions */ -void *load_device_tree(char *filename_path, target_ulong load_addr); -void dump_device_tree_to_file(void *fdt, char *filename); -void dt_cell(void *fdt, char *node_path, char *property, +void *load_device_tree(const char *filename_path, target_ulong load_addr); +void dump_device_tree_to_file(void *fdt, const char *filename); +void dt_cell(void *fdt, const char *node_path, const char *property, uint32_t val); -void dt_cell_multi(void *fdt, char *node_path, char *property, +void dt_cell_multi(void *fdt, const char *node_path, const char *property, uint32_t *val_array, int size); -void dt_string(void *fdt, char *node_path, char *property, +void dt_string(void *fdt, const char *node_path, const char *property, char *string); #endif -- cgit v1.2.3