[U-Boot] [PATCH fix for v2014.10 4/5] stdio: Add force parameter to stdio_deregister

Simon Glass
2014-10-09T18:04:29Z

Hi Marek,

On 9 October 2014 11:32, Marek Vasut <marex@denx.de> wrote:

> On Thursday, October 09, 2014 at 07:03:42 PM, Simon Glass wrote:
> > Hi Marek,
> >
> > On 9 October 2014 10:27, Marek Vasut <marex@denx.de> wrote:
> > > On Thursday, October 09, 2014 at 06:14:11 PM, Simon Glass wrote:
> > >> Hi Marek,
> > >>
> > >> On 9 October 2014 09:12, Marek Vasut <marex@denx.de> wrote:
> > >> > On Thursday, October 09, 2014 at 08:18:14 AM, Simon Glass wrote:
> > >> > > Hi,
> > >> > >
> > >> > > On 20 September 2014 08:54, Hans de Goede <hdegoede@redhat.com>
> wrote:
> > >> > > > In some cases we really want to move forward with a deregister,
> > >> > > > add a force parameter to allow this, and replace the dev with a
> > >> > > > nulldev in this case.
> > >> > > >
> > >> > > > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> > >> >
> > >> > [...]
> > >> >
> > >> > > > diff --git a/drivers/serial/serial-uclass.c
> > >> > > > b/drivers/serial/serial-uclass.c index d04104e..61cbdc6 100644
> > >> > > > --- a/drivers/serial/serial-uclass.c
> > >> > > > +++ b/drivers/serial/serial-uclass.c
> > >> > > > @@ -197,7 +197,7 @@ static int serial_pre_remove(struct udevice
> > >> > > > *dev)
> > >> > > >
> > >> > > > #ifdef CONFIG_SYS_STDIO_DEREGISTER
> > >> > > >
> > >> > > > struct serial_dev_priv *upriv = dev->uclass_priv;
> > >> > > >
> > >> > > > - if (stdio_deregister_dev(upriv->sdev))
> > >> > > > + if (stdio_deregister_dev(upriv->sdev), 0)
> > >> > >
> > >> > > That bracket seems to be in a strange place.
> > >> >
> > >> > Good find, thanks! I have two questions:
> > >> > 1) How come I did not notice this and my build didn't spit?
> > >>
> > >> If you have CONFIG_SYS_STDIO_DEREGISTER, CONFIG_DM and
> > >> CONFIG_DM_SERIAL set then I'm not sure. I made sure that sandbox has
> > >> all of these but it might be the only board.
> > >
> > > I see, error on my end then. I will start building sandbox for the USB
> > > tree. Thank you for pointing this out! This also stresses my point that
> > > U-Boot project does need a proper CI (which we could have had thanks to
> > > Vadim, but we didn't persudate that, dang again).
> >
> > What is a Cl? Do you mean his gerrit code review stuff?
>
> I mean more continuous integration (build testing) of the code before a PR
> is submitted to the ML. Right now, we all do our own thing when it comes to
> testing before PR, but it would be nice to have one easy way of doing the
> build testing before submitting the PR, don't you think ? This might apply
> to Linux too.
>

Sure it would be useful. Before submitting my pull request I get all the
patches in a branch and run:

./tools/buildman/buildman -b x86-push

This checks every commit for every board that I build, and gives me good
confidence that no patch introduces new breakages.

Regards,
Simon