* [PATCH 0/8] constify clk_ops structure
@ 2018-10-27 5:47 Julia Lawall
2018-10-27 5:47 ` [PATCH 2/8] ARM: vexpress/spc: " Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2018-10-27 5:47 UTC (permalink / raw)
To: linux-arm-kernel
Declare as const clk_ops structures that are only stored in const fields or
passed to functions with const parameters.
Identified and transformed using Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
arch/arm/mach-vexpress/spc.c | 2 +-
drivers/clk/clk-max77686.c | 2 +-
drivers/clk/clk-palmas.c | 2 +-
drivers/clk/clk-s2mps11.c | 2 +-
drivers/clk/pistachio/clk-pll.c | 8 ++++----
drivers/clk/pxa/clk-pxa.c | 4 ++--
drivers/gpu/drm/imx/imx-tve.c | 2 +-
drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 2 +-
8 files changed, 12 insertions(+), 12 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/8] ARM: vexpress/spc: constify clk_ops structure
2018-10-27 5:47 [PATCH 0/8] constify clk_ops structure Julia Lawall
@ 2018-10-27 5:47 ` Julia Lawall
2018-10-29 9:17 ` Liviu Dudau
0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2018-10-27 5:47 UTC (permalink / raw)
To: linux-arm-kernel
The clk_ops structure is only stored in the ops field of a
clk_init_data structure. This field is const, so the clk_ops
structure can be const as well.
Identified and transformed using Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
arch/arm/mach-vexpress/spc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c
index 0f5381d13494..611f22de48cb 100644
--- a/arch/arm/mach-vexpress/spc.c
+++ b/arch/arm/mach-vexpress/spc.c
@@ -521,7 +521,7 @@ static int spc_set_rate(struct clk_hw *hw, unsigned long rate,
return ve_spc_set_performance(spc->cluster, rate / 1000);
}
-static struct clk_ops clk_spc_ops = {
+static const struct clk_ops clk_spc_ops = {
.recalc_rate = spc_recalc_rate,
.round_rate = spc_round_rate,
.set_rate = spc_set_rate,
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/8] ARM: vexpress/spc: constify clk_ops structure
2018-10-27 5:47 ` [PATCH 2/8] ARM: vexpress/spc: " Julia Lawall
@ 2018-10-29 9:17 ` Liviu Dudau
2018-10-29 9:34 ` Julia Lawall
0 siblings, 1 reply; 4+ messages in thread
From: Liviu Dudau @ 2018-10-29 9:17 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Oct 27, 2018 at 07:47:36AM +0200, Julia Lawall wrote:
> The clk_ops structure is only stored in the ops field of a
> clk_init_data structure. This field is const, so the clk_ops
> structure can be const as well.
>
> Identified and transformed using Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Are you going to send the series to the arm-soc maintainers directly or
you want us to cherry-pick this patch into the Versatile tree?
Best regards,
Liviu
>
> ---
> arch/arm/mach-vexpress/spc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c
> index 0f5381d13494..611f22de48cb 100644
> --- a/arch/arm/mach-vexpress/spc.c
> +++ b/arch/arm/mach-vexpress/spc.c
> @@ -521,7 +521,7 @@ static int spc_set_rate(struct clk_hw *hw, unsigned long rate,
> return ve_spc_set_performance(spc->cluster, rate / 1000);
> }
>
> -static struct clk_ops clk_spc_ops = {
> +static const struct clk_ops clk_spc_ops = {
> .recalc_rate = spc_recalc_rate,
> .round_rate = spc_round_rate,
> .set_rate = spc_set_rate,
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
?\_(?)_/?
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/8] ARM: vexpress/spc: constify clk_ops structure
2018-10-29 9:17 ` Liviu Dudau
@ 2018-10-29 9:34 ` Julia Lawall
0 siblings, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2018-10-29 9:34 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, 29 Oct 2018, Liviu Dudau wrote:
> On Sat, Oct 27, 2018 at 07:47:36AM +0200, Julia Lawall wrote:
> > The clk_ops structure is only stored in the ops field of a
> > clk_init_data structure. This field is const, so the clk_ops
> > structure can be const as well.
> >
> > Identified and transformed using Coccinelle.
> >
> > Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Acked-by: Liviu Dudau <liviu.dudau@arm.com>
>
> Are you going to send the series to the arm-soc maintainers directly or
> you want us to cherry-pick this patch into the Versatile tree?
Please do with it whatever seems best.
Thanks,
julia
>
> Best regards,
> Liviu
>
> >
> > ---
> > arch/arm/mach-vexpress/spc.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/mach-vexpress/spc.c b/arch/arm/mach-vexpress/spc.c
> > index 0f5381d13494..611f22de48cb 100644
> > --- a/arch/arm/mach-vexpress/spc.c
> > +++ b/arch/arm/mach-vexpress/spc.c
> > @@ -521,7 +521,7 @@ static int spc_set_rate(struct clk_hw *hw, unsigned long rate,
> > return ve_spc_set_performance(spc->cluster, rate / 1000);
> > }
> >
> > -static struct clk_ops clk_spc_ops = {
> > +static const struct clk_ops clk_spc_ops = {
> > .recalc_rate = spc_recalc_rate,
> > .round_rate = spc_round_rate,
> > .set_rate = spc_set_rate,
> >
>
> --
> ====================
> | I would like to |
> | fix the world, |
> | but they're not |
> | giving me the |
> \ source code! /
> ---------------
> ?\_(?)_/?
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-29 9:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-27 5:47 [PATCH 0/8] constify clk_ops structure Julia Lawall
2018-10-27 5:47 ` [PATCH 2/8] ARM: vexpress/spc: " Julia Lawall
2018-10-29 9:17 ` Liviu Dudau
2018-10-29 9:34 ` Julia Lawall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox