From: mturquette@ti.com (Turquette, Mike)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: Constify struct clk_init_data
Date: Mon, 14 May 2012 14:53:04 -0700 [thread overview]
Message-ID: <20120514215304.GB3075@gmail.com> (raw)
In-Reply-To: <1337004763-21250-1-git-send-email-broonie@opensource.wolfsonmicro.com>
On Mon, May 14, 2012 at 7:12 AM, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> Allow drivers to declare their clk_init_data const, the framework really
> shouldn't be modifying the data.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+interested parties
Mark, I like this change but it's reminded me of a few things I meant to
bring up on the list in the past. Certainly some folks will mark their
struct clk_hw_init data as __initconst. Currently none of the
documentation mentions that fact and I'm a bit worried about clk code
which assumes that hw->init will always be around and freely accesses
it.
I think that, as a rule, hw->init cannot be assumed to be valid after
clk_register returns. Would anyone else like to weigh in on it? If so
then I'll cook up a follow-up patch to reflect this in the kerneldoc.
Thanks,
Mike
> ---
> ?include/linux/clk-provider.h | ? ?2 +-
> ?1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index c1c23b9..fc43ea6 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -143,7 +143,7 @@ struct clk_init_data {
> ?*/
> ?struct clk_hw {
> ? ? ? ?struct clk *clk;
> - ? ? ? struct clk_init_data *init;
> + ? ? ? const struct clk_init_data *init;
> ?};
>
> ?/*
> --
> 1.7.10
>
WARNING: multiple messages have this Message-ID (diff)
From: "Turquette, Mike" <mturquette@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Saravana Kannan <skannan@codeaurora.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
andrew@lunn.ch, rnayak@ti.com
Subject: Re: [PATCH] clk: Constify struct clk_init_data
Date: Mon, 14 May 2012 14:53:04 -0700 [thread overview]
Message-ID: <20120514215304.GB3075@gmail.com> (raw)
In-Reply-To: <1337004763-21250-1-git-send-email-broonie@opensource.wolfsonmicro.com>
On Mon, May 14, 2012 at 7:12 AM, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> Allow drivers to declare their clk_init_data const, the framework really
> shouldn't be modifying the data.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+interested parties
Mark, I like this change but it's reminded me of a few things I meant to
bring up on the list in the past. Certainly some folks will mark their
struct clk_hw_init data as __initconst. Currently none of the
documentation mentions that fact and I'm a bit worried about clk code
which assumes that hw->init will always be around and freely accesses
it.
I think that, as a rule, hw->init cannot be assumed to be valid after
clk_register returns. Would anyone else like to weigh in on it? If so
then I'll cook up a follow-up patch to reflect this in the kerneldoc.
Thanks,
Mike
> ---
> include/linux/clk-provider.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index c1c23b9..fc43ea6 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -143,7 +143,7 @@ struct clk_init_data {
> */
> struct clk_hw {
> struct clk *clk;
> - struct clk_init_data *init;
> + const struct clk_init_data *init;
> };
>
> /*
> --
> 1.7.10
>
next prev parent reply other threads:[~2012-05-14 21:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 14:12 [PATCH] clk: Constify struct clk_init_data Mark Brown
2012-05-14 14:12 ` Mark Brown
2012-05-14 21:53 ` Turquette, Mike [this message]
2012-05-14 21:53 ` Turquette, Mike
2012-05-15 1:08 ` Saravana Kannan
2012-05-15 1:08 ` Saravana Kannan
2012-05-15 5:13 ` Rajendra Nayak
2012-05-15 5:13 ` Rajendra Nayak
2012-05-15 5:59 ` Turquette, Mike
2012-05-15 5:59 ` Turquette, Mike
2012-05-15 1:19 ` Saravana Kannan
2012-05-15 1:19 ` Saravana Kannan
2012-05-15 7:00 ` Sascha Hauer
2012-05-15 7:00 ` Sascha Hauer
2012-05-15 16:42 ` Saravana Kannan
2012-05-15 16:42 ` Saravana Kannan
2012-05-15 18:15 ` Saravana Kannan
2012-05-15 18:15 ` Saravana Kannan
2012-06-12 17:10 ` Mike Turquette
2012-06-12 17:10 ` Mike Turquette
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=20120514215304.GB3075@gmail.com \
--to=mturquette@ti.com \
--cc=linux-arm-kernel@lists.infradead.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.