From: Felipe Contreras <felipe.contreras@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Levente Kurusa <levex@linux.com>,
Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH 2/5] cmdline: fix style issues
Date: Sat, 16 Nov 2013 11:32:28 -0600 [thread overview]
Message-ID: <1384623151-31302-3-git-send-email-felipe.contreras@gmail.com> (raw)
In-Reply-To: <1384623151-31302-1-git-send-email-felipe.contreras@gmail.com>
WARNING: space prohibited between function name and open parenthesis '('
+int get_option (char **str, int *pint)
WARNING: space prohibited between function name and open parenthesis '('
+ *pint = simple_strtol (cur, str, 0);
ERROR: trailing whitespace
+ $
WARNING: please, no spaces at the start of a line
+ $
WARNING: space prohibited between function name and open parenthesis '('
+ res = get_option ((char **)&str, ints + i);
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
lib/cmdline.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/cmdline.c b/lib/cmdline.c
index eb67911..5466333 100644
--- a/lib/cmdline.c
+++ b/lib/cmdline.c
@@ -49,13 +49,13 @@ static int get_range(char **str, int *pint)
* 3 - hyphen found to denote a range
*/
-int get_option (char **str, int *pint)
+int get_option(char **str, int *pint)
{
char *cur = *str;
if (!cur || !(*cur))
return 0;
- *pint = simple_strtol (cur, str, 0);
+ *pint = simple_strtol(cur, str, 0);
if (cur == *str)
return 0;
if (**str == ',') {
@@ -84,13 +84,13 @@ int get_option (char **str, int *pint)
* the parse to end (typically a null terminator, if @str is
* completely parseable).
*/
-
+
char *get_options(const char *str, int nints, int *ints)
{
int res, i = 1;
while (i < nints) {
- res = get_option ((char **)&str, ints + i);
+ res = get_option((char **)&str, ints + i);
if (res == 0)
break;
if (res == 3) {
@@ -153,7 +153,6 @@ unsigned long long memparse(const char *ptr, char **retptr)
return ret;
}
-
EXPORT_SYMBOL(memparse);
EXPORT_SYMBOL(get_option);
EXPORT_SYMBOL(get_options);
--
1.8.4.2+fc1
next prev parent reply other threads:[~2013-11-16 17:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-16 17:32 [PATCH 0/5] Command line related cleanups Felipe Contreras
2013-11-16 17:32 ` [PATCH 1/5] kstrtox: remove redundant cleanup Felipe Contreras
2013-11-16 20:19 ` Levente Kurusa
2013-11-16 17:32 ` Felipe Contreras [this message]
2013-11-16 17:32 ` [PATCH 3/5] cmdline: declare exported symbols immediately Felipe Contreras
2013-11-16 20:21 ` Levente Kurusa
2013-11-16 20:27 ` Felipe Contreras
2013-11-16 17:32 ` [PATCH 4/5] kstrtox: remove redundant casts Felipe Contreras
2013-11-16 17:32 ` [PATCH 5/5] params: improve standard definitions Felipe Contreras
2013-11-21 1:43 ` Rusty Russell
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=1384623151-31302-3-git-send-email-felipe.contreras@gmail.com \
--to=felipe.contreras@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=levex@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@linux-foundation.org \
/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
all inboxes | Powered by JetHome®