Since 104daa71b396 ("PCI: Determine actual VPD size on first access") there's nothing that keeps us from using a static attribute. This allows to significantly simplify the code. v2: - switch to using PCI sysfs core code in patch 2 Heiner Kallweit (2): PCI/VPD: Remove dead code from sysfs access functions PCI/VPD: Let PCI sysfs core code handle VPD binary attribute drivers/pci/pci-sysfs.c | 54 +++++++++++++++++++++++--------- drivers/pci/pci.h | 2 -- drivers/pci/vpd.c | 68 ----------------------------------------- 3 files changed, 40 insertions(+), 84 deletions(-) -- 2.30.0