From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/3] memparse(): constify argument
Date: Thu, 24 Jul 2008 16:27:46 -0700 [thread overview]
Message-ID: <48890FF2.9070005@goop.org> (raw)
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':
next reply other threads:[~2008-07-24 23:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 23:27 Jeremy Fitzhardinge [this message]
2008-07-28 13:00 ` [PATCH 1/3] memparse(): constify argument Ingo Molnar
2008-07-28 13:11 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48890FF2.9070005@goop.org \
--to=jeremy@goop.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox