dri-devel.lists.freedesktop.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 7/8] drm/imx: imx-tve: " Julia Lawall
  2018-10-27  5:47 ` [PATCH 8/8] drm/msm/hdmi: " Julia Lawall
  0 siblings, 2 replies; 4+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-samsung-soc, linux-arm-msm, kernel-janitors, linux-kernel,
	freedreno, linux-clk, 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(-)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ 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
@ 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
  1 sibling, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2018-10-27  5:47 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: David Airlie, kernel-janitors, linux-kernel, dri-devel

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,

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ 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
  2018-10-27  5:47 ` [PATCH 7/8] drm/imx: imx-tve: " Julia Lawall
@ 2018-10-27  5:47 ` Julia Lawall
  1 sibling, 0 replies; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread

end of thread, other threads:[~2018-10-30  8:57 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 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).