Re: [PATCH v6 3/4] usb: ehci: Add new EHCI driver for Broadcom STB SoC's

From: Greg Kroah-Hartman
Date: Thu May 07 2020 - 02:43:20 EST


On Wed, May 06, 2020 at 04:23:01PM -0400, Alan Cooper wrote:
> > > + irq = platform_get_irq(pdev, 0);
> > > + if (irq < 0)
> >
> > "<=" right?
>
> The example in the comment above platform_get_irq in platform.c says
> "if (irq < 0)"

There is work to fix that up on the mailing lists, 0 is not a valid irq :)

> > > +static int __init ehci_brcm_init(void)
> > > +{
> > > + if (usb_disabled())
> > > + return -ENODEV;
> >
> > You check this here, so why are you also checking it in the probe
> > function?
>
> Good point. I'll remove the one in probe. This was another thing that
> came from the ehci and ohci platform drivers. About a third of the
> drivers in this directory do this, probably because they started with
> the platform drivers. Do you think it's worth me submitting a patch to
> clean this up at some point?

Yes please.

>
> >
> > thanks,
> >
> > greg k-h
>
> I'll wait for your response before sending a V7.

Never wait for someone who you have no idea how much email they get :)

thanks,

greg k-h