From: Stephen Boyd <sboyd@codeaurora.org>
To: Irina Tirdea <irina.tirdea@intel.com>
Cc: linux-clk@vger.kernel.org,
Michael Turquette <mturquette@baylibre.com>,
alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Takashi Iwai <tiwai@suse.com>,
Pierre-Louis Bossart <pierre-louis.bossart@intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: Re: [PATCH v3] clk: x86: Add Atom PMC platform clocks
Date: Wed, 14 Sep 2016 14:33:24 -0700 [thread overview]
Message-ID: <20160914213324.GF7243@codeaurora.org> (raw)
In-Reply-To: <1473427417-9166-1-git-send-email-irina.tirdea@intel.com>
On 09/09, Irina Tirdea wrote:
> +
> +static const char **plt_clk_register_parents(struct platform_device *pdev,
> + struct clk_plt_data *data,
> + const struct pmc_clk *clks)
> +{
> + const char **parent_names;
> + int i, err;
> +
> + data->nparents = 0;
> + while (clks[data->nparents].name)
> + data->nparents++;
> +
> + data->parents = devm_kzalloc(&pdev->dev,
> + sizeof(*data->parents) * data->nparents,
> + GFP_KERNEL);
This could be devm_kcalloc()
---8<----
diff --git a/drivers/clk/x86/clk-byt-plt.c b/drivers/clk/x86/clk-byt-plt.c
index 9dbf4b04ae47..7bd6c0dded00 100644
--- a/drivers/clk/x86/clk-byt-plt.c
+++ b/drivers/clk/x86/clk-byt-plt.c
@@ -259,9 +259,8 @@ static const char **plt_clk_register_parents(struct platform_device *pdev,
while (clks[data->nparents].name)
data->nparents++;
- data->parents = devm_kzalloc(&pdev->dev,
- sizeof(*data->parents) * data->nparents,
- GFP_KERNEL);
+ data->parents = devm_kcalloc(&pdev->dev, data->nparents,
+ sizeof(*data->parents), GFP_KERNEL);
if (!data->parents) {
err = -ENOMEM;
goto err_out;
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2016-09-14 21:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-09 13:23 [PATCH v3] clk: x86: Add Atom PMC platform clocks Irina Tirdea
2016-09-14 21:30 ` Stephen Boyd
2016-09-15 15:44 ` Tirdea, Irina
2016-10-06 18:09 ` Tirdea, Irina
2016-09-14 21:33 ` Stephen Boyd [this message]
2016-09-15 15:44 ` Tirdea, Irina
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=20160914213324.GF7243@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=irina.tirdea@intel.com \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pierre-louis.bossart@intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.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