Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755751AbbGEJFX (ORCPT ); Sun, 5 Jul 2015 05:05:23 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:37893 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752088AbbGEJFT (ORCPT ); Sun, 5 Jul 2015 05:05:19 -0400 Date: Sun, 5 Jul 2015 11:05:13 +0200 From: Ingo Molnar To: Steven Rostedt Cc: LKML , Thomas Gleixner , "H. Peter Anvin" , Greg Kroah-Hartman , David Cohen , Andy Shevchenko , Alan Cox , "Stuart R. Anderson" Subject: Re: [RFC][PATCH] x86: Allow early_printk to use console style param like 115200n8 Message-ID: <20150705090513.GC30626@gmail.com> References: <20150703181643.4fd4053d@grimm.local.home> <20150704110359.GA18107@gmail.com> <20150704092000.322dc4e6@grimm.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150704092000.322dc4e6@grimm.local.home> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1103 Lines: 37 * Steven Rostedt wrote: > On Sat, 4 Jul 2015 13:03:59 +0200 > Ingo Molnar wrote: > > > > > + /* > > > + * In case the input is like console with text after the baud > > > + * rate. e.g. 115200n8. kstrtoul() will error on such input. > > > + */ > > > + for (p = s; *p && isdigit(*p); p++) > > > + ; > > > + *p = 0; > > > + > > > if (kstrtoul(s, 0, &baud) < 0 || baud == 0) > > > baud = DEFAULT_BAUD; > > > > > > This was actually one of those cases where I wanted to show that keeping the old > function around is better than the alternative ;-) > > If people say we need to phase out simple_strtoull(), then I wanted to show what > kinds of hacks we will have if that happens. > > I was hoping that someone would point out that simple_strtoull() is a better > solution. :) LOL :) Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/