Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: endpoint: Drop superfluous pci_epc_features initialization

struct pci_epc_features has static storage duration, so all struct members
are zero initialized implicitly. Thus, remove explicit zero initialization
for features that are *not* supported so we don't have to touch existing
drivers as new features are added.

Signed-off-by: Niklas Cassel <cassel@kernel.org>
[bhelgaas: squash together, expand commit log rationale]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> #rcar-ep, rcar-gen4
Link: https://patch.msgid.link/20250814152119.1562063-16-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-17-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-18-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-19-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-20-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-21-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-22-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-23-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-24-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-25-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-26-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-27-cassel@kernel.org
Link: https://patch.msgid.link/20250814152119.1562063-28-cassel@kernel.org

authored by

Niklas Cassel and committed by
Bjorn Helgaas
27fce9e8 152a0936

-22
-2
drivers/pci/controller/cadence/pcie-cadence-ep.c
··· 608 608 } 609 609 610 610 static const struct pci_epc_features cdns_pcie_epc_vf_features = { 611 - .linkup_notifier = false, 612 611 .msi_capable = true, 613 612 .msix_capable = true, 614 613 .align = 65536, 615 614 }; 616 615 617 616 static const struct pci_epc_features cdns_pcie_epc_features = { 618 - .linkup_notifier = false, 619 617 .msi_capable = true, 620 618 .msix_capable = true, 621 619 .align = 256,
-1
drivers/pci/controller/dwc/pci-dra7xx.c
··· 426 426 static const struct pci_epc_features dra7xx_pcie_epc_features = { 427 427 .linkup_notifier = true, 428 428 .msi_capable = true, 429 - .msix_capable = false, 430 429 }; 431 430 432 431 static const struct pci_epc_features*
-4
drivers/pci/controller/dwc/pci-imx6.c
··· 1387 1387 } 1388 1388 1389 1389 static const struct pci_epc_features imx8m_pcie_epc_features = { 1390 - .linkup_notifier = false, 1391 1390 .msi_capable = true, 1392 - .msix_capable = false, 1393 1391 .bar[BAR_1] = { .type = BAR_RESERVED, }, 1394 1392 .bar[BAR_3] = { .type = BAR_RESERVED, }, 1395 1393 .bar[BAR_4] = { .type = BAR_FIXED, .fixed_size = SZ_256, }, ··· 1396 1398 }; 1397 1399 1398 1400 static const struct pci_epc_features imx8q_pcie_epc_features = { 1399 - .linkup_notifier = false, 1400 1401 .msi_capable = true, 1401 - .msix_capable = false, 1402 1402 .bar[BAR_1] = { .type = BAR_RESERVED, }, 1403 1403 .bar[BAR_3] = { .type = BAR_RESERVED, }, 1404 1404 .bar[BAR_5] = { .type = BAR_RESERVED, },
-1
drivers/pci/controller/dwc/pci-keystone.c
··· 960 960 } 961 961 962 962 static const struct pci_epc_features ks_pcie_am654_epc_features = { 963 - .linkup_notifier = false, 964 963 .msi_capable = true, 965 964 .msix_capable = true, 966 965 .bar[BAR_0] = { .type = BAR_RESERVED, },
-2
drivers/pci/controller/dwc/pcie-artpec6.c
··· 370 370 } 371 371 372 372 static const struct pci_epc_features artpec6_pcie_epc_features = { 373 - .linkup_notifier = false, 374 373 .msi_capable = true, 375 - .msix_capable = false, 376 374 }; 377 375 378 376 static const struct pci_epc_features *
-1
drivers/pci/controller/dwc/pcie-designware-plat.c
··· 61 61 } 62 62 63 63 static const struct pci_epc_features dw_plat_pcie_epc_features = { 64 - .linkup_notifier = false, 65 64 .msi_capable = true, 66 65 .msix_capable = true, 67 66 };
-2
drivers/pci/controller/dwc/pcie-dw-rockchip.c
··· 325 325 .linkup_notifier = true, 326 326 .msi_capable = true, 327 327 .msix_capable = true, 328 - .intx_capable = false, 329 328 .align = SZ_64K, 330 329 .bar[BAR_0] = { .type = BAR_RESIZABLE, }, 331 330 .bar[BAR_1] = { .type = BAR_RESIZABLE, }, ··· 345 346 .linkup_notifier = true, 346 347 .msi_capable = true, 347 348 .msix_capable = true, 348 - .intx_capable = false, 349 349 .align = SZ_64K, 350 350 .bar[BAR_0] = { .type = BAR_RESIZABLE, }, 351 351 .bar[BAR_1] = { .type = BAR_RESIZABLE, },
-1
drivers/pci/controller/dwc/pcie-keembay.c
··· 309 309 } 310 310 311 311 static const struct pci_epc_features keembay_pcie_epc_features = { 312 - .linkup_notifier = false, 313 312 .msi_capable = true, 314 313 .msix_capable = true, 315 314 .bar[BAR_0] = { .only_64bit = true, },
-1
drivers/pci/controller/dwc/pcie-qcom-ep.c
··· 831 831 static const struct pci_epc_features qcom_pcie_epc_features = { 832 832 .linkup_notifier = true, 833 833 .msi_capable = true, 834 - .msix_capable = false, 835 834 .align = SZ_4K, 836 835 .bar[BAR_0] = { .only_64bit = true, }, 837 836 .bar[BAR_1] = { .type = BAR_RESERVED, },
-2
drivers/pci/controller/dwc/pcie-rcar-gen4.c
··· 398 398 } 399 399 400 400 static const struct pci_epc_features rcar_gen4_pcie_epc_features = { 401 - .linkup_notifier = false, 402 401 .msi_capable = true, 403 - .msix_capable = false, 404 402 .bar[BAR_1] = { .type = BAR_RESERVED, }, 405 403 .bar[BAR_3] = { .type = BAR_RESERVED, }, 406 404 .bar[BAR_4] = { .type = BAR_FIXED, .fixed_size = 256 },
-2
drivers/pci/controller/dwc/pcie-tegra194.c
··· 1998 1998 1999 1999 static const struct pci_epc_features tegra_pcie_epc_features = { 2000 2000 .linkup_notifier = true, 2001 - .msi_capable = false, 2002 - .msix_capable = false, 2003 2001 .bar[BAR_0] = { .type = BAR_FIXED, .fixed_size = SZ_1M, 2004 2002 .only_64bit = true, }, 2005 2003 .bar[BAR_1] = { .type = BAR_RESERVED, },
-2
drivers/pci/controller/pcie-rcar-ep.c
··· 436 436 } 437 437 438 438 static const struct pci_epc_features rcar_pcie_epc_features = { 439 - .linkup_notifier = false, 440 439 .msi_capable = true, 441 - .msix_capable = false, 442 440 /* use 64-bit BARs so mark BAR[1,3,5] as reserved */ 443 441 .bar[BAR_0] = { .type = BAR_FIXED, .fixed_size = 128, 444 442 .only_64bit = true, },
-1
drivers/pci/controller/pcie-rockchip-ep.c
··· 694 694 static const struct pci_epc_features rockchip_pcie_epc_features = { 695 695 .linkup_notifier = true, 696 696 .msi_capable = true, 697 - .msix_capable = false, 698 697 .intx_capable = true, 699 698 .align = ROCKCHIP_PCIE_AT_SIZE_ALIGN, 700 699 };