[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db3f31f4-46ed-0b6b-89a5-b3cb447e0fa7@kernel.org>
Date: Tue, 26 Oct 2021 07:26:18 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] serial: 8250_pci: Refactor the loop in
pci_ite887x_init()
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@...ux.intel.com>
Reviewed-by: Jiri Slaby <jslaby@...nel.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
Powered by blists - more mailing lists