On Sun, Jul 20, 2025 at 10:15:08AM -0500, Mario Limonciello wrote: > There is a desire to avoid creating new sysfs files late, so instead > of dynamically deciding to create the boot_display attribute, make > it static and use sysfs_update_group() to adjust visibility on the > applicable devices. [...] > @@ -1698,7 +1690,7 @@ int __must_check pci_create_sysfs_dev_files(struct pci_dev *pdev) > if (!sysfs_initialized) > return -EACCES; > > - retval = pci_create_boot_display_file(pdev); > + retval = sysfs_update_group(&pdev->dev.kobj, &pci_display_attr_group); > if (retval) > return retval; > pci_create_sysfs_dev_files() is called from two places, pci_bus_add_device() and the late_initcall pci_sysfs_init(). Do you really need to update the group in both or would one of them suffice? If the latter, please update it only in that single place. Better yet, if you know where visibility of the attribute may change (e.g. after certain function calls in graphics drivers), add the call there instead of in the PCI core. We should probably add a code comment to pci_create_sysfs_dev_files() that it is slated for removal (once the resource files have been converted to static as well) and that no new attributes are allowed to be added here. Thanks, Lukas