From: Alexandre Belloni <alexandre.belloni@bootlin.com> To: Stephen Boyd <sboyd@kernel.org> Cc: Michael Turquette <mturquette@baylibre.com>, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-rtc@vger.kernel.org, Alessandro Zummo <a.zummo@towertech.it>, Maxime Ripard <maxime.ripard@bootlin.com>, Chen-Yu Tsai <wens@csie.org> Subject: Re: [PATCH 3/4] rtc: sun6i: Don't reference clk_init_data after registration Date: Fri, 16 Aug 2019 16:50:22 +0200 Message-ID: <20190816145022.GD3545@piout.net> (raw) In-Reply-To: <20190815160020.183334-4-sboyd@kernel.org> On 15/08/2019 09:00:19-0700, Stephen Boyd wrote: > A future patch is going to change semantics of clk_register() so that > clk_hw::init is guaranteed to be NULL after a clk is registered. Avoid > referencing this member here so that we don't run into NULL pointer > exceptions. > > Cc: Alessandro Zummo <a.zummo@towertech.it> > Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> > Cc: Maxime Ripard <maxime.ripard@bootlin.com> > Cc: Chen-Yu Tsai <wens@csie.org> > Signed-off-by: Stephen Boyd <sboyd@kernel.org> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> > --- > > Please ack so I can take this through clk tree. > > drivers/rtc/rtc-sun6i.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c > index c0e75c373605..d50ee023b559 100644 > --- a/drivers/rtc/rtc-sun6i.c > +++ b/drivers/rtc/rtc-sun6i.c > @@ -279,7 +279,7 @@ static void __init sun6i_rtc_clk_init(struct device_node *node, > > of_property_read_string_index(node, "clock-output-names", 1, > &clkout_name); > - rtc->ext_losc = clk_register_gate(NULL, clkout_name, rtc->hw.init->name, > + rtc->ext_losc = clk_register_gate(NULL, clkout_name, init.name, > 0, rtc->base + SUN6I_LOSC_OUT_GATING, > SUN6I_LOSC_OUT_GATING_EN_OFFSET, 0, > &rtc->lock); > -- > Sent by a computer through tubes > -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
next prev parent reply index Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-08-15 16:00 [PATCH 0/4] Followup to "Make clk_hw::init NULL after clk registration" Stephen Boyd 2019-08-15 16:00 ` [PATCH 1/4] clk: milbeaut: Don't reference clk_init_data after registration Stephen Boyd 2019-08-16 17:20 ` Stephen Boyd 2019-08-15 16:00 ` [PATCH 2/4] clk: zx296718: " Stephen Boyd 2019-08-16 17:20 ` Stephen Boyd 2019-08-15 16:00 ` [PATCH 3/4] rtc: sun6i: " Stephen Boyd 2019-08-15 16:11 ` Chen-Yu Tsai 2019-08-15 21:59 ` Stephen Boyd 2019-08-16 14:50 ` Alexandre Belloni [this message] 2019-08-16 17:20 ` Stephen Boyd 2019-08-15 16:00 ` [PATCH 4/4] clk: qcom: Remove error prints from DFS registration Stephen Boyd 2019-08-16 2:48 ` Taniya Das 2019-08-16 17:20 ` Stephen Boyd 2019-08-19 7:02 ` [PATCH 0/4] Followup to "Make clk_hw::init NULL after clk registration" Guillaume Tucker
Reply instructions: You may reply publically 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=20190816145022.GD3545@piout.net \ --to=alexandre.belloni@bootlin.com \ --cc=a.zummo@towertech.it \ --cc=linux-clk@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-rtc@vger.kernel.org \ --cc=maxime.ripard@bootlin.com \ --cc=mturquette@baylibre.com \ --cc=sboyd@kernel.org \ --cc=wens@csie.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
Linux-Clk Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-clk/0 linux-clk/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-clk linux-clk/ https://lore.kernel.org/linux-clk \ linux-clk@vger.kernel.org public-inbox-index linux-clk Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-clk AGPL code for this site: git clone https://public-inbox.org/public-inbox.git