Re: [PATCH v2 1/3] usb: misc: onboard-hub: support multiple power supplies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

Thank you for the feedback!

On Thu, 22 Jun 2023 at 07:16, Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx> wrote:
> Am Mittwoch, 21. Juni 2023, 16:57:03 CEST schrieb Matthias Kaehlcke:
> > > +#define SUPPLIES_NUM_MAX 2
> >
> > MAX_SUPPLIES?
>
> Do we need this MAX_SUPPLIES macro at all? This essentially is
> ARRAY_SIZE(supply_names), no? At least it should be
> > #define MAX_SUPPLIES ARRAY_SIZE(supply_names)

Thanks for the catch, will adapt.

> >       if (hub->pdata->supplies_num != 0)
> >               hub->supplies_num = hub->pdata->supplies_num;
> >       else
> >               hub->supplies_num = 1;
> >
>
> In the kernel there is also this style:
> > hub->supplies_num = hub->pdata->supplies_num? : 1;

I dropped it in v4[1].

br,
Benjamin

[1] https://lore.kernel.org/lkml/20230620-hx3-v4-0-e56b3c6db60b@xxxxxxxxxxx/



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux