lkml.org 
[lkml]   [2008]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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':



\
 
 \ /
  Last update: 2008-07-25 01:31    [W:0.026 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site