lkml.org 
[lkml]   [2021]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI: qcom-ep: Constify static dw_pcie_ep_ops
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

\
 
 \ /
  Last update: 2021-12-04 23:29    [W:0.041 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site