From: Scott Wood <scottwood@freescale.com>
To: Emil Medve <Emilian.Medve@Freescale.com>
Cc: mturquette@linaro.org, haokexin@gmail.com,
linuxppc-dev@lists.ozlabs.org, yuantian.tang@Freescale.com
Subject: Re: [PATCH 6/8] clk: ppc-corenet: Replace kzalloc() with kmalloc()
Date: Tue, 24 Feb 2015 19:17:21 -0600 [thread overview]
Message-ID: <1424827041.4698.44.camel@freescale.com> (raw)
In-Reply-To: <1421748570-14282-7-git-send-email-Emilian.Medve@Freescale.com>
On Tue, 2015-01-20 at 04:09 -0600, Emil Medve wrote:
> Where the memset() is not necessary
>
> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
> ---
> drivers/clk/clk-ppc-corenet.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/clk-ppc-corenet.c b/drivers/clk/clk-ppc-corenet.c
> index d84a7f0..91816b1 100644
> --- a/drivers/clk/clk-ppc-corenet.c
> +++ b/drivers/clk/clk-ppc-corenet.c
> @@ -185,7 +185,7 @@ static void __init core_pll_init(struct device_node *np)
> if (!subclks)
> goto err_map;
>
> - onecell_data = kzalloc(sizeof(*onecell_data), GFP_KERNEL);
> + onecell_data = kmalloc(sizeof(*onecell_data), GFP_KERNEL);
> if (!onecell_data)
> goto err_clks;
>
I think it's better to use kzalloc always, outside of
performance-sensitive allocations. E.g. what if a new field is added to
the struct later?
-Scott
next prev parent reply other threads:[~2015-02-25 1:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 10:09 [PATCH 0/8] clk: ppc-corenet: Add support for the platform PLL Emil Medve
2015-01-20 10:09 ` [PATCH 1/8] clk: ppc-corenet: Fix checkpatch type PARENTHESIS_ALIGNMENT Emil Medve
2015-01-20 10:09 ` [PATCH 2/8] clk: ppc-corenet: Fix checkpatch type ALLOC_WITH_MULTIPLY Emil Medve
2015-01-20 10:09 ` [PATCH 3/8] clk: ppc-corenet: Fix checkpatch type ALLOC_SIZEOF_STRUCT Emil Medve
2015-01-20 10:09 ` [PATCH 4/8] clk: ppc-corenet: Fix checkpatch type OOM_MESSAGE Emil Medve
2015-01-20 10:09 ` [PATCH 5/8] clk: ppc-corenet: Make local symbol 'static' Emil Medve
2015-01-20 10:09 ` [PATCH 6/8] clk: ppc-corenet: Replace kzalloc() with kmalloc() Emil Medve
2015-02-25 1:17 ` Scott Wood [this message]
2015-01-20 10:09 ` [PATCH 7/8] powerpc/corenet: Enable CLK_PPC_CORENET Emil Medve
2015-02-25 1:14 ` Scott Wood
2015-01-20 10:09 ` [PATCH 8/8] clk: ppc-corenet: Add support for the platform PLL Emil Medve
2015-01-21 5:42 ` Yuantian Tang
2015-01-21 8:20 ` Emil Medve
2015-01-21 8:35 ` Yuantian Tang
2015-01-21 9:02 ` Emil Medve
2015-01-21 9:37 ` Yuantian Tang
2015-01-21 9:58 ` Emil Medve
2015-01-21 1:40 ` [PATCH 0/8] " Yuantian Tang
2015-01-21 6:24 ` Emil Medve
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=1424827041.4698.44.camel@freescale.com \
--to=scottwood@freescale.com \
--cc=Emilian.Medve@Freescale.com \
--cc=haokexin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mturquette@linaro.org \
--cc=yuantian.tang@Freescale.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 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.