Messages in this thread | | | Date | Tue, 26 Oct 2021 07:26:18 +0200 | Subject | Re: [PATCH v2 1/3] serial: 8250_pci: Refactor the loop in pci_ite887x_init() | From | Jiri Slaby <> |
| |
On 22. 10. 21, 15:51, Andy Shevchenko wrote: > The loop can be refactored by using ARRAY_SIZE() instead of NULL terminator. > This reduces code base and makes it easier to read and understand.
Why don't we have array_for_each() BTW?
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jiri Slaby <jslaby@kernel.org>
> --- a/drivers/tty/serial/8250/8250_pci.c > +++ b/drivers/tty/serial/8250/8250_pci.c > @@ -897,18 +897,16 @@ static int pci_netmos_init(struct pci_dev *dev) > /* enable IO_Space bit */ > #define ITE_887x_POSIO_ENABLE (1 << 31) > > +/* inta_addr are the configuration addresses of the ITE */ > +static const short inta_addr[] = { 0x2a0, 0x2c0, 0x220, 0x240, 0x1e0, 0x200, 0x280 };
/me thinks about 'unsigned'.
-- js suse labs
| |