Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1176874 > unrolled thread
| Started by | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| First post | 2015-07-05 10:40 +0200 |
| Last post | 2015-07-05 11:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RFC][PATCH] x86: Allow early_printk to use console style param like 115200n8 Steven Rostedt <rostedt@goodmis.org> - 2015-07-05 10:40 +0200
Re: [RFC][PATCH] x86: Allow early_printk to use console style param like 115200n8 Ingo Molnar <mingo@kernel.org> - 2015-07-05 11:10 +0200
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2015-07-05 10:40 +0200 |
| Subject | Re: [RFC][PATCH] x86: Allow early_printk to use console style param like 115200n8 |
| Message-ID | <pINCY-wQ-51@gated-at.bofh.it> |
On Sat, 4 Jul 2015 13:03:59 +0200 Ingo Molnar <mingo@kernel.org> 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/
[toc] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2015-07-05 11:10 +0200 |
| Message-ID | <pIO5Z-W8-33@gated-at.bofh.it> |
| In reply to | #1176874 |
* Steven Rostedt <rostedt@goodmis.org> wrote: > On Sat, 4 Jul 2015 13:03:59 +0200 > Ingo Molnar <mingo@kernel.org> 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web