All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@st.com>
To: Mike Turquette <mturquette@linaro.org>
Cc: "arnd.bergmann@linaro.org" <arnd.bergmann@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linaro-dev@lists.linaro.org" <linaro-dev@lists.linaro.org>,
	"patches@linaro.org" <patches@linaro.org>,
	Shawn Guo <shawn.guo@linaro.org>, Olof Johansson <olof@lixom.net>,
	Russell King <linux@arm.linux.org.uk>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Richard Zhao <richard.zhao@linaro.org>,
	Saravana Kannan <skannan@codeaurora.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Andrew Lunn <andrew@lunn.ch>, Rajendra Nayak <rnayak@ti.com>
Subject: Re: [PATCH 07/13] clk: add "const" for clk_ops of basic clks
Date: Thu, 12 Apr 2012 11:49:23 +0530	[thread overview]
Message-ID: <4F8673EB.6000504@st.com> (raw)
In-Reply-To: <1334192572-12499-8-git-send-email-mturquette@linaro.org>

On 4/12/2012 6:32 AM, Mike Turquette wrote:
> From: Shawn Guo <shawn.guo@linaro.org>
> 
> The clk_ops of basic clks should have "const" to match the definition
> in "struct clk" and clk_register prototype.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Signed-off-by: Mike Turquette <mturquette@linaro.org>
> Cc: Arnd Bergman <arnd.bergmann@linaro.org>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Richard Zhao <richard.zhao@linaro.org>
> Cc: Saravana Kannan <skannan@codeaurora.org>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Rajendra Nayak <rnayak@ti.com>
> Cc: Viresh Kumar <viresh.kumar@st.com>
> ---
>  drivers/clk/clk-divider.c    |    2 +-
>  drivers/clk/clk-fixed-rate.c |    2 +-
>  drivers/clk/clk-gate.c       |    2 +-
>  drivers/clk/clk-mux.c        |    2 +-
>  include/linux/clk-private.h  |    8 ++++----
>  5 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
> index 231cd6e..b1c4b02 100644
> --- a/drivers/clk/clk-divider.c
> +++ b/drivers/clk/clk-divider.c
> @@ -146,7 +146,7 @@ static int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate)
>  	return 0;
>  }
>  
> -struct clk_ops clk_divider_ops = {
> +const struct clk_ops clk_divider_ops = {
>  	.recalc_rate = clk_divider_recalc_rate,
>  	.round_rate = clk_divider_round_rate,
>  	.set_rate = clk_divider_set_rate,
> diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
> index 651b06f..027e477 100644
> --- a/drivers/clk/clk-fixed-rate.c
> +++ b/drivers/clk/clk-fixed-rate.c
> @@ -33,7 +33,7 @@ static unsigned long clk_fixed_rate_recalc_rate(struct clk_hw *hw,
>  	return to_clk_fixed_rate(hw)->fixed_rate;
>  }
>  
> -struct clk_ops clk_fixed_rate_ops = {
> +const struct clk_ops clk_fixed_rate_ops = {
>  	.recalc_rate = clk_fixed_rate_recalc_rate,
>  };
>  EXPORT_SYMBOL_GPL(clk_fixed_rate_ops);
> diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
> index b688f47..fe2ff9e 100644
> --- a/drivers/clk/clk-gate.c
> +++ b/drivers/clk/clk-gate.c
> @@ -98,7 +98,7 @@ static int clk_gate_is_enabled(struct clk_hw *hw)
>  	return reg ? 1 : 0;
>  }
>  
> -struct clk_ops clk_gate_ops = {
> +const struct clk_ops clk_gate_ops = {
>  	.enable = clk_gate_enable,
>  	.disable = clk_gate_disable,
>  	.is_enabled = clk_gate_is_enabled,
> diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
> index 45cad61..5424488 100644
> --- a/drivers/clk/clk-mux.c
> +++ b/drivers/clk/clk-mux.c
> @@ -82,7 +82,7 @@ static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
>  	return 0;
>  }
>  
> -struct clk_ops clk_mux_ops = {
> +const struct clk_ops clk_mux_ops = {
>  	.get_parent = clk_mux_get_parent,
>  	.set_parent = clk_mux_set_parent,
>  };
> diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
> index 5e4312b..5f4ccd7 100644
> --- a/include/linux/clk-private.h
> +++ b/include/linux/clk-private.h
> @@ -55,7 +55,7 @@ struct clk {
>   * alternative macro for static initialization
>   */
>  
> -extern struct clk_ops clk_fixed_rate_ops;
> +extern const struct clk_ops clk_fixed_rate_ops;
>  
>  #define DEFINE_CLK_FIXED_RATE(_name, _flags, _rate,		\
>  				_fixed_rate_flags)		\
> @@ -78,7 +78,7 @@ extern struct clk_ops clk_fixed_rate_ops;
>  		.flags = _flags,				\
>  	};
>  
> -extern struct clk_ops clk_gate_ops;
> +extern const struct clk_ops clk_gate_ops;
>  
>  #define DEFINE_CLK_GATE(_name, _parent_name, _parent_ptr,	\
>  				_flags, _reg, _bit_idx,		\
> @@ -110,7 +110,7 @@ extern struct clk_ops clk_gate_ops;
>  		.flags = _flags,				\
>  	};
>  
> -extern struct clk_ops clk_divider_ops;
> +extern const struct clk_ops clk_divider_ops;
>  
>  #define DEFINE_CLK_DIVIDER(_name, _parent_name, _parent_ptr,	\
>  				_flags, _reg, _shift, _width,	\
> @@ -143,7 +143,7 @@ extern struct clk_ops clk_divider_ops;
>  		.flags = _flags,				\
>  	};
>  
> -extern struct clk_ops clk_mux_ops;
> +extern const struct clk_ops clk_mux_ops;
>  
>  #define DEFINE_CLK_MUX(_name, _parent_names, _parents, _flags,	\
>  				_reg, _shift, _width,		\

Reviewed-by: Viresh Kumar <viresh.kumar@st.com>

-- 
viresh

WARNING: multiple messages have this Message-ID (diff)
From: viresh.kumar@st.com (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/13] clk: add "const" for clk_ops of basic clks
Date: Thu, 12 Apr 2012 11:49:23 +0530	[thread overview]
Message-ID: <4F8673EB.6000504@st.com> (raw)
In-Reply-To: <1334192572-12499-8-git-send-email-mturquette@linaro.org>

On 4/12/2012 6:32 AM, Mike Turquette wrote:
> From: Shawn Guo <shawn.guo@linaro.org>
> 
> The clk_ops of basic clks should have "const" to match the definition
> in "struct clk" and clk_register prototype.
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Signed-off-by: Mike Turquette <mturquette@linaro.org>
> Cc: Arnd Bergman <arnd.bergmann@linaro.org>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Richard Zhao <richard.zhao@linaro.org>
> Cc: Saravana Kannan <skannan@codeaurora.org>
> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Cc: Rajendra Nayak <rnayak@ti.com>
> Cc: Viresh Kumar <viresh.kumar@st.com>
> ---
>  drivers/clk/clk-divider.c    |    2 +-
>  drivers/clk/clk-fixed-rate.c |    2 +-
>  drivers/clk/clk-gate.c       |    2 +-
>  drivers/clk/clk-mux.c        |    2 +-
>  include/linux/clk-private.h  |    8 ++++----
>  5 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
> index 231cd6e..b1c4b02 100644
> --- a/drivers/clk/clk-divider.c
> +++ b/drivers/clk/clk-divider.c
> @@ -146,7 +146,7 @@ static int clk_divider_set_rate(struct clk_hw *hw, unsigned long rate)
>  	return 0;
>  }
>  
> -struct clk_ops clk_divider_ops = {
> +const struct clk_ops clk_divider_ops = {
>  	.recalc_rate = clk_divider_recalc_rate,
>  	.round_rate = clk_divider_round_rate,
>  	.set_rate = clk_divider_set_rate,
> diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c
> index 651b06f..027e477 100644
> --- a/drivers/clk/clk-fixed-rate.c
> +++ b/drivers/clk/clk-fixed-rate.c
> @@ -33,7 +33,7 @@ static unsigned long clk_fixed_rate_recalc_rate(struct clk_hw *hw,
>  	return to_clk_fixed_rate(hw)->fixed_rate;
>  }
>  
> -struct clk_ops clk_fixed_rate_ops = {
> +const struct clk_ops clk_fixed_rate_ops = {
>  	.recalc_rate = clk_fixed_rate_recalc_rate,
>  };
>  EXPORT_SYMBOL_GPL(clk_fixed_rate_ops);
> diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
> index b688f47..fe2ff9e 100644
> --- a/drivers/clk/clk-gate.c
> +++ b/drivers/clk/clk-gate.c
> @@ -98,7 +98,7 @@ static int clk_gate_is_enabled(struct clk_hw *hw)
>  	return reg ? 1 : 0;
>  }
>  
> -struct clk_ops clk_gate_ops = {
> +const struct clk_ops clk_gate_ops = {
>  	.enable = clk_gate_enable,
>  	.disable = clk_gate_disable,
>  	.is_enabled = clk_gate_is_enabled,
> diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
> index 45cad61..5424488 100644
> --- a/drivers/clk/clk-mux.c
> +++ b/drivers/clk/clk-mux.c
> @@ -82,7 +82,7 @@ static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
>  	return 0;
>  }
>  
> -struct clk_ops clk_mux_ops = {
> +const struct clk_ops clk_mux_ops = {
>  	.get_parent = clk_mux_get_parent,
>  	.set_parent = clk_mux_set_parent,
>  };
> diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
> index 5e4312b..5f4ccd7 100644
> --- a/include/linux/clk-private.h
> +++ b/include/linux/clk-private.h
> @@ -55,7 +55,7 @@ struct clk {
>   * alternative macro for static initialization
>   */
>  
> -extern struct clk_ops clk_fixed_rate_ops;
> +extern const struct clk_ops clk_fixed_rate_ops;
>  
>  #define DEFINE_CLK_FIXED_RATE(_name, _flags, _rate,		\
>  				_fixed_rate_flags)		\
> @@ -78,7 +78,7 @@ extern struct clk_ops clk_fixed_rate_ops;
>  		.flags = _flags,				\
>  	};
>  
> -extern struct clk_ops clk_gate_ops;
> +extern const struct clk_ops clk_gate_ops;
>  
>  #define DEFINE_CLK_GATE(_name, _parent_name, _parent_ptr,	\
>  				_flags, _reg, _bit_idx,		\
> @@ -110,7 +110,7 @@ extern struct clk_ops clk_gate_ops;
>  		.flags = _flags,				\
>  	};
>  
> -extern struct clk_ops clk_divider_ops;
> +extern const struct clk_ops clk_divider_ops;
>  
>  #define DEFINE_CLK_DIVIDER(_name, _parent_name, _parent_ptr,	\
>  				_flags, _reg, _shift, _width,	\
> @@ -143,7 +143,7 @@ extern struct clk_ops clk_divider_ops;
>  		.flags = _flags,				\
>  	};
>  
> -extern struct clk_ops clk_mux_ops;
> +extern const struct clk_ops clk_mux_ops;
>  
>  #define DEFINE_CLK_MUX(_name, _parent_names, _parents, _flags,	\
>  				_reg, _shift, _width,		\

Reviewed-by: Viresh Kumar <viresh.kumar@st.com>

-- 
viresh

  reply	other threads:[~2012-04-12  6:21 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12  1:02 [PATCH 00/13] common clk framework misc fixes Mike Turquette
2012-04-12  1:02 ` Mike Turquette
2012-04-12  1:02 ` [PATCH 01/13] clk: core: correct clk_set_rate kerneldoc Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  4:28   ` Viresh Kumar
2012-04-12  4:28     ` Viresh Kumar
2012-04-13 22:23     ` Turquette, Mike
2012-04-13 22:23       ` Turquette, Mike
2012-04-12  7:24   ` Andrew Lunn
2012-04-12  7:24     ` Andrew Lunn
2012-04-12  7:38     ` Amit Kucheria
2012-04-12  7:38       ` Amit Kucheria
2012-04-12  1:02 ` [PATCH 02/13] clk: core: remove dead code paths Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  6:14   ` Viresh Kumar
2012-04-12  6:14     ` Viresh Kumar
2012-04-13 22:27     ` Turquette, Mike
2012-04-13 22:27       ` Turquette, Mike
2012-04-12  1:02 ` [PATCH 03/13] clk: core: clk_calc_new_rates handles NULL parents Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  1:02 ` [PATCH 04/13] clk: core: enforce clk_ops consistency Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  6:17   ` Viresh Kumar
2012-04-12  6:17     ` Viresh Kumar
2012-04-12  1:02 ` [PATCH 05/13] clk: use kzalloc in clk_register_mux Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  6:18   ` Viresh Kumar
2012-04-12  6:18     ` Viresh Kumar
2012-04-12  1:02 ` [PATCH 06/13] clk: remove unnecessary EXPORT_SYMBOL_GPL Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  6:18   ` Viresh Kumar
2012-04-12  6:18     ` Viresh Kumar
2012-04-12  1:02 ` [PATCH 07/13] clk: add "const" for clk_ops of basic clks Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  6:19   ` Viresh Kumar [this message]
2012-04-12  6:19     ` Viresh Kumar
2012-04-12  1:02 ` [PATCH 08/13] clk: declare clk_ops of basic clks in clk-provider.h Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  6:20   ` Viresh Kumar
2012-04-12  6:20     ` Viresh Kumar
2012-04-12  1:02 ` [PATCH 09/13] clk: Make clk_get_rate() return 0 on error Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  6:21   ` Viresh Kumar
2012-04-12  6:21     ` Viresh Kumar
2012-04-12  1:02 ` [PATCH 10/13] clk: Remove comment for end of CONFIG_COMMON_CLK section Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  1:02 ` [PATCH 11/13] clk: Constify parent name arrays Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  1:02 ` [PATCH 12/13] clk: core: copy parent_names & return error codes Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-16 20:30   ` Sascha Hauer
2012-04-16 20:30     ` Sascha Hauer
2012-04-16 21:35     ` Turquette, Mike
2012-04-16 21:35       ` Turquette, Mike
2012-04-12  1:02 ` [PATCH 13/13] clk: basic: improve parent_names & return errors Mike Turquette
2012-04-12  1:02   ` Mike Turquette
2012-04-12  6:49   ` Shawn Guo
2012-04-12  6:49     ` Shawn Guo
2012-04-16 23:10     ` Turquette, Mike
2012-04-16 23:10       ` Turquette, Mike
2012-04-17  1:46       ` Shawn Guo
2012-04-17  1:46         ` Shawn Guo
2012-04-17  3:50         ` Turquette, Mike
2012-04-17  3:50           ` Turquette, Mike
2012-04-17  7:17           ` Shawn Guo
2012-04-17  7:17             ` Shawn Guo
2012-04-20 20:01             ` Saravana Kannan
2012-04-20 20:01               ` Saravana Kannan
2012-04-26  6:00             ` Saravana Kannan
2012-04-26  6:00               ` Saravana Kannan
2012-04-16 20:52   ` Sascha Hauer
2012-04-16 20:52     ` Sascha Hauer
2012-04-16 23:11     ` Turquette, Mike
2012-04-16 23:11       ` Turquette, Mike
2012-04-12  8:56 ` [PATCH 00/13] common clk framework misc fixes Sascha Hauer
2012-04-12  8:56   ` Sascha Hauer
2012-04-12 11:14 ` Arnd Bergmann
2012-04-12 11:14   ` Arnd Bergmann
2012-04-12 13:11   ` Shawn Guo
2012-04-12 13:11     ` Shawn Guo
2012-04-12 12:50 ` [PATCH 1/3] clk: always pass parent_rate into .round_rate Shawn Guo
2012-04-12 12:50   ` [PATCH 2/3] clk: pass parent_rate into .set_rate Shawn Guo
2012-04-18  1:05     ` Turquette, Mike
2012-04-12 12:50   ` [PATCH 3/3] clk: propagate round_rate for CLK_SET_RATE_PARENT case Shawn Guo
2012-04-18  1:07     ` Turquette, Mike
2012-04-18  1:05   ` [PATCH 1/3] clk: always pass parent_rate into .round_rate Turquette, Mike
2012-05-02  9:51   ` Sascha Hauer
2012-05-06 23:41     ` Turquette, Mike
2012-04-13  9:21 ` [PATCH 00/13] common clk framework misc fixes Mark Brown
2012-04-13  9:21   ` Mark Brown
2012-04-13 22:20   ` Turquette, Mike
2012-04-13 22:20     ` Turquette, Mike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F8673EB.6000504@st.com \
    --to=viresh.kumar@st.com \
    --cc=andrew@lunn.ch \
    --cc=arnd.bergmann@linaro.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mturquette@linaro.org \
    --cc=olof@lixom.net \
    --cc=patches@linaro.org \
    --cc=richard.zhao@linaro.org \
    --cc=rnayak@ti.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    --cc=skannan@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.