From: "markus@trippelsdorf.de" <markus@trippelsdorf.de>
To: Bart Van Assche <Bart.VanAssche@sandisk.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH v2 cosmetic] Remove trailing newline in elevator switch error message
Date: Sat, 6 May 2017 07:15:27 +0200 [thread overview]
Message-ID: <20170506051527.GA291@x4> (raw)
In-Reply-To: <1494014718.2744.20.camel@sandisk.com>
On 2017.05.05 at 20:05 +0000, Bart Van Assche wrote:
> On Mon, 2017-05-01 at 18:29 +0200, markus@trippelsdorf.de wrote:
> > + strlcpy(elevator_name, name, sizeof(elevator_name));
> > + strstrip(elevator_name);
> > + ret = __elevator_change(q, elevator_name);
>
>
> Are you aware that the current implementation of __elevator_change() strips
> leading whitespace but that with your patch applied leading whitespace is no
> longer removed from the elevator name? If you have a look at strim() in
> lib/string.c you will see that in case of leading whitespace that function
> does not remove the leading whitespace but returns a pointer to the first
> non-whitespace character.
Well, only in the call to elevator_get(). The dmesg output does contain
leading whitespace. But the fix is simple. I will send a new patch.
--
Markus
prev parent reply other threads:[~2017-05-06 5:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-29 5:38 [PATCH cosmetic] Remove trailing newline in elevator switch error message Markus Trippelsdorf
2017-05-01 15:18 ` Bart Van Assche
2017-05-01 15:49 ` markus
2017-05-01 15:58 ` Bart Van Assche
2017-05-01 16:29 ` [PATCH v2 " markus
2017-05-05 20:05 ` Bart Van Assche
2017-05-06 5:15 ` markus [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=20170506051527.GA291@x4 \
--to=markus@trippelsdorf.de \
--cc=Bart.VanAssche@sandisk.com \
--cc=axboe@kernel.dk \
--cc=linux-block@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.