2017-06-02 08:21:08

by Tobias Klauser

[permalink] [raw]
Subject: [PATCH 0/7] irqchip: constify irq_domain_ops

Constify all remaining non-const instances of irq_domain_ops in the irqchip
drivers. These can be made const as they are never modified.

Tobias Klauser (7):
irqchip/aspeed-vic: constify irq_domain_ops
irqchip/i8259: constify irq_domain_ops
irqchip/irq-imx-gpcv2: constify irq_domain_ops
irqchip/irq-mbigen: constify irq_domain_ops
irqchip/irq-mips-gic: constify irq_domain_ops
irqchip/irq-renesas-h8300h: constify irq_domain_ops
irqchip/irq-renesas-h8s: constify irq_domain_ops

drivers/irqchip/irq-aspeed-vic.c | 2 +-
drivers/irqchip/irq-i8259.c | 2 +-
drivers/irqchip/irq-imx-gpcv2.c | 2 +-
drivers/irqchip/irq-mbigen.c | 2 +-
drivers/irqchip/irq-mips-gic.c | 2 +-
drivers/irqchip/irq-renesas-h8300h.c | 2 +-
drivers/irqchip/irq-renesas-h8s.c | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)

--
2.13.0



2017-06-02 08:21:12

by Tobias Klauser

[permalink] [raw]
Subject: [PATCH 3/7] irqchip/irq-imx-gpcv2: constify irq_domain_ops

struct irq_domain_ops is not modified, so it can be made const.

Signed-off-by: Tobias Klauser <[email protected]>
---
drivers/irqchip/irq-imx-gpcv2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-imx-gpcv2.c b/drivers/irqchip/irq-imx-gpcv2.c
index 9463f3557e82..bb36f572e322 100644
--- a/drivers/irqchip/irq-imx-gpcv2.c
+++ b/drivers/irqchip/irq-imx-gpcv2.c
@@ -200,7 +200,7 @@ static int imx_gpcv2_domain_alloc(struct irq_domain *domain,
&parent_fwspec);
}

