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

PCI: qcom-ep: Constify static dw_pcie_ep_ops

The only usage of pci_ep_ops is to assign its address to the ops field
in the dw_pcie_ep struct which is a pointer to const struct dw_pcie_ep_ops.
Make it const to allow the compiler to put it in read-only memory.

Link: https://lore.kernel.org/r/20211204220316.88655-1-rikard.falkeborn@gmail.com
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

authored by

Rikard Falkeborn and committed by
Lorenzo Pieralisi
840a720a 3f13d611

+1 -1
+1 -1
drivers/pci/controller/dwc/pcie-qcom-ep.c
··· 619 619 dw_pcie_ep_reset_bar(pci, bar); 620 620 } 621 621 622 - static struct dw_pcie_ep_ops pci_ep_ops = { 622 + static const struct dw_pcie_ep_ops pci_ep_ops = { 623 623 .ep_init = qcom_pcie_ep_init, 624 624 .raise_irq = qcom_pcie_ep_raise_irq, 625 625 .get_features = qcom_pcie_epc_get_features,