]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250_pci: Refactor the loop in pci_ite887x_init()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 22 Oct 2021 13:51:45 +0000 (16:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:22 +0000 (14:24 +0200)
commit397b33d6370f1da2974f20ce6593f0c602739888
tree1c64e8be0dbb11ff6e49c4f75b2943a7f58a2877
parentdd4eb873dea90d96832005041080fd2f70d1d041
serial: 8250_pci: Refactor the loop in pci_ite887x_init()

[ Upstream commit 0c5e893574e53488d1a2eead56ddb597bbe174c0 ]

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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jiri Slaby <jslaby@kernel.org>
Link: https://lore.kernel.org/r/20211022135147.70965-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/8250/8250_pci.c