From: Lars-Peter Clausen <lars@metafoo.de>
To: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>
Cc: Manivannan Sadhasivam <mani@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>, Jon Mason <jdmason@kudzu.us>,
Dave Jiang <dave.jiang@intel.com>,
Allen Hubbe <allenbh@gmail.com>,
linux-pci@vger.kernel.org, mhi@lists.linux.dev,
ntb@lists.linux.dev, Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 2/5] PCI: endpoint: pci-epf-mhi: Constify pci_epf_ops and pci_epf_event_ops
Date: Sat, 22 Jul 2023 16:08:45 -0700 [thread overview]
Message-ID: <20230722230848.589428-2-lars@metafoo.de> (raw)
In-Reply-To: <20230722230848.589428-1-lars@metafoo.de>
Both the pci_epf_ops and pci_epf_evnt_ops structs for the PCI endpoint mhi
driver are never modified. Mark them as const so they can be placed in the
read-only section.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/pci/endpoint/functions/pci-epf-mhi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
index 9c1f5a154fbd..bb1c8e502a09 100644
--- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
+++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
@@ -389,7 +389,7 @@ static void pci_epf_mhi_unbind(struct pci_epf *epf)
pci_epc_clear_bar(epc, epf->func_no, epf->vfunc_no, epf_bar);
}
-static struct pci_epc_event_ops pci_epf_mhi_event_ops = {
+static const struct pci_epc_event_ops pci_epf_mhi_event_ops = {
.core_init = pci_epf_mhi_core_init,
.link_up = pci_epf_mhi_link_up,
.link_down = pci_epf_mhi_link_down,
@@ -428,7 +428,7 @@ static const struct pci_epf_device_id pci_epf_mhi_ids[] = {
{},
};
-static struct pci_epf_ops pci_epf_mhi_ops = {
+static const struct pci_epf_ops pci_epf_mhi_ops = {
.unbind = pci_epf_mhi_unbind,
.bind = pci_epf_mhi_bind,
};
--
2.39.2
next prev parent reply other threads:[~2023-07-22 23:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-22 23:08 [PATCH 1/5] PCI: endpoint: Make pci_epf_ops in pci_epf_driver const Lars-Peter Clausen
2023-07-22 23:08 ` Lars-Peter Clausen [this message]
2023-07-24 6:01 ` [PATCH 2/5] PCI: endpoint: pci-epf-mhi: Constify pci_epf_ops and pci_epf_event_ops Manivannan Sadhasivam
2023-07-22 23:08 ` [PATCH 3/5] PCI: endpoint: pci-epf-ntb: Constify pci_epf_ops Lars-Peter Clausen
2023-07-24 6:02 ` Manivannan Sadhasivam
2023-07-22 23:08 ` [PATCH 4/5] PCI: endpoint: pci-epf-vntb: " Lars-Peter Clausen
2023-07-24 6:02 ` Manivannan Sadhasivam
2023-07-22 23:08 ` [PATCH 5/5] PCI: endpoint: pci-epf-test: " Lars-Peter Clausen
2023-07-24 6:03 ` Manivannan Sadhasivam
2023-07-24 6:00 ` [PATCH 1/5] PCI: endpoint: Make pci_epf_ops in pci_epf_driver const Manivannan Sadhasivam
2023-12-18 22:43 ` Krzysztof Wilczyński
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230722230848.589428-2-lars@metafoo.de \
--to=lars@metafoo.de \
--cc=allenbh@gmail.com \
--cc=bhelgaas@google.com \
--cc=dave.jiang@intel.com \
--cc=jdmason@kudzu.us \
--cc=kishon@kernel.org \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=mhi@lists.linux.dev \
--cc=ntb@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).