[U-Boot] [PATCH] drivers: core: use strcmp when find device by name

Peng Fan peng.fan at nxp.com
Wed May 22 07:10:04 UTC 2019


Hi Simon,

> Subject: Re: [PATCH] drivers: core: use strcmp when find device by name
> 
> Hi Peng,
> 
> On Wed, 15 May 2019 at 05:57, Peng Fan <peng.fan at nxp.com> wrote:
> >
> > Hi Simon,
> >
> > > Subject: Re: [PATCH] drivers: core: use strcmp when find device by
> > > name
> > >
> > > On Sun, 28 Apr 2019 at 03:43, Peng Fan <peng.fan at nxp.com> wrote:
> > > >
> > > > `if (!strncmp(dev->name, name, strlen(name)))` might find out the
> > > > wrong device, it might find out `dram_pll_ref_sel`, when name is
> > > > `dram_pll`. So use strcmp to avoid such issue.
> > > >
> > > > Signed-off-by: Peng Fan <peng.fan at nxp.com>
> > > > ---
> > > >  drivers/core/uclass.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > Reviewed-by: Simon Glass <sjg at chromium.org>
> > >
> > > This seems to match the function description in the header file, too.
> >
> > Will you pick up this patch? Not see this patch in your tree.
> 
> I found that this causes a test failure - can you try 'make qcheck'
> and see if you can figure out what is going on?

With this patch applied. Test/dm/adc.c and usb.c needs some change to
use real device name. I just posted out new patchset including this one.

Pease review.

Thanks,
Peng

> 
> Regards,
> Simon


More information about the U-Boot mailing list