From patchwork Sat Jun 23 23:07:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 166831 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 66972B6F59 for ; Sun, 24 Jun 2012 11:10:56 +1000 (EST) Received: from localhost ([::1]:58291 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiZUL-0003tO-AR for incoming@patchwork.ozlabs.org; Sat, 23 Jun 2012 19:11:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiZRU-0000PM-KK for qemu-devel@nongnu.org; Sat, 23 Jun 2012 19:08:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SiZRJ-0002X9-0C for qemu-devel@nongnu.org; Sat, 23 Jun 2012 19:08:36 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34952 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiZRI-0002WG-ND; Sat, 23 Jun 2012 19:08:24 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 6CE00A43BA; Sun, 24 Jun 2012 01:08:23 +0200 (CEST) From: Alexander Graf To: qemu-devel qemu-devel Date: Sun, 24 Jun 2012 01:07:26 +0200 Message-Id: <1340492856-21126-63-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1340492856-21126-1-git-send-email-agraf@suse.de> References: <1340492856-21126-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Blue Swirl , qemu-ppc Mailing List , Aurelien Jarno Subject: [Qemu-devel] [PATCH 62/72] dt: make setprop argument static X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: Peter Crosthwaite --- 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,