On Sun, 2024-08-04 at 08:32 +0200, Lukas Wunner wrote: > On Wed, Jul 10, 2024 at 12:33:09PM +1000, Alistair Francis wrote: > > v14: > > - Revert back to v12 with extra pci_remove_resource_files() call > > v13: > > - Drop pci_doe_sysfs_init() and use pci_doe_sysfs_group > > - As discussed in > > https://lore.kernel.org/all/20231019165829.GA1381099@bhelgaas/ > > we can just modify pci_doe_sysfs_group at the DOE init and > > let > > device_add() handle the sysfs attributes. > > v12: > > - Drop pci_doe_features_sysfs_attr_visible() > > v11: > > - Gracefully handle multiple entried of same feature > > - Minor fixes and code cleanups > > Hm, it looks like the review comments I left for v11 were never > addressed :( > > https://lore.kernel.org/all/ZmxvnLDBhkWPrXGK@xxxxxxxxx/ > https://lore.kernel.org/all/Zm2RmWnSWEEX8WtV@xxxxxxxxx/ No they weren't! Sorry about that, it seems like I dropped the comments somehow. I have addressed them in v15 Alistair > > In particular, pci_{create,remove}_resource_files() is not the right > place > to dynamically add attributes. Move the calls of > pci_doe_sysfs_init() > and pci_doe_sysfs_teardown() to pci_device_add() and > pci_destroy_dev(), > respectively. This is also what I'm doing for dynamic CMA attributes > and what Mariusz is doing for LEDs added on enumeration: > > https://lore.kernel.org/all/77f549685f994981c010aebb1e9057aa3555b18a.1719771133.git.lukas@xxxxxxxxx/ > (search for pci_cma_publish) > > https://lore.kernel.org/all/20240711083009.5580-3-mariusz.tkaczyk@xxxxxxxxxxxxxxx/ > (search for pci_npem_create and pci_npem_remove) > > Thanks, > > Lukas