lkml.org 
[lkml]   [2015]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v11 4/5] x86/earlyprintk: setup earlyprintk as early as possible
From
Date
On Wed, 2015-06-10 at 00:00 +0600, Alexander Kuleshov wrote:
> 2015-06-09 23:00 GMT+06:00 Andy Shevchenko <andriy.shevchenko@linux.intel.com>:
> >
> > I'm still not convincing by this code to be in that form and here. What
> > about to refactor setup_early_printk() to helper which will do parse
> > parameters to a let say structure where one of the flag will be
> > struct early_printk_param {
> > …
> > const char *arg;
> > bool serial;
> > }
> >
> > Your function will be something like this
> >
> > struct early_printk_param epp;
> >
> > parse_early_printk_param(&epp);
> >
> > if (!epp->serial)
> > return /* whatever error code */;
> >
> > return setup_early_printk(epp.arg);
> >
>
> Hello Andy,
>
> But what is difference between parsing to string and
> passing it and parsing to structure and pass its field?

You do parsing twice (still original code and your piece here), and
honestly I don't like your approach in this form.

>
> Thank you.


--
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy



\
 
 \ /
  Last update: 2015-06-10 12:21    [W:0.068 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site