Re: [PATCH v1 3/5] Bluetooth: hci_bcm: Use serdev_acpi_get_uart_resource() helper

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

 



On Wed, Aug 4, 2021 at 11:13 AM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
> On 8/3/21 9:29 PM, Andy Shevchenko wrote:
> > serdev provides a generic helper to get UART Serial Bus resources.
> > Use it instead of open coded variant.

...

> > +     if (serdev_acpi_get_uart_resource(ares, &uart)) {
> > +             dev->init_speed = uart->default_baud_rate;
> > +             dev->oper_speed = 4000000;
> > +     }
> > +
>
> You are replacing a nice switch-case which handles all relevant resource
> types with still having a switch-case + a separate if .. else if .. else if ...
> (also taking patch 4/5 into account).
>
> This does not help the readability of this code at all IMHO, so NACK
> from me for this patch as well as for 4/5.

I guess it's a matter of style. The main idea is to try avoiding the
spreading of the customized ACPI resource extraction here and there.
Probably I should have started with cleaning up the EXTENDED_IRQ case,
which seems not needed here in the current form.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux