From: Peter Hurley <peter@hurleysoftware.com>
To: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Jiri Slaby <jslaby@suse.cz>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH v2 -next 10/13] serial: earlycon: Allow earlycon params with name only
Date: Thu, 05 Mar 2015 10:53:57 -0500 [thread overview]
Message-ID: <54F87C15.6020801@hurleysoftware.com> (raw)
In-Reply-To: <CAL_Jsq+bL4qB797M0s+ZHSSrh=d_7bhP2AZQxAbqjmp5Gd0MXg@mail.gmail.com>
On 03/05/2015 10:46 AM, Rob Herring wrote:
> On Sun, Mar 1, 2015 at 10:05 AM, Peter Hurley <peter@hurleysoftware.com> wrote:
>> Allow earlycon param strings of the form
>> earlycon=<name>
>
> Humm, that should already be the case with ARM semihosting (smh).
>
> Rob
Then it's passing a bogus options string to parse_options()
>>
>> Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
>> ---
>> drivers/tty/serial/earlycon.c | 11 +++++++----
>> 1 file changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
>> index da5e8c8..025ea01 100644
>> --- a/drivers/tty/serial/earlycon.c
>> +++ b/drivers/tty/serial/earlycon.c
>> @@ -109,13 +109,16 @@ int __init setup_earlycon(char *buf, const char *match,
>> len = strlen(match);
>> if (strncmp(buf, match, len))
>> return 0;
>> - if (buf[len] && (buf[len] != ','))
>> - return 0;
>>
>> - buf += len + 1;
>> + if (buf[len]) {
>> + if (buf[len] != ',')
>> + return 0;
>> + buf += len + 1;
>> + } else
>> + buf = NULL;
>>
>> /* On parsing error, pass the options buf to the setup function */
>> - if (!parse_options(&early_console_dev, buf))
>> + if (buf && !parse_options(&early_console_dev, buf))
>> buf = NULL;
>>
>> port->uartclk = BASE_BAUD * 16;
>> --
>> 2.3.0
>>
next prev parent reply other threads:[~2015-03-05 15:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-01 16:05 [PATCH v2 -next 00/13] Extensible console matching & direct earlycon Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 01/13] serial: earlycon: Refactor parse_options into serial core Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 02/13] console: Preserve index after console setup() Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 03/13] console: Add extensible console matching Peter Hurley
2015-03-07 2:57 ` Greg Kroah-Hartman
2015-03-07 13:00 ` Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 04/13] serial: core: Fix kernel doc for uart_console_write() Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 05/13] serial: 8250_early: Remove early_device variable Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 06/13] serial: earlycon: Move ->uartclk initialize Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 07/13] serial: 8250_early: Assume uart already initialized if no baud option Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 08/13] serial: 8250_early: Fix setup() error code Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 09/13] serial: earlycon: Ignore parse_options() " Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 10/13] serial: earlycon: Allow earlycon params with name only Peter Hurley
2015-03-05 15:46 ` Rob Herring
2015-03-05 15:53 ` Peter Hurley [this message]
2015-03-05 16:07 ` Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 11/13] serial: earlycon: Refactor earlycon registration Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 12/13] serial: earlycon: Enable earlycon without command line param Peter Hurley
2015-03-01 16:05 ` [PATCH v2 -next 13/13] serial: 8250_early: Remove setup_early_serial8250_console() Peter Hurley
2015-03-05 16:11 ` [PATCH v2 -next 00/13] Extensible console matching & direct earlycon Rob Herring
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=54F87C15.6020801@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).