* [PATCH] PCI: dwc: layerscape: constify driver data
@ 2018-11-19 10:00 Stefan Agner
2018-11-20 13:04 ` Lorenzo Pieralisi
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Agner @ 2018-11-19 10:00 UTC (permalink / raw)
To: minghuan.Lian, mingkai.hu, roy.zang
Cc: lorenzo.pieralisi, bhelgaas, linux-pci, linux-arm-kernel,
linux-kernel, Stefan Agner
Constify driver data since they don't get changed at runtime.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
drivers/pci/controller/dwc/pci-layerscape.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c
index 3724d3ef7008..905a0ab0e6fa 100644
--- a/drivers/pci/controller/dwc/pci-layerscape.c
+++ b/drivers/pci/controller/dwc/pci-layerscape.c
@@ -222,12 +222,12 @@ static const struct dw_pcie_ops dw_ls_pcie_ops = {
.link_up = ls_pcie_link_up,
};
-static struct ls_pcie_drvdata ls1021_drvdata = {
+static const struct ls_pcie_drvdata ls1021_drvdata = {
.ops = &ls1021_pcie_host_ops,
.dw_pcie_ops = &dw_ls1021_pcie_ops,
};
-static struct ls_pcie_drvdata ls1043_drvdata = {
+static const struct ls_pcie_drvdata ls1043_drvdata = {
.lut_offset = 0x10000,
.ltssm_shift = 24,
.lut_dbg = 0x7fc,
@@ -235,7 +235,7 @@ static struct ls_pcie_drvdata ls1043_drvdata = {
.dw_pcie_ops = &dw_ls_pcie_ops,
};
-static struct ls_pcie_drvdata ls1046_drvdata = {
+static const struct ls_pcie_drvdata ls1046_drvdata = {
.lut_offset = 0x80000,
.ltssm_shift = 24,
.lut_dbg = 0x407fc,
@@ -243,7 +243,7 @@ static struct ls_pcie_drvdata ls1046_drvdata = {
.dw_pcie_ops = &dw_ls_pcie_ops,
};
-static struct ls_pcie_drvdata ls2080_drvdata = {
+static const struct ls_pcie_drvdata ls2080_drvdata = {
.lut_offset = 0x80000,
.ltssm_shift = 0,
.lut_dbg = 0x7fc,
@@ -251,7 +251,7 @@ static struct ls_pcie_drvdata ls2080_drvdata = {
.dw_pcie_ops = &dw_ls_pcie_ops,
};
-static struct ls_pcie_drvdata ls2088_drvdata = {
+static const struct ls_pcie_drvdata ls2088_drvdata = {
.lut_offset = 0x80000,
.ltssm_shift = 0,
.lut_dbg = 0x407fc,
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: dwc: layerscape: constify driver data
2018-11-19 10:00 [PATCH] PCI: dwc: layerscape: constify driver data Stefan Agner
@ 2018-11-20 13:04 ` Lorenzo Pieralisi
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Pieralisi @ 2018-11-20 13:04 UTC (permalink / raw)
To: Stefan Agner
Cc: minghuan.Lian, mingkai.hu, roy.zang, bhelgaas, linux-pci,
linux-arm-kernel, linux-kernel
On Mon, Nov 19, 2018 at 11:00:22AM +0100, Stefan Agner wrote:
> Constify driver data since they don't get changed at runtime.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
> drivers/pci/controller/dwc/pci-layerscape.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Applied to pci/dwc for v4.21.
Thanks,
Lorenzo
> diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c
> index 3724d3ef7008..905a0ab0e6fa 100644
> --- a/drivers/pci/controller/dwc/pci-layerscape.c
> +++ b/drivers/pci/controller/dwc/pci-layerscape.c
> @@ -222,12 +222,12 @@ static const struct dw_pcie_ops dw_ls_pcie_ops = {
> .link_up = ls_pcie_link_up,
> };
>
> -static struct ls_pcie_drvdata ls1021_drvdata = {
> +static const struct ls_pcie_drvdata ls1021_drvdata = {
> .ops = &ls1021_pcie_host_ops,
> .dw_pcie_ops = &dw_ls1021_pcie_ops,
> };
>
> -static struct ls_pcie_drvdata ls1043_drvdata = {
> +static const struct ls_pcie_drvdata ls1043_drvdata = {
> .lut_offset = 0x10000,
> .ltssm_shift = 24,
> .lut_dbg = 0x7fc,
> @@ -235,7 +235,7 @@ static struct ls_pcie_drvdata ls1043_drvdata = {
> .dw_pcie_ops = &dw_ls_pcie_ops,
> };
>
> -static struct ls_pcie_drvdata ls1046_drvdata = {
> +static const struct ls_pcie_drvdata ls1046_drvdata = {
> .lut_offset = 0x80000,
> .ltssm_shift = 24,
> .lut_dbg = 0x407fc,
> @@ -243,7 +243,7 @@ static struct ls_pcie_drvdata ls1046_drvdata = {
> .dw_pcie_ops = &dw_ls_pcie_ops,
> };
>
> -static struct ls_pcie_drvdata ls2080_drvdata = {
> +static const struct ls_pcie_drvdata ls2080_drvdata = {
> .lut_offset = 0x80000,
> .ltssm_shift = 0,
> .lut_dbg = 0x7fc,
> @@ -251,7 +251,7 @@ static struct ls_pcie_drvdata ls2080_drvdata = {
> .dw_pcie_ops = &dw_ls_pcie_ops,
> };
>
> -static struct ls_pcie_drvdata ls2088_drvdata = {
> +static const struct ls_pcie_drvdata ls2088_drvdata = {
> .lut_offset = 0x80000,
> .ltssm_shift = 0,
> .lut_dbg = 0x407fc,
> --
> 2.19.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-20 13:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-19 10:00 [PATCH] PCI: dwc: layerscape: constify driver data Stefan Agner
2018-11-20 13:04 ` 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).