[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <48890FF2.9070005@goop.org>
Date: Thu, 24 Jul 2008 16:27:46 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Ingo Molnar <mingo@...e.hu>
CC: Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/3] memparse(): constify argument
memparse()'s first argument can be const, so it should be.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
---
include/linux/kernel.h | 2 +-
lib/cmdline.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
===================================================================
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -174,7 +174,7 @@
extern int get_option(char **str, int *pint);
extern char *get_options(const char *str, int nints, int *ints);
-extern unsigned long long memparse(char *ptr, char **retptr);
+extern unsigned long long memparse(const char *ptr, char **retptr);
extern int core_kernel_text(unsigned long addr);
extern int __kernel_text_address(unsigned long addr);
===================================================================
--- a/lib/cmdline.c
+++ b/lib/cmdline.c
@@ -126,9 +126,9 @@
* megabyte, or one gigabyte, respectively.
*/
-unsigned long long memparse (char *ptr, char **retptr)
+unsigned long long memparse(const char *ptr, char **retptr)
{
- unsigned long long ret = simple_strtoull (ptr, retptr, 0);
+ unsigned long long ret = simple_strtoull(ptr, retptr, 0);
switch (**retptr) {
case 'G':
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists