lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 1/3] serial: 8250_pci: Refactor the loop in pci_ite887x_init()
From
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

\
 
 \ /
  Last update: 2021-10-26 07:27    [W:0.057 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site