From: Stephen Boyd <sboyd@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
mturquette@baylibre.com, robh+dt@kernel.org
Cc: devicetree@vger.kernel.org,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
darren.tsao@bitmain.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, fisher.cheng@bitmain.com,
alec.lin@bitmain.com, linux-clk@vger.kernel.org,
haitao.suo@bitmain.com
Subject: Re: [PATCH v5 1/8] clk: Zero init clk_init_data in helpers
Date: Tue, 17 Sep 2019 13:39:56 -0700 [thread overview]
Message-ID: <20190917203957.9F75C2054F@mail.kernel.org> (raw)
In-Reply-To: <20190916161447.32715-2-manivannan.sadhasivam@linaro.org>
Quoting Manivannan Sadhasivam (2019-09-16 09:14:40)
> The clk_init_data struct needs to be initialized to zero for the new
> parent_map implementation to work correctly. Otherwise, the member which
> is available first will get processed.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> drivers/clk/clk-composite.c | 2 +-
> 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 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
> index b06038b8f658..4d579f9d20f6 100644
> --- a/drivers/clk/clk-composite.c
> +++ b/drivers/clk/clk-composite.c
> @@ -208,7 +208,7 @@ struct clk_hw *clk_hw_register_composite(struct device *dev, const char *name,
> unsigned long flags)
> {
> struct clk_hw *hw;
> - struct clk_init_data init;
> + struct clk_init_data init = { NULL };
I'd prefer { } because then we don't have to worry about ordering the
struct to have a pointer vs. something else first.
> struct clk_composite *composite;
> struct clk_ops *clk_composite_ops;
> int ret;
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-09-17 20:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-16 16:14 [PATCH v5 0/8] Add Bitmain BM1880 clock driver Manivannan Sadhasivam
2019-09-16 16:14 ` [PATCH v5 1/8] clk: Zero init clk_init_data in helpers Manivannan Sadhasivam
2019-09-17 20:39 ` Stephen Boyd [this message]
2019-10-20 15:26 ` Manivannan Sadhasivam
2019-09-16 16:14 ` [PATCH v5 2/8] clk: Warn if clk_init_data is not zero initialized Manivannan Sadhasivam
2019-09-17 20:38 ` Stephen Boyd
2019-10-20 15:25 ` Manivannan Sadhasivam
2019-09-16 16:14 ` [PATCH v5 3/8] clk: Add clk_hw_unregister_composite helper function definition Manivannan Sadhasivam
2019-09-17 20:40 ` Stephen Boyd
2019-10-20 15:26 ` Manivannan Sadhasivam
2019-09-16 16:14 ` [PATCH v5 4/8] dt-bindings: clock: Add devicetree binding for BM1880 SoC Manivannan Sadhasivam
2019-09-16 18:02 ` Rob Herring
2019-09-16 16:14 ` [PATCH v5 5/8] arm64: dts: bitmain: Add clock controller support " Manivannan Sadhasivam
2019-09-16 16:14 ` [PATCH v5 6/8] arm64: dts: bitmain: Source common clock for UART controllers Manivannan Sadhasivam
2019-09-16 16:14 ` [PATCH v5 7/8] clk: Add common clock driver for BM1880 SoC Manivannan Sadhasivam
2019-09-18 4:47 ` Stephen Boyd
2019-10-20 15:40 ` Manivannan Sadhasivam
2019-09-16 16:14 ` [PATCH v5 8/8] MAINTAINERS: Add entry for BM1880 SoC clock driver Manivannan Sadhasivam
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=20190917203957.9F75C2054F@mail.kernel.org \
--to=sboyd@kernel.org \
--cc=alec.lin@bitmain.com \
--cc=darren.tsao@bitmain.com \
--cc=devicetree@vger.kernel.org \
--cc=fisher.cheng@bitmain.com \
--cc=haitao.suo@bitmain.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.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 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).