Messages in this thread Patch in this message | | | Date | Thu, 24 Jul 2008 16:27:46 -0700 | From | Jeremy Fitzhardinge <> | 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@citrix.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':
| |