public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: "Krzysztof Wilczyński" <kw@linux.com>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Cc: Manivannan Sadhasivam <mani@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Rob Herring <robh@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: qcom-ep: Constify static dw_pcie_ep_ops
Date: Sat, 4 Dec 2021 23:28:36 +0100	[thread overview]
Message-ID: <YavrlE+5LdvvefMP@rocinante> (raw)
In-Reply-To: <20211204220316.88655-1-rikard.falkeborn@gmail.com>

Hi Rikard,

> 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.

[...]
> @@ -619,7 +619,7 @@ static void qcom_pcie_ep_init(struct dw_pcie_ep *ep)
>  		dw_pcie_ep_reset_bar(pci, bar);
>  }
>  
> -static struct dw_pcie_ep_ops pci_ep_ops = {
> +static const struct dw_pcie_ep_ops pci_ep_ops = {
>  	.ep_init = qcom_pcie_ep_init,
>  	.raise_irq = qcom_pcie_ep_raise_irq,
>  	.get_features = qcom_pcie_epc_get_features,

Looks good, thank you!

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

	Krzysztof

  reply	other threads:[~2021-12-04 22:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 22:03 [PATCH] PCI: qcom-ep: Constify static dw_pcie_ep_ops Rikard Falkeborn
2021-12-04 22:28 ` Krzysztof Wilczyński [this message]
2022-01-04 15:30 ` Lorenzo Pieralisi

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=YavrlE+5LdvvefMP@rocinante \
    --to=kw@linux.com \
    --cc=bhelgaas@google.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mani@kernel.org \
    --cc=rikard.falkeborn@gmail.com \
    --cc=robh@kernel.org \
    /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