[PATCH 1/3] memparse(): constify argument
From: Jeremy Fitzhardinge
Date: Thu Jul 24 2008 - 19:28:17 EST
memparse()'s first argument can be const, so it should be.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/