From: Stephen Boyd <sboyd@codeaurora.org>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Ralf Baechle <ralf@linux-mips.org>,
Max Filippov <jcmvbkbc@gmail.com>,
Mike Turquette <mturquette@linaro.org>,
Heiko Stuebner <heiko@sntech.de>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Tomasz Figa <tomasz.figa@gmail.com>,
Kukjin Kim <kgene@kernel.org>, Barry Song <baohua@kernel.org>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
Prashant Gaikwad <pgaikwad@nvidia.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Thierry Reding <thierry.reding@gmail.com>,
Alexandre Courbot <gnurou@gmail.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
Sascha Hauer <s.hauer@pengutronix.de>
Subject: Re: [PATCH 3/8] clk: Constify pointers to parent names in init data
Date: Wed, 08 Apr 2015 16:36:31 -0700 [thread overview]
Message-ID: <5525BB7F.7070609@codeaurora.org> (raw)
In-Reply-To: <1428499339-29569-4-git-send-email-k.kozlowski@samsung.com>
On 04/08/15 06:22, Krzysztof Kozlowski wrote:
> The 'parent_names' member of 'clk_init_data' is not modified so it can
> be made as an array of const pointers to constant strings.
>
> Some drivers (e.g. arch/mips/alchemy/common/clock.c) already pass such
> data.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
Sascha sent a similar patch a few days ago.
http://lkml.kernel.org/r/1427825817-26773-2-git-send-email-s.hauer@pengutronix.de
> drivers/clk/clk-composite.c | 2 +-
> drivers/clk/clk-mux.c | 8 ++++----
> include/linux/clk-provider.h | 12 ++++++------
> 3 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
> index 956b7e54fa1c..077f4c7148f1 100644
> --- a/drivers/clk/clk-composite.c
> +++ b/drivers/clk/clk-composite.c
> @@ -188,7 +188,7 @@ static void clk_composite_disable(struct clk_hw *hw)
> }
>
> struct clk *clk_register_composite(struct device *dev, const char *name,
> - const char **parent_names, int num_parents,
> + const char * const *parent_names, int num_parents,
> struct clk_hw *mux_hw, const struct clk_ops *mux_ops,
> struct clk_hw *rate_hw, const struct clk_ops *rate_ops,
> struct clk_hw *gate_hw, const struct clk_ops *gate_ops,
> diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
> index 69a094c3783d..962e2a056381 100644
> --- a/drivers/clk/clk-mux.c
> +++ b/drivers/clk/clk-mux.c
> @@ -114,8 +114,8 @@ const struct clk_ops clk_mux_ro_ops = {
> EXPORT_SYMBOL_GPL(clk_mux_ro_ops);
>
> struct clk *clk_register_mux_table(struct device *dev, const char *name,
> - const char **parent_names, u8 num_parents, unsigned long flags,
> - void __iomem *reg, u8 shift, u32 mask,
> + const char * const *parent_names, u8 num_parents,
> + unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
> u8 clk_mux_flags, u32 *table, spinlock_t *lock)
> {
> struct clk_mux *mux;
> @@ -166,8 +166,8 @@ struct clk *clk_register_mux_table(struct device *dev, const char *name,
> EXPORT_SYMBOL_GPL(clk_register_mux_table);
>
> struct clk *clk_register_mux(struct device *dev, const char *name,
> - const char **parent_names, u8 num_parents, unsigned long flags,
> - void __iomem *reg, u8 shift, u8 width,
> + const char * const *parent_names, u8 num_parents,
> + unsigned long flags, void __iomem *reg, u8 shift, u8 width,
> u8 clk_mux_flags, spinlock_t *lock)
> {
> u32 mask = BIT(width) - 1;
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index 28abf1badb40..0bf0308963da 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -209,7 +209,7 @@ struct clk_ops {
> struct clk_init_data {
> const char *name;
> const struct clk_ops *ops;
> - const char **parent_names;
> + const char * const *parent_names;
> u8 num_parents;
> unsigned long flags;
> };
> @@ -426,13 +426,13 @@ extern const struct clk_ops clk_mux_ops;
> extern const struct clk_ops clk_mux_ro_ops;
>
> struct clk *clk_register_mux(struct device *dev, const char *name,
> - const char **parent_names, u8 num_parents, unsigned long flags,
> - void __iomem *reg, u8 shift, u8 width,
> + const char * const *parent_names, u8 num_parents,
> + unsigned long flags, void __iomem *reg, u8 shift, u8 width,
> u8 clk_mux_flags, spinlock_t *lock);
>
> struct clk *clk_register_mux_table(struct device *dev, const char *name,
> - const char **parent_names, u8 num_parents, unsigned long flags,
> - void __iomem *reg, u8 shift, u32 mask,
> + const char * const *parent_names, u8 num_parents,
> + unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
> u8 clk_mux_flags, u32 *table, spinlock_t *lock);
>
> void clk_unregister_mux(struct clk *clk);
> @@ -518,7 +518,7 @@ struct clk_composite {
> };
>
> struct clk *clk_register_composite(struct device *dev, const char *name,
> - const char **parent_names, int num_parents,
> + const char * const *parent_names, int num_parents,
> struct clk_hw *mux_hw, const struct clk_ops *mux_ops,
> struct clk_hw *rate_hw, const struct clk_ops *rate_ops,
> struct clk_hw *gate_hw, const struct clk_ops *gate_ops,
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-04-08 23:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 13:22 [PATCH 0/8] clk: Minor cleanups Krzysztof Kozlowski
2015-04-08 13:22 ` [PATCH 1/8] clk: rockchip: Staticize file-scope declarations Krzysztof Kozlowski
2015-04-08 13:22 ` [PATCH 2/8] clk: exynos: " Krzysztof Kozlowski
2015-04-08 13:22 ` [PATCH 3/8] clk: Constify pointers to parent names in init data Krzysztof Kozlowski
2015-04-08 23:36 ` Stephen Boyd [this message]
2015-04-09 7:23 ` Krzysztof Kozlowski
2015-04-08 13:22 ` [PATCH 4/8] clk: tegra: Fix duplicate const for parent names Krzysztof Kozlowski
2015-04-09 10:00 ` Thierry Reding
2015-04-09 10:07 ` Krzysztof Kozlowski
2015-04-09 10:19 ` Thierry Reding
2015-04-09 10:33 ` Krzysztof Kozlowski
2015-04-09 15:28 ` Stephen Boyd
2015-04-08 13:22 ` [PATCH 5/8] clk: cdce706: Constify parent names in clock init data Krzysztof Kozlowski
2015-04-08 13:22 ` [PATCH 6/8] clk: sirf: " Krzysztof Kozlowski
2015-04-08 13:22 ` [PATCH 7/8] clk: ls1x: Fix duplicate const for parent names Krzysztof Kozlowski
2015-04-08 13:22 ` [PATCH 8/8] MIPS: Alchemy: Remove unneeded cast removing const Krzysztof Kozlowski
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=5525BB7F.7070609@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=baohua@kernel.org \
--cc=gnurou@gmail.com \
--cc=heiko@sntech.de \
--cc=jcmvbkbc@gmail.com \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=pdeschrijver@nvidia.com \
--cc=pgaikwad@nvidia.com \
--cc=ralf@linux-mips.org \
--cc=s.hauer@pengutronix.de \
--cc=s.nawrocki@samsung.com \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
--cc=tomasz.figa@gmail.com \
/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 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).