From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShhWa-0005Yp-AS for qemu-devel@nongnu.org; Thu, 21 Jun 2012 09:34:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShhWT-0002DK-DD for qemu-devel@nongnu.org; Thu, 21 Jun 2012 09:34:15 -0400 From: Alexander Graf Date: Thu, 21 Jun 2012 15:33:50 +0200 Message-Id: <1340285640-28669-2-git-send-email-agraf@suse.de> In-Reply-To: <1340285640-28669-1-git-send-email-agraf@suse.de> References: <1340285640-28669-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH v2 01/11] dt: make setprop argument static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel qemu-devel Cc: Caraman Mihai Claudiu-B02008 , qemu-ppc Mailing List Whatever we pass in to qemu_devtree_setprop to put into the device tree will not get modified by that function, so it can easily be declared const. Signed-off-by: Alexander Graf --- device_tree.c | 2 +- device_tree.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/device_tree.c b/device_tree.c index acae53e..b366fdd 100644 --- a/device_tree.c +++ b/device_tree.c @@ -127,7 +127,7 @@ static int findnode_nofail(void *fdt, const char *node_path) } int qemu_devtree_setprop(void *fdt, const char *node_path, - const char *property, void *val_array, int size) + const char *property, const void *val_array, int size) { int r; diff --git a/device_tree.h b/device_tree.h index 4898d95..2244270 100644 --- a/device_tree.h +++ b/device_tree.h @@ -18,7 +18,7 @@ void *create_device_tree(int *sizep); void *load_device_tree(const char *filename_path, int *sizep); int qemu_devtree_setprop(void *fdt, const char *node_path, - const char *property, void *val_array, int size); + const char *property, const void *val_array, int size); int qemu_devtree_setprop_cell(void *fdt, const char *node_path, const char *property, uint32_t val); int qemu_devtree_setprop_u64(void *fdt, const char *node_path, -- 1.6.0.2