-static struct irq_domain_ops gpcv2_irqchip_data_domain_ops = {
+static const struct irq_domain_ops gpcv2_irqchip_data_domain_ops = {
.translate = imx_gpcv2_domain_translate,
.alloc = imx_gpcv2_domain_alloc,
.free = irq_domain_free_irqs_common,
--
2.13.0


2017-06-02 08:21:10

by Tobias Klauser

[permalink] [raw]
Subject: [PATCH 6/7] irqchip/irq-renesas-h8300h: constify irq_domain_ops

struct irq_domain_ops is not modified, so it can be made const.

Cc: Yoshinori Sato <[email protected]>
Cc: [email protected]
Signed-off-by: Tobias Klauser <[email protected]>
---
drivers/irqchip/irq-renesas-h8300h.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-renesas-h8300h.c b/drivers/irqchip/irq-renesas-h8300h.c
index c378768d75b3..b8327590ae52 100644
--- a/drivers/irqchip/irq-renesas-h8300h.c
+++ b/drivers/irqchip/irq-renesas-h8300h.c
@@ -67,7 +67,7 @@ static int irq_map(struct irq_domain *h, unsigned int virq,
return 0;
}

-static struct irq_domain_ops irq_ops = {
+static const struct irq_domain_ops irq_ops = {
.map = irq_map,
.xlate = irq_domain_xlate_onecell,
};
--
2.13.0


2017-06-02 08:22:20

by Tobias Klauser

[permalink] [raw]
Subject: [PATCH 7/7] irqchip/irq-renesas-h8s: constify irq_domain_ops

struct irq_domain_ops is not modified, so it can be made const.

Cc: Yoshinori Sato <[email protected]>
Cc: [email protected]
Signed-off-by: Tobias Klauser <[email protected]>
---
drivers/irqchip/irq-renesas-h8s.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-renesas-h8s.c b/drivers/irqchip/irq-renesas-h8s.c
index af8c6c61c824..71d8139be26c 100644
--- a/drivers/irqchip/irq-renesas-h8s.c
+++ b/drivers/irqchip/irq-renesas-h8s.c
@@ -73,7 +73,7 @@ static __init int irq_map(struct irq_domain *h, unsigned int virq,
return 0;
}

-static struct irq_domain_ops irq_ops = {
+static const struct irq_domain_ops irq_ops = {
.map = irq_map,
.xlate = irq_domain_xlate_onecell,
};
--
2.13.0


2017-06-02 08:21:07

by Tobias Klauser

[permalink] [raw]
Subject: [PATCH 5/7] irqchip/irq-mips-gic: constify irq_domain_ops

struct irq_domain_ops is not modified, so it can be made const.

Signed-off-by: Tobias Klauser <[email protected]>
---
drivers/irqchip/irq-mips-gic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index eb7fbe159963..65642a78b8a3 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -874,7 +874,7 @@ int gic_ipi_domain_match(struct irq_domain *d, struct device_node *node,
}
}

-static struct irq_domain_ops gic_ipi_domain_ops = {
+static const struct irq_domain_ops gic_ipi_domain_ops = {
.xlate = gic_ipi_domain_xlate,
.alloc = gic_ipi_domain_alloc,
.free = gic_ipi_domain_free,
--
2.13.0


2017-06-02 08:21:06

by Tobias Klauser

[permalink] [raw]
Subject: [PATCH 1/7] irqchip/aspeed-vic: constify irq_domain_ops

struct irq_domain_ops is not modified, so it can be made const.

Cc: Joel Stanley <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
---
drivers/irqchip/irq-aspeed-vic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-aspeed-vic.c b/drivers/irqchip/irq-aspeed-vic.c
index d24451d5bf8a..88e139e4c1f9 100644
--- a/drivers/irqchip/irq-aspeed-vic.c
+++ b/drivers/irqchip/irq-aspeed-vic.c
@@ -186,7 +186,7 @@ static int avic_map(struct irq_domain *d, unsigned int irq,
return 0;
}

-static struct irq_domain_ops avic_dom_ops = {
+static const struct irq_domain_ops avic_dom_ops = {
.map = avic_map,
.xlate = irq_domain_xlate_onetwocell,
};
--
2.13.0


2017-06-02 08:23:13

by Tobias Klauser

[permalink] [raw]
Subject: [PATCH 4/7] irqchip/irq-mbigen: constify irq_domain_ops

struct irq_domain_ops is not modified, so it can be made const.

Signed-off-by: Tobias Klauser <[email protected]>
---
drivers/irqchip/irq-mbigen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
index 31d6b5a582d2..567b29c47608 100644
--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -228,7 +228,7 @@ static int mbigen_irq_domain_alloc(struct irq_domain *domain,
return 0;
}

-static struct irq_domain_ops mbigen_domain_ops = {
+static const struct irq_domain_ops mbigen_domain_ops = {
.translate = mbigen_domain_translate,
.alloc = mbigen_irq_domain_alloc,
.free = irq_domain_free_irqs_common,
--
2.13.0


2017-06-02 08:23:38

by Tobias Klauser

[permalink] [raw]
Subject: [PATCH 2/7] irqchip/i8259: constify irq_domain_ops

struct irq_domain_ops is not modified, so it can be made const.

Signed-off-by: Tobias Klauser <[email protected]>
---
drivers/irqchip/irq-i8259.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-i8259.c b/drivers/irqchip/irq-i8259.c
index 1aec12c6d9ac..7aafbb091b67 100644
--- a/drivers/irqchip/irq-i8259.c
+++ b/drivers/irqchip/irq-i8259.c
@@ -307,7 +307,7 @@ static int i8259A_irq_domain_map(struct irq_domain *d, unsigned int virq,
return 0;
}

-static struct irq_domain_ops i8259A_ops = {
+static const struct irq_domain_ops i8259A_ops = {
.map = i8259A_irq_domain_map,
.xlate = irq_domain_xlate_onecell,
};
--
2.13.0


2017-06-02 10:04:46

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH 0/7] irqchip: constify irq_domain_ops

On 02/06/17 09:20, Tobias Klauser wrote:
> Constify all remaining non-const instances of irq_domain_ops in the irqchip
> drivers. These can be made const as they are never modified.
>
> Tobias Klauser (7):
> irqchip/aspeed-vic: constify irq_domain_ops
> irqchip/i8259: constify irq_domain_ops
> irqchip/irq-imx-gpcv2: constify irq_domain_ops
> irqchip/irq-mbigen: constify irq_domain_ops
> irqchip/irq-mips-gic: constify irq_domain_ops
> irqchip/irq-renesas-h8300h: constify irq_domain_ops
> irqchip/irq-renesas-h8s: constify irq_domain_ops
>
> drivers/irqchip/irq-aspeed-vic.c | 2 +-
> drivers/irqchip/irq-i8259.c | 2 +-
> drivers/irqchip/irq-imx-gpcv2.c | 2 +-
> drivers/irqchip/irq-mbigen.c | 2 +-
> drivers/irqchip/irq-mips-gic.c | 2 +-
> drivers/irqchip/irq-renesas-h8300h.c | 2 +-
> drivers/irqchip/irq-renesas-h8s.c | 2 +-
> 7 files changed, 7 insertions(+), 7 deletions(-)

I'll take these patches, but what is the status of those?

drivers/edac/altera_edac.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_mdss.c
drivers/iommu/amd_iommu.c
drivers/iommu/intel_irq_remapping.c
drivers/mfd/fsl-imx25-tsadc.c
drivers/pinctrl/sunxi/pinctrl-sunxi.c

Thanks,

M.
--
Jazz is not dead. It just smells funny...

2017-06-02 11:25:20

by Tobias Klauser

[permalink] [raw]
Subject: Re: [PATCH 0/7] irqchip: constify irq_domain_ops

On 2017-06-02 at 12:04:42 +0200, Marc Zyngier <[email protected]> wrote:
> On 02/06/17 09:20, Tobias Klauser wrote:
> > Constify all remaining non-const instances of irq_domain_ops in the irqchip
> > drivers. These can be made const as they are never modified.
> >
> > Tobias Klauser (7):
> > irqchip/aspeed-vic: constify irq_domain_ops
> > irqchip/i8259: constify irq_domain_ops
> > irqchip/irq-imx-gpcv2: constify irq_domain_ops
> > irqchip/irq-mbigen: constify irq_domain_ops
> > irqchip/irq-mips-gic: constify irq_domain_ops
> > irqchip/irq-renesas-h8300h: constify irq_domain_ops
> > irqchip/irq-renesas-h8s: constify irq_domain_ops
> >
> > drivers/irqchip/irq-aspeed-vic.c | 2 +-
> > drivers/irqchip/irq-i8259.c | 2 +-
> > drivers/irqchip/irq-imx-gpcv2.c | 2 +-
> > drivers/irqchip/irq-mbigen.c | 2 +-
> > drivers/irqchip/irq-mips-gic.c | 2 +-
> > drivers/irqchip/irq-renesas-h8300h.c | 2 +-
> > drivers/irqchip/irq-renesas-h8s.c | 2 +-
> > 7 files changed, 7 insertions(+), 7 deletions(-)
>
> I'll take these patches, but what is the status of those?

I decided to send them per subsystem:

> drivers/edac/altera_edac.c

18caec20bfa5 ("EDAC, altera: Constify irq_domain_ops"), in linux-next

> drivers/gpu/drm/msm/mdp/mdp5/mdp5_mdss.c

c43dd227f411 ("drm/msm: constify irq_domain_ops"), in Linus' tree already

> drivers/iommu/amd_iommu.c

e2f9d45fb452 ("iommu/amd: Constify irq_domain_ops"), in linux-next

> drivers/iommu/intel_irq_remapping.c

71bb620df634 ("iommu/vt-d: Constify irq_domain_ops"), in linux-next

> drivers/mfd/fsl-imx25-tsadc.c

https://lkml.org/lkml/2017/5/24/676, applied by Lee Jones but not in
linux-next yet.

> drivers/pinctrl/sunxi/pinctrl-sunxi.c

Somehow I missed this once. Will send a follow-up patch, thanks!

Tobias

2017-06-05 06:14:15

by Joel Stanley

[permalink] [raw]
Subject: Re: [PATCH 1/7] irqchip/aspeed-vic: constify irq_domain_ops

On Fri, Jun 2, 2017 at 5:50 PM, Tobias Klauser <[email protected]> wrote:
> struct irq_domain_ops is not modified, so it can be made const.
>
> Cc: Joel Stanley <[email protected]>
> Signed-off-by: Tobias Klauser <[email protected]>

Acked-by: Joel Stanley <[email protected]>

Cheers,

Joel

> ---
> drivers/irqchip/irq-aspeed-vic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-aspeed-vic.c b/drivers/irqchip/irq-aspeed-vic.c
> index d24451d5bf8a..88e139e4c1f9 100644
> --- a/drivers/irqchip/irq-aspeed-vic.c
> +++ b/drivers/irqchip/irq-aspeed-vic.c
> @@ -186,7 +186,7 @@ static int avic_map(struct irq_domain *d, unsigned int irq,
> return 0;
> }
>
> -static struct irq_domain_ops avic_dom_ops = {
> +static const struct irq_domain_ops avic_dom_ops = {
> .map = avic_map,
> .xlate = irq_domain_xlate_onetwocell,
> };
> --
> 2.13.0
>
>