linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: histb: constify dw_pcie_host_ops structure
@ 2018-10-27 18:31 Julia Lawall
  2018-10-29  2:00 ` Shawn Guo
  2018-11-20 11:37 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 3+ messages in thread
From: Julia Lawall @ 2018-10-27 18:31 UTC (permalink / raw)
  To: Jianguo Sun
  Cc: kernel-janitors, Shawn Guo, Lorenzo Pieralisi, Bjorn Helgaas,
	linux-pci, linux-kernel

The dw_pcie_host_ops structure is only stored in the ops field
of a pcie_port structure, and this field is const, so make the
dw_pcie_host_ops structure const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pci/controller/dwc/pcie-histb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -u -p a/drivers/pci/controller/dwc/pcie-histb.c b/drivers/pci/controller/dwc/pcie-histb.c
--- a/drivers/pci/controller/dwc/pcie-histb.c
+++ b/drivers/pci/controller/dwc/pcie-histb.c
@@ -202,7 +202,7 @@ static int histb_pcie_host_init(struct p
 	return 0;
 }
 
-static struct dw_pcie_host_ops histb_pcie_host_ops = {
+static const struct dw_pcie_host_ops histb_pcie_host_ops = {
 	.rd_own_conf = histb_pcie_rd_own_conf,
 	.wr_own_conf = histb_pcie_wr_own_conf,
 	.host_init = histb_pcie_host_init,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI: histb: constify dw_pcie_host_ops structure
  2018-10-27 18:31 [PATCH] PCI: histb: constify dw_pcie_host_ops structure Julia Lawall
@ 2018-10-29  2:00 ` Shawn Guo
  2018-11-20 11:37 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2018-10-29  2:00 UTC (permalink / raw)
  To: Julia Lawall
  Cc: sunjianguo1, kernel-janitors, Lorenzo Pieralisi, Bjorn Helgaas,
	linux-pci, Linux Kernel Mailing List

On Sun, Oct 28, 2018 at 3:06 AM Julia Lawall <Julia.Lawall@lip6.fr> wrote:
>
> The dw_pcie_host_ops structure is only stored in the ops field
> of a pcie_port structure, and this field is const, so make the
> dw_pcie_host_ops structure const as well.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Shawn Guo <shawn.guo@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI: histb: constify dw_pcie_host_ops structure
  2018-10-27 18:31 [PATCH] PCI: histb: constify dw_pcie_host_ops structure Julia Lawall
  2018-10-29  2:00 ` Shawn Guo
@ 2018-11-20 11:37 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2018-11-20 11:37 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Jianguo Sun, kernel-janitors, Shawn Guo, Bjorn Helgaas,
	linux-pci, linux-kernel

On Sat, Oct 27, 2018 at 08:31:19PM +0200, Julia Lawall wrote:
> The dw_pcie_host_ops structure is only stored in the ops field
> of a pcie_port structure, and this field is const, so make the
> dw_pcie_host_ops structure const as well.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/pci/controller/dwc/pcie-histb.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to pci/dwc for v4.21, thanks.

Lorenzo

> diff -u -p a/drivers/pci/controller/dwc/pcie-histb.c b/drivers/pci/controller/dwc/pcie-histb.c
> --- a/drivers/pci/controller/dwc/pcie-histb.c
> +++ b/drivers/pci/controller/dwc/pcie-histb.c
> @@ -202,7 +202,7 @@ static int histb_pcie_host_init(struct p
>  	return 0;
>  }
>  
> -static struct dw_pcie_host_ops histb_pcie_host_ops = {
> +static const struct dw_pcie_host_ops histb_pcie_host_ops = {
>  	.rd_own_conf = histb_pcie_rd_own_conf,
>  	.wr_own_conf = histb_pcie_wr_own_conf,
>  	.host_init = histb_pcie_host_init,
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-20 11:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-27 18:31 [PATCH] PCI: histb: constify dw_pcie_host_ops structure Julia Lawall
2018-10-29  2:00 ` Shawn Guo
2018-11-20 11:37 ` Lorenzo Pieralisi

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