From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: "André Goddard Rosa" <andre.goddard@gmail.com>
Cc: linux list <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Julia Lawall <julia@diku.dk>
Subject: Re: [PATCH v5 12/12] tree-wide: convert open calls to remove spaces to skip_spaces() lib function
Date: Mon, 16 Nov 2009 13:02:24 -0200 [thread overview]
Message-ID: <20091116150224.GA22176@khazad-dum.debian.net> (raw)
In-Reply-To: <623fc6c1c58b8c3ccf4a1373e94aba3639a0714e.1258181837.git.andre.goddard@gmail.com>
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index d93108d..e8026d9 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -1006,11 +1006,8 @@ static int parse_strtoul(const char *buf,
> {
> char *endp;
>
> - while (*buf && isspace(*buf))
> - buf++;
> - *value = simple_strtoul(buf, &endp, 0);
> - while (*endp && isspace(*endp))
> - endp++;
> + *value = simple_strtoul(skip_spaces(buf), &endp, 0);
> + endp = skip_spaces(endp);
> if (*endp || *value > max)
> return -EINVAL;
>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
(thinkpad-acpi changes only)
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
prev parent reply other threads:[~2009-11-16 15:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-14 7:11 [PATCH v5 00/12] introduce skip_spaces(), reducing code size plus some clean-ups André Goddard Rosa
2009-11-14 7:11 ` [PATCH v5 01/12] vsprintf: factorize "(null)" string André Goddard Rosa
2009-11-14 7:11 ` [PATCH v5 02/12] vsprintf: pre-calculate final string length for later use André Goddard Rosa
2009-11-14 7:11 ` [PATCH v5 03/12] vsprintf: give it some care to please checkpatch.pl André Goddard Rosa
2009-11-14 7:11 ` [PATCH v5 04/12] vsprintf: use TOLOWER whenever possible André Goddard Rosa
2009-11-14 7:11 ` [PATCH v5 05/12] vsprintf: reduce code size by avoiding extra check André Goddard Rosa
2009-11-14 7:11 ` [PATCH v5 06/12] vsprintf: move local vars to block local vars and remove unneeded ones André Goddard Rosa
2009-11-14 7:11 ` [PATCH v5 07/12] vsprintf: factor out skip_space code in a separate function André Goddard Rosa
2009-11-14 7:11 ` [PATCH v5 08/12] vsprintf: reuse almost identical simple_strtoulX() functions André Goddard Rosa
2009-11-14 7:11 ` [PATCH v5 09/12] ctype: constify read-only _ctype string André Goddard Rosa
2009-11-14 7:11 ` [PATCH v5 10/12] string: factorize skip_spaces and export it to be generally available André Goddard Rosa
2009-11-15 19:33 ` Anders Larsen
2009-11-14 7:11 ` [PATCH v5 11/12] string: on strstrip(), first remove leading spaces before running over str André Goddard Rosa
2009-11-14 7:12 ` [PATCH v5 12/12] tree-wide: convert open calls to remove spaces to skip_spaces() lib function André Goddard Rosa
2009-11-16 15:02 ` Henrique de Moraes Holschuh [this message]
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=20091116150224.GA22176@khazad-dum.debian.net \
--to=hmh@hmh.eng.br \
--cc=akpm@linux-foundation.org \
--cc=andre.goddard@gmail.com \
--cc=julia@diku.dk \
--cc=linux-kernel@vger.kernel.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®