linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] constify clk_ops structure
@ 2018-10-27  5:47 Julia Lawall
  2018-10-27  5:47 ` [PATCH 1/8] clk: max77686: " Julia Lawall
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: dri-devel
  Cc: kernel-janitors, linux-clk, linux-kernel, linux-arm-kernel,
	linux-samsung-soc, linux-arm-msm, freedreno

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] 19+ messages in thread

* [PATCH 1/8] clk: max77686: 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  7:49   ` Krzysztof Kozlowski
  2018-11-06 17:41   ` Stephen Boyd
  2018-10-27  5:47 ` [PATCH 2/8] ARM: vexpress/spc: " Julia Lawall
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 19+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: kernel-janitors, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Michael Turquette, Stephen Boyd, linux-kernel, linux-clk

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>

---
 drivers/clk/clk-max77686.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-max77686.c b/drivers/clk/clk-max77686.c
index 02551fe4b87c..22c937644c93 100644
--- a/drivers/clk/clk-max77686.c
+++ b/drivers/clk/clk-max77686.c
@@ -137,7 +137,7 @@ static unsigned long max77686_recalc_rate(struct clk_hw *hw,
 	return 32768;
 }
 
-static struct clk_ops max77686_clk_ops = {
+static const struct clk_ops max77686_clk_ops = {
 	.prepare	= max77686_clk_prepare,
 	.unprepare	= max77686_clk_unprepare,
 	.is_prepared	= max77686_clk_is_prepared,


^ permalink raw reply related	[flat|nested] 19+ 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 ` [PATCH 1/8] clk: max77686: " Julia Lawall
@ 2018-10-27  5:47 ` Julia Lawall
  2018-10-29  9:17   ` Liviu Dudau
  2018-10-27  5:47 ` [PATCH 3/8] clk: palmas: " Julia Lawall
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: kernel-janitors, Sudeep Holla, Lorenzo Pieralisi, Russell King,
	linux-arm-kernel, linux-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] 19+ messages in thread

* [PATCH 3/8] clk: palmas: constify clk_ops structure
  2018-10-27  5:47 [PATCH 0/8] constify clk_ops structure Julia Lawall
  2018-10-27  5:47 ` [PATCH 1/8] clk: max77686: " Julia Lawall
  2018-10-27  5:47 ` [PATCH 2/8] ARM: vexpress/spc: " Julia Lawall
@ 2018-10-27  5:47 ` Julia Lawall
  2018-11-06 17:42   ` Stephen Boyd
  2018-10-27  5:47 ` [PATCH 4/8] clk: pistachio: constify clk_ops structures Julia Lawall
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: Michael Turquette; +Cc: kernel-janitors, Stephen Boyd, linux-clk, linux-kernel

The clk_ops structure is only stored in the ops field of clk_init_data
structures.  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>

---
 drivers/clk/clk-palmas.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-palmas.c b/drivers/clk/clk-palmas.c
index e9612e7068e9..e41a3a9f7528 100644
--- a/drivers/clk/clk-palmas.c
+++ b/drivers/clk/clk-palmas.c
@@ -115,7 +115,7 @@ static int palmas_clks_is_prepared(struct clk_hw *hw)
 	return !!(val & cinfo->clk_desc->enable_mask);
 }
 
-static struct clk_ops palmas_clks_ops = {
+static const struct clk_ops palmas_clks_ops = {
 	.prepare	= palmas_clks_prepare,
 	.unprepare	= palmas_clks_unprepare,
 	.is_prepared	= palmas_clks_is_prepared,


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

* [PATCH 4/8] clk: pistachio: constify clk_ops structures
  2018-10-27  5:47 [PATCH 0/8] constify clk_ops structure Julia Lawall
                   ` (2 preceding siblings ...)
  2018-10-27  5:47 ` [PATCH 3/8] clk: palmas: " Julia Lawall
@ 2018-10-27  5:47 ` Julia Lawall
  2018-11-06 17:42   ` Stephen Boyd
  2018-10-27  5:47 ` [PATCH 5/8] clk: pxa: " Julia Lawall
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: Michael Turquette; +Cc: kernel-janitors, Stephen Boyd, linux-clk, linux-kernel

These clk_ops structures are only stored in the ops field of a
clk_init_data structure.  This field is const, so the clk_ops
structures can be const as well.

Identified and transformed using Coccinelle.

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

---
 drivers/clk/pistachio/clk-pll.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/pistachio/clk-pll.c b/drivers/clk/pistachio/clk-pll.c
index 7e8daab9025b..312c3580187f 100644
--- a/drivers/clk/pistachio/clk-pll.c
+++ b/drivers/clk/pistachio/clk-pll.c
@@ -298,7 +298,7 @@ static unsigned long pll_gf40lp_frac_recalc_rate(struct clk_hw *hw,
 	return rate;
 }
 
-static struct clk_ops pll_gf40lp_frac_ops = {
+static const struct clk_ops pll_gf40lp_frac_ops = {
 	.enable = pll_gf40lp_frac_enable,
 	.disable = pll_gf40lp_frac_disable,
 	.is_enabled = pll_gf40lp_frac_is_enabled,
@@ -307,7 +307,7 @@ static struct clk_ops pll_gf40lp_frac_ops = {
 	.set_rate = pll_gf40lp_frac_set_rate,
 };
 
-static struct clk_ops pll_gf40lp_frac_fixed_ops = {
+static const struct clk_ops pll_gf40lp_frac_fixed_ops = {
 	.enable = pll_gf40lp_frac_enable,
 	.disable = pll_gf40lp_frac_disable,
 	.is_enabled = pll_gf40lp_frac_is_enabled,
@@ -430,7 +430,7 @@ static unsigned long pll_gf40lp_laint_recalc_rate(struct clk_hw *hw,
 	return rate;
 }
 
-static struct clk_ops pll_gf40lp_laint_ops = {
+static const struct clk_ops pll_gf40lp_laint_ops = {
 	.enable = pll_gf40lp_laint_enable,
 	.disable = pll_gf40lp_laint_disable,
 	.is_enabled = pll_gf40lp_laint_is_enabled,
@@ -439,7 +439,7 @@ static struct clk_ops pll_gf40lp_laint_ops = {
 	.set_rate = pll_gf40lp_laint_set_rate,
 };
 
-static struct clk_ops pll_gf40lp_laint_fixed_ops = {
+static const struct clk_ops pll_gf40lp_laint_fixed_ops = {
 	.enable = pll_gf40lp_laint_enable,
 	.disable = pll_gf40lp_laint_disable,
 	.is_enabled = pll_gf40lp_laint_is_enabled,


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

* [PATCH 5/8] clk: pxa: constify clk_ops structures
  2018-10-27  5:47 [PATCH 0/8] constify clk_ops structure Julia Lawall
                   ` (3 preceding siblings ...)
  2018-10-27  5:47 ` [PATCH 4/8] clk: pistachio: constify clk_ops structures Julia Lawall
@ 2018-10-27  5:47 ` Julia Lawall
  2018-11-06 17:42   ` Stephen Boyd
  2018-10-27  5:47 ` [PATCH 6/8] clk: s2mps11: constify clk_ops structure Julia Lawall
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: Michael Turquette; +Cc: kernel-janitors, Stephen Boyd, linux-clk, linux-kernel

These clk_ops structures are only passed to a call to
clk_register_composite where the corresponding parameters
are 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>

---
 drivers/clk/pxa/clk-pxa.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/pxa/clk-pxa.c b/drivers/clk/pxa/clk-pxa.c
index b80dc9d5855c..42627bf8a09e 100644
--- a/drivers/clk/pxa/clk-pxa.c
+++ b/drivers/clk/pxa/clk-pxa.c
@@ -70,7 +70,7 @@ static unsigned long cken_recalc_rate(struct clk_hw *hw,
 	return clk_fixed_factor_ops.recalc_rate(&fix->hw, parent_rate);
 }
 
-static struct clk_ops cken_rate_ops = {
+static const struct clk_ops cken_rate_ops = {
 	.recalc_rate = cken_recalc_rate,
 };
 
@@ -83,7 +83,7 @@ static u8 cken_get_parent(struct clk_hw *hw)
 	return pclk->is_in_low_power() ? 0 : 1;
 }
 
-static struct clk_ops cken_mux_ops = {
+static const struct clk_ops cken_mux_ops = {
 	.get_parent = cken_get_parent,
 	.set_parent = dummy_clk_set_parent,
 };


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

* [PATCH 6/8] clk: s2mps11: constify clk_ops structure
  2018-10-27  5:47 [PATCH 0/8] constify clk_ops structure Julia Lawall
                   ` (4 preceding siblings ...)
  2018-10-27  5:47 ` [PATCH 5/8] clk: pxa: " Julia Lawall
@ 2018-10-27  5:47 ` Julia Lawall
  2018-10-29  0:43   ` Chanwoo Choi
  2018-11-06 17:43   ` Stephen Boyd
  2018-10-27  5:47 ` [PATCH 7/8] drm/imx: imx-tve: " Julia Lawall
  2018-10-27  5:47 ` [PATCH 8/8] drm/msm/hdmi: " Julia Lawall
  7 siblings, 2 replies; 19+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: Sangbeom Kim
  Cc: kernel-janitors, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Michael Turquette, Stephen Boyd, linux-kernel, linux-samsung-soc,
	linux-clk

The clk_ops structure is only stored in the ops fields of
clk_init_data structures.  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>

---
 drivers/clk/clk-s2mps11.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
index 5b419b82f7ca..2ce370c804aa 100644
--- a/drivers/clk/clk-s2mps11.c
+++ b/drivers/clk/clk-s2mps11.c
@@ -71,7 +71,7 @@ static unsigned long s2mps11_clk_recalc_rate(struct clk_hw *hw,
 	return 32768;
 }
 
-static struct clk_ops s2mps11_clk_ops = {
+static const struct clk_ops s2mps11_clk_ops = {
 	.prepare	= s2mps11_clk_prepare,
 	.unprepare	= s2mps11_clk_unprepare,
 	.is_prepared	= s2mps11_clk_is_prepared,


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

* [PATCH 7/8] drm/imx: imx-tve: constify clk_ops structure
  2018-10-27  5:47 [PATCH 0/8] constify clk_ops structure Julia Lawall
                   ` (5 preceding siblings ...)
  2018-10-27  5:47 ` [PATCH 6/8] clk: s2mps11: constify clk_ops structure Julia Lawall
@ 2018-10-27  5:47 ` Julia Lawall
  2018-10-30  8:57   ` Philipp Zabel
  2018-10-27  5:47 ` [PATCH 8/8] drm/msm/hdmi: " Julia Lawall
  7 siblings, 1 reply; 19+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: kernel-janitors, David Airlie, dri-devel, linux-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>

---
 drivers/gpu/drm/imx/imx-tve.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c
index 4bc3ead5c4e3..293dd5752583 100644
--- a/drivers/gpu/drm/imx/imx-tve.c
+++ b/drivers/gpu/drm/imx/imx-tve.c
@@ -434,7 +434,7 @@ static int clk_tve_di_set_rate(struct clk_hw *hw, unsigned long rate,
 	return 0;
 }
 
-static struct clk_ops clk_tve_di_ops = {
+static const struct clk_ops clk_tve_di_ops = {
 	.round_rate = clk_tve_di_round_rate,
 	.set_rate = clk_tve_di_set_rate,
 	.recalc_rate = clk_tve_di_recalc_rate,


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

* [PATCH 8/8] drm/msm/hdmi: constify clk_ops structure
  2018-10-27  5:47 [PATCH 0/8] constify clk_ops structure Julia Lawall
                   ` (6 preceding siblings ...)
  2018-10-27  5:47 ` [PATCH 7/8] drm/imx: imx-tve: " Julia Lawall
@ 2018-10-27  5:47 ` Julia Lawall
  7 siblings, 0 replies; 19+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: Rob Clark
  Cc: kernel-janitors, David Airlie, linux-arm-msm, dri-devel,
	freedreno, linux-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>

---
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
index 0df504c61833..b19a520c47d5 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
@@ -689,7 +689,7 @@ static int hdmi_8996_pll_is_enabled(struct clk_hw *hw)
 	return pll_locked;
 }
 
-static struct clk_ops hdmi_8996_pll_ops = {
+static const struct clk_ops hdmi_8996_pll_ops = {
 	.set_rate = hdmi_8996_pll_set_clk_rate,
 	.round_rate = hdmi_8996_pll_round_rate,
 	.recalc_rate = hdmi_8996_pll_recalc_rate,


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

* Re: [PATCH 6/8] clk: s2mps11: constify clk_ops structure
  2018-10-27  5:47 ` [PATCH 6/8] clk: s2mps11: constify clk_ops structure Julia Lawall
@ 2018-10-29  0:43   ` Chanwoo Choi
  2018-11-06 17:43   ` Stephen Boyd
  1 sibling, 0 replies; 19+ messages in thread
From: Chanwoo Choi @ 2018-10-29  0:43 UTC (permalink / raw)
  To: Julia Lawall, Sangbeom Kim
  Cc: kernel-janitors, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Michael Turquette, Stephen Boyd, linux-kernel, linux-samsung-soc,
	linux-clk

On 2018년 10월 27일 14:47, Julia Lawall wrote:
> The clk_ops structure is only stored in the ops fields of
> clk_init_data structures.  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>
> 
> ---
>  drivers/clk/clk-s2mps11.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
> index 5b419b82f7ca..2ce370c804aa 100644
> --- a/drivers/clk/clk-s2mps11.c
> +++ b/drivers/clk/clk-s2mps11.c
> @@ -71,7 +71,7 @@ static unsigned long s2mps11_clk_recalc_rate(struct clk_hw *hw,
>  	return 32768;
>  }
>  
> -static struct clk_ops s2mps11_clk_ops = {
> +static const struct clk_ops s2mps11_clk_ops = {
>  	.prepare	= s2mps11_clk_prepare,
>  	.unprepare	= s2mps11_clk_unprepare,
>  	.is_prepared	= s2mps11_clk_is_prepared,
> 
> 
> 

Looks good to me.
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

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

* Re: [PATCH 1/8] clk: max77686: constify clk_ops structure
  2018-10-27  5:47 ` [PATCH 1/8] clk: max77686: " Julia Lawall
@ 2018-10-29  7:49   ` Krzysztof Kozlowski
  2018-11-06 17:41   ` Stephen Boyd
  1 sibling, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2018-10-29  7:49 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: Chanwoo Choi, kernel-janitors,
	Bartłomiej Żołnierkiewicz, mturquette, sboyd,
	linux-kernel, linux-clk

On Sat, 27 Oct 2018 at 08:23, Julia Lawall <Julia.Lawall@lip6.fr> 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>
>
> ---
>  drivers/clk/clk-max77686.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

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

* Re: [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; 19+ messages in thread
From: Liviu Dudau @ 2018-10-29  9:17 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors, Sudeep Holla, Lorenzo Pieralisi, Russell King,
	linux-arm-kernel, linux-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] 19+ messages in thread

* Re: [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; 19+ messages in thread
From: Julia Lawall @ 2018-10-29  9:34 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: kernel-janitors, Sudeep Holla, Lorenzo Pieralisi, Russell King,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]



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] 19+ messages in thread

* Re: [PATCH 7/8] drm/imx: imx-tve: constify clk_ops structure
  2018-10-27  5:47 ` [PATCH 7/8] drm/imx: imx-tve: " Julia Lawall
@ 2018-10-30  8:57   ` Philipp Zabel
  0 siblings, 0 replies; 19+ messages in thread
From: Philipp Zabel @ 2018-10-30  8:57 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, David Airlie, dri-devel, linux-kernel

Hi Julia,

On Sat, 2018-10-27 at 07:47 +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>

Thank you, applied to imx-drm/next.

regards
Philipp

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

* Re: [PATCH 1/8] clk: max77686: constify clk_ops structure
  2018-10-27  5:47 ` [PATCH 1/8] clk: max77686: " Julia Lawall
  2018-10-29  7:49   ` Krzysztof Kozlowski
@ 2018-11-06 17:41   ` Stephen Boyd
  1 sibling, 0 replies; 19+ messages in thread
From: Stephen Boyd @ 2018-11-06 17:41 UTC (permalink / raw)
  To: Chanwoo Choi, Julia Lawall
  Cc: kernel-janitors, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Michael Turquette, linux-kernel, linux-clk

Quoting Julia Lawall (2018-10-26 22:47:35)
> 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>
> 
> ---

Applied to clk-next


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

* Re: [PATCH 3/8] clk: palmas: constify clk_ops structure
  2018-10-27  5:47 ` [PATCH 3/8] clk: palmas: " Julia Lawall
@ 2018-11-06 17:42   ` Stephen Boyd
  0 siblings, 0 replies; 19+ messages in thread
From: Stephen Boyd @ 2018-11-06 17:42 UTC (permalink / raw)
  To: Julia Lawall, Michael Turquette; +Cc: kernel-janitors, linux-clk, linux-kernel

Quoting Julia Lawall (2018-10-26 22:47:37)
> The clk_ops structure is only stored in the ops field of clk_init_data
> structures.  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>
> 
> ---

Applied to clk-next


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

* Re: [PATCH 4/8] clk: pistachio: constify clk_ops structures
  2018-10-27  5:47 ` [PATCH 4/8] clk: pistachio: constify clk_ops structures Julia Lawall
@ 2018-11-06 17:42   ` Stephen Boyd
  0 siblings, 0 replies; 19+ messages in thread
From: Stephen Boyd @ 2018-11-06 17:42 UTC (permalink / raw)
  To: Julia Lawall, Michael Turquette; +Cc: kernel-janitors, linux-clk, linux-kernel

Quoting Julia Lawall (2018-10-26 22:47:38)
> These clk_ops structures are only stored in the ops field of a
> clk_init_data structure.  This field is const, so the clk_ops
> structures can be const as well.
> 
> Identified and transformed using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---

Applied to clk-next


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

* Re: [PATCH 5/8] clk: pxa: constify clk_ops structures
  2018-10-27  5:47 ` [PATCH 5/8] clk: pxa: " Julia Lawall
@ 2018-11-06 17:42   ` Stephen Boyd
  0 siblings, 0 replies; 19+ messages in thread
From: Stephen Boyd @ 2018-11-06 17:42 UTC (permalink / raw)
  To: Julia Lawall, Michael Turquette; +Cc: kernel-janitors, linux-clk, linux-kernel

Quoting Julia Lawall (2018-10-26 22:47:39)
> These clk_ops structures are only passed to a call to
> clk_register_composite where the corresponding parameters
> are 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>
> 
> ---

Applied to clk-next


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

* Re: [PATCH 6/8] clk: s2mps11: constify clk_ops structure
  2018-10-27  5:47 ` [PATCH 6/8] clk: s2mps11: constify clk_ops structure Julia Lawall
  2018-10-29  0:43   ` Chanwoo Choi
@ 2018-11-06 17:43   ` Stephen Boyd
  1 sibling, 0 replies; 19+ messages in thread
From: Stephen Boyd @ 2018-11-06 17:43 UTC (permalink / raw)
  To: Julia Lawall, Sangbeom Kim
  Cc: kernel-janitors, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Michael Turquette, linux-kernel, linux-samsung-soc, linux-clk

Quoting Julia Lawall (2018-10-26 22:47:40)
> The clk_ops structure is only stored in the ops fields of
> clk_init_data structures.  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>
> 
> ---

Applied to clk-next


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

end of thread, other threads:[~2018-11-06 17:43 UTC | newest]

Thread overview: 19+ 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 1/8] clk: max77686: " Julia Lawall
2018-10-29  7:49   ` Krzysztof Kozlowski
2018-11-06 17:41   ` Stephen Boyd
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
2018-10-27  5:47 ` [PATCH 3/8] clk: palmas: " Julia Lawall
2018-11-06 17:42   ` Stephen Boyd
2018-10-27  5:47 ` [PATCH 4/8] clk: pistachio: constify clk_ops structures Julia Lawall
2018-11-06 17:42   ` Stephen Boyd
2018-10-27  5:47 ` [PATCH 5/8] clk: pxa: " Julia Lawall
2018-11-06 17:42   ` Stephen Boyd
2018-10-27  5:47 ` [PATCH 6/8] clk: s2mps11: constify clk_ops structure Julia Lawall
2018-10-29  0:43   ` Chanwoo Choi
2018-11-06 17:43   ` Stephen Boyd
2018-10-27  5:47 ` [PATCH 7/8] drm/imx: imx-tve: " Julia Lawall
2018-10-30  8:57   ` Philipp Zabel
2018-10-27  5:47 ` [PATCH 8/8] drm/msm/hdmi: " Julia Lawall

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