Skip to content

Commit 27fce9e

Browse files
floatiousbjorn-helgaas
authored andcommitted
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
1 parent 152a093 commit 27fce9e

13 files changed

Lines changed: 0 additions & 22 deletions

drivers/pci/controller/cadence/pcie-cadence-ep.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,14 +608,12 @@ static int cdns_pcie_ep_start(struct pci_epc *epc)
608608
}
609609

610610
static const struct pci_epc_features cdns_pcie_epc_vf_features = {
611-
.linkup_notifier = false,
612611
.msi_capable = true,
613612
.msix_capable = true,
614613
.align = 65536,
615614
};
616615

617616
static const struct pci_epc_features cdns_pcie_epc_features = {
618-
.linkup_notifier = false,
619617
.msi_capable = true,
620618
.msix_capable = true,
621619
.align = 256,

drivers/pci/controller/dwc/pci-dra7xx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ static int dra7xx_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
426426
static const struct pci_epc_features dra7xx_pcie_epc_features = {
427427
.linkup_notifier = true,
428428
.msi_capable = true,
429-
.msix_capable = false,
430429
};
431430

432431
static const struct pci_epc_features*

drivers/pci/controller/dwc/pci-imx6.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,9 +1387,7 @@ static int imx_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
13871387
}
13881388

13891389
static const struct pci_epc_features imx8m_pcie_epc_features = {
1390-
.linkup_notifier = false,
13911390
.msi_capable = true,
1392-
.msix_capable = false,
13931391
.bar[BAR_1] = { .type = BAR_RESERVED, },
13941392
.bar[BAR_3] = { .type = BAR_RESERVED, },
13951393
.bar[BAR_4] = { .type = BAR_FIXED, .fixed_size = SZ_256, },
@@ -1398,9 +1396,7 @@ static const struct pci_epc_features imx8m_pcie_epc_features = {
13981396
};
13991397

14001398
static const struct pci_epc_features imx8q_pcie_epc_features = {
1401-
.linkup_notifier = false,
14021399
.msi_capable = true,
1403-
.msix_capable = false,
14041400
.bar[BAR_1] = { .type = BAR_RESERVED, },
14051401
.bar[BAR_3] = { .type = BAR_RESERVED, },
14061402
.bar[BAR_5] = { .type = BAR_RESERVED, },

drivers/pci/controller/dwc/pci-keystone.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,6 @@ static int ks_pcie_am654_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
960960
}
961961

962962
static const struct pci_epc_features ks_pcie_am654_epc_features = {
963-
.linkup_notifier = false,
964963
.msi_capable = true,
965964
.msix_capable = true,
966965
.bar[BAR_0] = { .type = BAR_RESERVED, },

drivers/pci/controller/dwc/pcie-artpec6.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,7 @@ static int artpec6_pcie_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
370370
}
371371

372372
static const struct pci_epc_features artpec6_pcie_epc_features = {
373-
.linkup_notifier = false,
374373
.msi_capable = true,
375-
.msix_capable = false,
376374
};
377375

378376
static const struct pci_epc_features *

drivers/pci/controller/dwc/pcie-designware-plat.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ static int dw_plat_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
6161
}
6262

6363
static const struct pci_epc_features dw_plat_pcie_epc_features = {
64-
.linkup_notifier = false,
6564
.msi_capable = true,
6665
.msix_capable = true,
6766
};

drivers/pci/controller/dwc/pcie-dw-rockchip.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ static const struct pci_epc_features rockchip_pcie_epc_features_rk3568 = {
325325
.linkup_notifier = true,
326326
.msi_capable = true,
327327
.msix_capable = true,
328-
.intx_capable = false,
329328
.align = SZ_64K,
330329
.bar[BAR_0] = { .type = BAR_RESIZABLE, },
331330
.bar[BAR_1] = { .type = BAR_RESIZABLE, },
@@ -346,7 +345,6 @@ static const struct pci_epc_features rockchip_pcie_epc_features_rk3588 = {
346345
.linkup_notifier = true,
347346
.msi_capable = true,
348347
.msix_capable = true,
349-
.intx_capable = false,
350348
.align = SZ_64K,
351349
.bar[BAR_0] = { .type = BAR_RESIZABLE, },
352350
.bar[BAR_1] = { .type = BAR_RESIZABLE, },

drivers/pci/controller/dwc/pcie-keembay.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ static int keembay_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
309309
}
310310

311311
static const struct pci_epc_features keembay_pcie_epc_features = {
312-
.linkup_notifier = false,
313312
.msi_capable = true,
314313
.msix_capable = true,
315314
.bar[BAR_0] = { .only_64bit = true, },

drivers/pci/controller/dwc/pcie-qcom-ep.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,6 @@ static void qcom_pcie_ep_init_debugfs(struct qcom_pcie_ep *pcie_ep)
831831
static const struct pci_epc_features qcom_pcie_epc_features = {
832832
.linkup_notifier = true,
833833
.msi_capable = true,
834-
.msix_capable = false,
835834
.align = SZ_4K,
836835
.bar[BAR_0] = { .only_64bit = true, },
837836
.bar[BAR_1] = { .type = BAR_RESERVED, },

drivers/pci/controller/dwc/pcie-rcar-gen4.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,7 @@ static int rcar_gen4_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
398398
}
399399

400400
static const struct pci_epc_features rcar_gen4_pcie_epc_features = {
401-
.linkup_notifier = false,
402401
.msi_capable = true,
403-
.msix_capable = false,
404402
.bar[BAR_1] = { .type = BAR_RESERVED, },
405403
.bar[BAR_3] = { .type = BAR_RESERVED, },
406404
.bar[BAR_4] = { .type = BAR_FIXED, .fixed_size = 256 },

0 commit comments

Comments
 (0)