linux/drivers/pci
Ilpo Järvinen f6c7399983 PCI/sysfs: Demacrofy pci_dev_resource_resize_attr(n) functions
pci_dev_resource_resize_attr(n) macro is invoked for six resources,
creating a large footprint function for each resource.

Rework the macro to only create a function that calls a helper function so
the compiler can decide if it warrants to inline the function or not.

With x86_64 defconfig, this saves roughly 2.5kB:

  $ scripts/bloat-o-meter drivers/pci/pci-sysfs.o{.old,.new}
  add/remove: 1/0 grow/shrink: 0/6 up/down: 512/-2934 (-2422)
  Function                                     old     new   delta
  __resource_resize_store                        -     512    +512
  resource5_resize_store                       503      14    -489
  resource4_resize_store                       503      14    -489
  resource3_resize_store                       503      14    -489
  resource2_resize_store                       503      14    -489
  resource1_resize_store                       503      14    -489
  resource0_resize_store                       500      11    -489
  Total: Before=13399, After=10977, chg -18.08%

(The compiler seemingly chose to still inline __resource_resize_show()
which is fine, those functions are not very complex/large.)

Link: https://lore.kernel.org/r/20240222114607.1837-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2024-03-05 16:10:17 -06:00
..
controller pci-v6.8-changes 2024-01-17 16:23:17 -08:00
endpoint Char/Misc and other Driver changes for 6.8-rc1 2024-01-17 16:47:17 -08:00
hotplug Revert "PCI: acpiphp: Reassign resources on bridge if necessary" 2023-12-15 14:55:10 -06:00
msi PCI/MSI: Use FIELD_GET/PREP() 2023-10-24 10:54:04 -05:00
pcie pci-v6.8-changes 2024-01-17 16:23:17 -08:00
switch PCI: switchtec: Fix stdev_release() crash after surprise hot remove 2023-11-22 09:44:06 -06:00
access.c PCI: Move pci_clear_and_set_dword() helper to PCI header 2023-12-13 13:35:41 +00:00
ats.c PCI/ATS: Use FIELD_GET() 2023-10-24 16:55:45 -05:00
bus.c Devicetree updates for v6.6: 2023-08-30 16:59:03 -07:00
doe.c PCI/DOE: Fix destroy_work_on_stack() race 2023-07-27 15:20:47 -05:00
ecam.c
host-bridge.c
iov.c PCI: Use resource names in PCI log messages 2023-12-15 17:28:42 -06:00
irq.c PCI: Check for alloc failure in pci_request_irq() 2022-11-21 16:55:18 -06:00
Kconfig PCI: Replace unnecessary UTF-8 in Kconfig 2023-10-06 14:30:48 -05:00
Makefile PCI/sysfs: Compile pci-sysfs.c only if CONFIG_SYSFS=y 2024-03-05 16:08:43 -06:00
mmap.c PCI/sysfs: Compile pci-sysfs.c only if CONFIG_SYSFS=y 2024-03-05 16:08:43 -06:00
of_property.c PCI: of_property: Handle interrupt parsing failures 2023-09-29 17:33:46 -05:00
of.c PCI: of: Destroy changeset when adding PCI device node fails 2023-09-29 17:33:51 -05:00
p2pdma.c PCI/P2PDMA: Remove redundant goto 2023-10-23 12:17:52 -05:00
pci-acpi.c Merge branch 'pci/pm' 2023-10-28 13:30:59 -05:00
pci-bridge-emul.c PCI: pci-bridge-emul: Set position of PCI capabilities to real HW value 2022-08-25 12:07:56 +02:00
pci-bridge-emul.h PCI: pci-bridge-emul: Set position of PCI capabilities to real HW value 2022-08-25 12:07:56 +02:00
pci-driver.c PCI/PM: Mark devices disconnected if upstream PCIe link is down on resume 2023-09-29 17:42:00 -05:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c PCI: pci_stub: Set driver_managed_dma 2022-04-28 15:32:20 +02:00
pci-sysfs.c PCI/sysfs: Demacrofy pci_dev_resource_resize_attr(n) functions 2024-03-05 16:10:17 -06:00
pci.c cxl for v6.8 2024-01-18 16:22:43 -08:00
pci.h PCI: Remove obsolete pci_cleanup_rom() declaration 2024-03-05 16:08:56 -06:00
probe.c PCI/sysfs: Compile pci-sysfs.c only if CONFIG_SYSFS=y 2024-03-05 16:08:43 -06:00
proc.c PCI: Remove pci_mmap_page_range() wrapper 2022-07-29 12:08:44 -05:00
quirks.c pci-v6.8-changes 2024-01-17 16:23:17 -08:00
remove.c PCI: Create device tree node for bridge 2023-08-22 14:56:09 -05:00
rom.c
search.c PCI: Add pci_get_base_class() helper 2023-09-28 16:49:44 -05:00
setup-bus.c PCI: Use resource names in PCI log messages 2023-12-15 17:28:42 -06:00
setup-irq.c
setup-res.c PCI: Use resource names in PCI log messages 2023-12-15 17:28:42 -06:00
slot.c PCI/sysfs: Constify struct kobj_type pci_slot_ktype 2023-02-16 12:00:25 -06:00
syscall.c PCI: Use consistent put_user() pointer types 2023-08-25 08:15:13 -05:00
vc.c PCI/VC: Use FIELD_GET() 2023-10-24 16:55:45 -05:00
vgaarb.c pci-v6.7-changes 2023-11-02 14:05:18 -10:00
vpd.c PCI/VPD: Add runtime power management to sysfs interface 2023-08-11 14:19:16 -05:00
xen-pcifront.c x86: always initialize xen-swiotlb when xen-pcifront is enabling 2023-07-31 17:54:27 +02:00