Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751458AbbGEIcc (ORCPT ); Sun, 5 Jul 2015 04:32:32 -0400 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.230]:31496 "EHLO cdptpa-queue03.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750799AbbGEIca (ORCPT ); Sun, 5 Jul 2015 04:32:30 -0400 Date: Sat, 4 Jul 2015 09:20:00 -0400 From: Steven Rostedt To: Ingo Molnar 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: <20150704092000.322dc4e6@grimm.local.home> In-Reply-To: <20150704110359.GA18107@gmail.com> References: <20150703181643.4fd4053d@grimm.local.home> <20150704110359.GA18107@gmail.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 997 Lines: 32 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. :) -- Steve -- 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/