PCI/VGA: Simplify vga_arbiter_notify_clients()
authorSui Jingfeng <suijingfeng@loongson.cn>
Tue, 8 Aug 2023 22:34:06 +0000 (06:34 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 23 Aug 2023 22:19:14 +0000 (17:19 -0500)
commitb421364a905e05d62f889786d25954c5a4128c80
treeb62f6c889853e9cd0451905f8b045310aa232256
parent60b4925d1aeaf0c46e540949c50818b9be2c896a
PCI/VGA: Simplify vga_arbiter_notify_clients()

In vga_arbiter_notify_clients(), "new_state" was computed during every loop
iteration even though it doesn't depend on anything that changes during the
loop.   Move the computation outside the loop.

[bhelgaas: drop renames that obscure the purpose, commit log]
Link: https://lore.kernel.org/r/20230808223412.1743176-6-sui.jingfeng@linux.dev
Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/vgaarb.c