Re: [PATCH v1] PCI/VGA: Move pci_set_vga_state() to vgaarb.c

From: Bjorn Helgaas

Date: Thu Mar 12 2026 - 18:39:08 EST


On Thu, Mar 12, 2026 at 08:39:29AM +0900, Simon Richter wrote:
> On 2/21/26 4:49 AM, Bjorn Helgaas wrote:
>
> > pci_set_vga_state() is only used in vgaarb.c. Move it from pci.c to
> > vgaarb.c, make it static, and remove the declaration from
> > include/linux/pci.h.
>
> pci_register_set_vga_state() would then be exported from vgaarb.c -- is it
> confusing to have a function with a "pci_" prefix inside a file where all
> others have a "vga_" prefix?
>
> pci_notify() in vgaarb.c is static, so there is obvious precedent for a
> "pci_" prefix, but that's not externally visible.

Thanks for taking a look!

I don't care too much about the "pci_" vs "vga_" prefix.

But it *is* a problem to move pci_register_set_vga_state() to
vgaarb.c, which is only built when CONFIG_VGA_ARB is enabled, because
it's called from arch/x86/kernel/apic/x2apic_uv_x.c, which doesn't
depend on CONFIG_VGA_ARB.