[tip:x86/olpc] x86, olpc: Constify an olpc_ofw() arg

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: tip-bot for Andres Salomon
Date: Friday, July 30, 2010 - 6:10 pm

Commit-ID:  54e5bc020ce1c959eaa7be18cedb734b6b13745e
Gitweb:     http://git.kernel.org/tip/54e5bc020ce1c959eaa7be18cedb734b6b13745e
Author:     Andres Salomon <dilinger@queued.net>
AuthorDate: Mon, 28 Jun 2010 22:00:29 -0400
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 30 Jul 2010 18:02:21 -0700

x86, olpc: Constify an olpc_ofw() arg

The arguments passed to OFW shouldn't be modified; update the 'args'
argument of olpc_ofw to reflect this.  This saves us some later
casting away of consts.

Signed-off-by: Andres Salomon <dilinger@queued.net>
LKML-Reference: <20100628220029.1555ac24@debian>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/include/asm/olpc_ofw.h |    2 +-
 arch/x86/kernel/olpc.c          |    2 +-
 arch/x86/kernel/olpc_ofw.c      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/olpc_ofw.h b/arch/x86/include/asm/olpc_ofw.h
index 3e63d85..08fde47 100644
--- a/arch/x86/include/asm/olpc_ofw.h
+++ b/arch/x86/include/asm/olpc_ofw.h
@@ -12,7 +12,7 @@
 #define olpc_ofw(name, args, res) \
 	__olpc_ofw((name), ARRAY_SIZE(args), args, ARRAY_SIZE(res), res)
 
-extern int __olpc_ofw(const char *name, int nr_args, void **args, int nr_res,
+extern int __olpc_ofw(const char *name, int nr_args, const void **args, int nr_res,
 		void **res);
 
 /* determine whether OFW is available and lives in the proper memory */
diff --git a/arch/x86/kernel/olpc.c b/arch/x86/kernel/olpc.c
index f5ff3903..0e0cdde 100644
--- a/arch/x86/kernel/olpc.c
+++ b/arch/x86/kernel/olpc.c
@@ -188,7 +188,7 @@ static void __init platform_detect(void)
 {
 	size_t propsize;
 	__be32 rev;
-	void *args[] = { NULL, "board-revision-int", &rev, (void *)4 };
+	const void *args[] = { NULL, "board-revision-int", &rev, (void *)4 };
 	void *res[] = { &propsize };
 
 	if (olpc_ofw("getprop", args, res) || propsize != 4) {
diff --git a/arch/x86/kernel/olpc_ofw.c b/arch/x86/kernel/olpc_ofw.c
index f5d499f..3218aa7 100644
--- a/arch/x86/kernel/olpc_ofw.c
+++ b/arch/x86/kernel/olpc_ofw.c
@@ -40,7 +40,7 @@ void __init setup_olpc_ofw_pgd(void)
 	early_iounmap(base, sizeof(olpc_ofw_pgd) * PTRS_PER_PGD);
 }
 
-int __olpc_ofw(const char *name, int nr_args, void **args, int nr_res,
+int __olpc_ofw(const char *name, int nr_args, const void **args, int nr_res,
 		void **res)
 {
 	int ofw_args[MAXARGS + 3];
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/4] RFC: OLPC/x86 device tree code, Andres Salomon, (Mon Jun 28, 6:54 pm)
[PATCH 1/4] x86: OLPC: constify an olpc_ofw() arg, Andres Salomon, (Mon Jun 28, 7:00 pm)
[PATCH 3/4] proc: unify PROC_DEVICETREE config, Andres Salomon, (Mon Jun 28, 7:00 pm)
[PATCH 4/4] x86: OLPC: add OLPC device-tree support, Andres Salomon, (Mon Jun 28, 7:00 pm)
Re: [PATCH 2/4] sparc: break out some prom device-tree bui ..., Stephen Rothwell, (Mon Jun 28, 11:15 pm)
Re: [PATCH 3/4] proc: unify PROC_DEVICETREE config, Grant Likely, (Tue Jun 29, 12:33 am)
Re: [PATCH 4/4] x86: OLPC: add OLPC device-tree support, Grant Likely, (Tue Jun 29, 1:12 am)
Re: [PATCH 4/4] x86: OLPC: add OLPC device-tree support, Stephen Rothwell, (Tue Jun 29, 1:33 am)
Re: [PATCH 4/4] x86: OLPC: add OLPC device-tree support, Andres Salomon, (Tue Jun 29, 7:23 am)
Re: [PATCH 4/4] x86: OLPC: add OLPC device-tree support, Grant Likely, (Wed Jun 30, 2:13 pm)
Re: [PATCH 4/4] x86: OLPC: add OLPC device-tree support, Andres Salomon, (Wed Jun 30, 2:32 pm)
Re: [PATCH 2/4] sparc: break out some prom device-tree bui ..., Benjamin Herrenschmidt, (Tue Jul 6, 3:17 am)
[tip:x86/olpc] x86, olpc: Constify an olpc_ofw() arg, tip-bot for Andres S ..., (Fri Jul 30, 6:10 pm)
[PATCH 0/9] add OLPC device-tree support, Andres Salomon, (Sun Aug 29, 8:51 pm)
[PATCH 1/9] of: move phandle/ihandle into types.h, Andres Salomon, (Sun Aug 29, 8:53 pm)
[PATCH 6/9] of: add of_pdt namespace to pdt code, Andres Salomon, (Sun Aug 29, 9:02 pm)
[PATCH 7/9] of: add package-to-path support to pdt, Andres Salomon, (Sun Aug 29, 9:04 pm)
[PATCH 9/9] x86: OLPC: add OLPC device-tree support, Andres Salomon, (Sun Aug 29, 9:07 pm)
Re: [PATCH 1/9] of: move phandle/ihandle into types.h, Sam Ravnborg, (Sun Aug 29, 10:06 pm)
RE: [PATCH 8/9] x86: of: irq additions to make drivers/of/ ..., Stephen Neuendorffer, (Mon Aug 30, 8:58 am)
Re: [PATCH 0/9] add OLPC device-tree support, Grant Likely, (Mon Aug 30, 10:58 am)
Re: [PATCH 9/9] x86: OLPC: add OLPC device-tree support, Grant Likely, (Mon Aug 30, 11:14 am)
Re: [PATCH 9/9] x86: OLPC: add OLPC device-tree support, Andres Salomon, (Mon Aug 30, 11:49 am)
Re: [PATCH 9/9] x86: OLPC: add OLPC device-tree support, Grant Likely, (Mon Aug 30, 10:49 pm)
Re: [PATCH 1/9] of: move phandle/ihandle into types.h, Andres Salomon, (Fri Sep 3, 1:17 am)
Re: [PATCH 1/9] of: move phandle/ihandle into types.h, Sam Ravnborg, (Sat Sep 4, 11:22 pm)