]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
PCI: endpoint: Drop superfluous pci_epc_features initialization
authorNiklas Cassel <cassel@kernel.org>
Thu, 14 Aug 2025 15:21:20 +0000 (17:21 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 14 Aug 2025 15:42:42 +0000 (10:42 -0500)
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
13 files changed:
drivers/pci/controller/cadence/pcie-cadence-ep.c
drivers/pci/controller/dwc/pci-dra7xx.c
drivers/pci/controller/dwc/pci-imx6.c
drivers/pci/controller/dwc/pci-keystone.c
drivers/pci/controller/dwc/pcie-artpec6.c
drivers/pci/controller/dwc/pcie-designware-plat.c
drivers/pci/controller/dwc/pcie-dw-rockchip.c
drivers/pci/controller/dwc/pcie-keembay.c
drivers/pci/controller/dwc/pcie-qcom-ep.c
drivers/pci/controller/dwc/pcie-rcar-gen4.c
drivers/pci/controller/dwc/pcie-tegra194.c
drivers/pci/controller/pcie-rcar-ep.c
drivers/pci/controller/pcie-rockchip-ep.c

index 77c5a19b2ab1cc473c9b8e42605c1d379b6dfd68..f3565164f142d15c18aa617f55409c7511817b4f 100644 (file)
@@ -608,14 +608,12 @@ static int cdns_pcie_ep_start(struct pci_epc *epc)
 }
 
 static const struct pci_epc_features cdns_pcie_epc_vf_features = {
-       .linkup_notifier = false,
        .msi_capable = true,
        .msix_capable = true,
        .align = 65536,
 };
 
 static const struct pci_epc_features cdns_pcie_epc_features = {
-       .linkup_notifier = false,
        .msi_capable = true,
        .msix_capable = true,
        .align = 256,
index f97f5266d196c3a648f08746fcaeedd61ae1d49f..01cfd9aeb0b818e91432ce0ac5da01779b2ae21a 100644 (file)
@@ -426,7 +426,6 @@ static int dra7xx_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 static const struct pci_epc_features dra7xx_pcie_epc_features = {
        .linkup_notifier = true,
        .msi_capable = true,
-       .msix_capable = false,
 };
 
 static const struct pci_epc_features*
index 80e48746bbaf6815d8b9e879be5fa0bb992d9189..7ee21fac81a6e950f998ac9cb11d0ac88e1c405f 100644 (file)
@@ -1387,9 +1387,7 @@ static int imx_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 }
 
 static const struct pci_epc_features imx8m_pcie_epc_features = {
-       .linkup_notifier = false,
        .msi_capable = true,
-       .msix_capable = false,
        .bar[BAR_1] = { .type = BAR_RESERVED, },
        .bar[BAR_3] = { .type = BAR_RESERVED, },
        .bar[BAR_4] = { .type = BAR_FIXED, .fixed_size = SZ_256, },
@@ -1398,9 +1396,7 @@ static const struct pci_epc_features imx8m_pcie_epc_features = {
 };
 
 static const struct pci_epc_features imx8q_pcie_epc_features = {
-       .linkup_notifier = false,
        .msi_capable = true,
-       .msix_capable = false,
        .bar[BAR_1] = { .type = BAR_RESERVED, },
        .bar[BAR_3] = { .type = BAR_RESERVED, },
        .bar[BAR_5] = { .type = BAR_RESERVED, },
index 2b2632e513b52fdc4538cf0bde5078ee7599d86e..7d7aede54ed3b3e35ab3d95ff3520535b0380c7d 100644 (file)
@@ -960,7 +960,6 @@ static int ks_pcie_am654_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 }
 
 static const struct pci_epc_features ks_pcie_am654_epc_features = {
-       .linkup_notifier = false,
        .msi_capable = true,
        .msix_capable = true,
        .bar[BAR_0] = { .type = BAR_RESERVED, },
index 234c8cbcae3af9970c848578c5a924a2449f1975..f4a136ee2daf38ff5072d7e29c37e62d6eaae52f 100644 (file)
@@ -370,9 +370,7 @@ static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 }
 
 static const struct pci_epc_features artpec6_pcie_epc_features = {
-       .linkup_notifier = false,
        .msi_capable = true,
-       .msix_capable = false,
 };
 
 static const struct pci_epc_features *
index 771b9d9be077bf887ec7d3f86f4b46fe7f03cf84..12f41886c65d1e204c319a29c29a124867f58aeb 100644 (file)
@@ -61,7 +61,6 @@ static int dw_plat_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 }
 
 static const struct pci_epc_features dw_plat_pcie_epc_features = {
-       .linkup_notifier = false,
        .msi_capable = true,
        .msix_capable = true,
 };
