Hi Boris,

On Mon, Oct 01, 2018 at 02:39:16PM +0200, Borislav Petkov wrote:
> On Sun, Sep 30, 2018 at 09:16:19PM +0800, Feng Tang wrote:
> > Got your point. As the following [,baudrate] is also optional, and this
> > "force" could be the last option for pciserial. The check may be
> > 
> >     if (!strncmp(s, "force,", 6) || !strncmp(s, "force ", 6)) {
> >             force = 1;
> >             s += 6;
> >     }
> 
> You have !strncmp(s, "force,", 6) twice in there. I have no clue what
> you're trying to say.

I was trying to address your last comments:

"No, you need to force the presence of "," otherwise cmdlines like this:

earlyprintk=pciserial,0:XX.X,forcedoodoo

work too."

As I rechecked, the baud rate for pciserial is optional, so there may
be no ",baudrate" following the "force". So this 2 strncmp is to
cover conditions for with and without baudrate.

> 
> > Do you mean this? 
> > 
> >     if (((classcode >> 16 != PCI_CLASS_COMMUNICATION_MODEM) &&
> >          (classcode >> 16 != PCI_CLASS_COMMUNICATION_SERIAL)) ||
> >        (((classcode >> 8) & 0xff) != 0x02)) /* 16550 I/F at BAR0 */ {
> >             if (!force)
> >                     return;
> >     }
> 
> Yes.

Ok, thanks


Thanks,
Feng

Reply via email to