Skip to content

Commit 64a70f5

Browse files
paliLorenzo Pieralisi
authored andcommitted
PCI: pci-bridge-emul: Make struct pci_bridge_emul_ops as const
It is read-only constant structure, so properly mark it with const keyword. Link: https://lore.kernel.org/r/20220104153529.31647-3-pali@kernel.org Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
1 parent e621e10 commit 64a70f5

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/pci/controller/pci-aardvark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ advk_pci_bridge_emul_pcie_conf_write(struct pci_bridge_emul *bridge,
928928
}
929929
}
930930

931-
static struct pci_bridge_emul_ops advk_pci_bridge_emul_ops = {
931+
static const struct pci_bridge_emul_ops advk_pci_bridge_emul_ops = {
932932
.read_base = advk_pci_bridge_emul_base_conf_read,
933933
.write_base = advk_pci_bridge_emul_base_conf_write,
934934
.read_pcie = advk_pci_bridge_emul_pcie_conf_read,

drivers/pci/controller/pci-mvebu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ mvebu_pci_bridge_emul_pcie_conf_write(struct pci_bridge_emul *bridge,
709709
}
710710
}
711711

712-
static struct pci_bridge_emul_ops mvebu_pci_bridge_emul_ops = {
712+
static const struct pci_bridge_emul_ops mvebu_pci_bridge_emul_ops = {
713713
.read_base = mvebu_pci_bridge_emul_base_conf_read,
714714
.write_base = mvebu_pci_bridge_emul_base_conf_write,
715715
.read_pcie = mvebu_pci_bridge_emul_pcie_conf_read,

drivers/pci/pci-bridge-emul.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct pci_bridge_reg_behavior;
112112
struct pci_bridge_emul {
113113
struct pci_bridge_emul_conf conf;
114114
struct pci_bridge_emul_pcie_conf pcie_conf;
115-
struct pci_bridge_emul_ops *ops;
115+
const struct pci_bridge_emul_ops *ops;
116116
struct pci_bridge_reg_behavior *pci_regs_behavior;
117117
struct pci_bridge_reg_behavior *pcie_cap_regs_behavior;
118118
void *data;

0 commit comments

Comments
 (0)