index b5f5eee5a50efced0e40c2517c0faa303f14c913..c045353fa4930724c71ffc33d52bd03789b6e048 100644 (file)
@@ -325,7 +325,6 @@ static const struct pci_epc_features rockchip_pcie_epc_features_rk3568 = {
        .linkup_notifier = true,
        .msi_capable = true,
        .msix_capable = true,
-       .intx_capable = false,
        .align = SZ_64K,
        .bar[BAR_0] = { .type = BAR_RESIZABLE, },
        .bar[BAR_1] = { .type = BAR_RESIZABLE, },
@@ -346,7 +345,6 @@ static const struct pci_epc_features rockchip_pcie_epc_features_rk3588 = {
        .linkup_notifier = true,
        .msi_capable = true,
        .msix_capable = true,
-       .intx_capable = false,
        .align = SZ_64K,
        .bar[BAR_0] = { .type = BAR_RESIZABLE, },
        .bar[BAR_1] = { .type = BAR_RESIZABLE, },
index 67dd3337b4473ea5eac23f80656b39dbadae451f..60e74ac782af329a870e0e61cd0f9c4e9a67777c 100644 (file)
@@ -309,7 +309,6 @@ static int keembay_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 }
 
 static const struct pci_epc_features keembay_pcie_epc_features = {
-       .linkup_notifier        = false,
        .msi_capable            = true,
        .msix_capable           = true,
        .bar[BAR_0]             = { .only_64bit = true, },
index bf7c6ac0f3e3962de8346ab6e75dfff1d9642aad..60afb4d0134cd328a75e4838b9adae907032b441 100644 (file)
@@ -831,7 +831,6 @@ static void qcom_pcie_ep_init_debugfs(struct qcom_pcie_ep *pcie_ep)
 static const struct pci_epc_features qcom_pcie_epc_features = {
        .linkup_notifier = true,
        .msi_capable = true,
-       .msix_capable = false,
        .align = SZ_4K,
        .bar[BAR_0] = { .only_64bit = true, },
        .bar[BAR_1] = { .type = BAR_RESERVED, },
index 18055807a4f5f9f1233097e1e47604a3555dccf0..0621df691aec44335875a6d9516b842657d79daa 100644 (file)
@@ -398,9 +398,7 @@ static int rcar_gen4_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 }
 
 static const struct pci_epc_features rcar_gen4_pcie_epc_features = {
-       .linkup_notifier = false,
        .msi_capable = true,
-       .msix_capable = false,
        .bar[BAR_1] = { .type = BAR_RESERVED, },
        .bar[BAR_3] = { .type = BAR_RESERVED, },
        .bar[BAR_4] = { .type = BAR_FIXED, .fixed_size = 256 },
index 4f26086f25daf8e23cafbb2b460e1934734f4103..0e413857649fd01c6a3d4dedfe54b2f6c7466f8d 100644 (file)
@@ -1998,8 +1998,6 @@ static int tegra_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
 
 static const struct pci_epc_features tegra_pcie_epc_features = {
        .linkup_notifier = true,
-       .msi_capable = false,
-       .msix_capable = false,
        .bar[BAR_0] = { .type = BAR_FIXED, .fixed_size = SZ_1M,
                        .only_64bit = true, },
        .bar[BAR_1] = { .type = BAR_RESERVED, },
index a8a966844cf38cd59c5faea5fb8fd55b2f0fff34..657875ef4657f8f785884b7c8969af2c0d008626 100644 (file)
@@ -436,9 +436,7 @@ static void rcar_pcie_ep_stop(struct pci_epc *epc)
 }
 
 static const struct pci_epc_features rcar_pcie_epc_features = {
-       .linkup_notifier = false,
        .msi_capable = true,
-       .msix_capable = false,
        /* use 64-bit BARs so mark BAR[1,3,5] as reserved */
        .bar[BAR_0] = { .type = BAR_FIXED, .fixed_size = 128,
                        .only_64bit = true, },
index 300cd85fa035cd69f45635f38aa6b89b5345f653..799461335762e3e8cc96d278cc2e6d3df9898c13 100644 (file)
@@ -694,7 +694,6 @@ static int rockchip_pcie_ep_setup_irq(struct pci_epc *epc)
 static const struct pci_epc_features rockchip_pcie_epc_features = {
        .linkup_notifier = true,
        .msi_capable = true,
-       .msix_capable = false,
        .intx_capable = true,
        .align = ROCKCHIP_PCIE_AT_SIZE_ALIGN,
 };