From mboxrd@z Thu Jan 1 00:00:00 1970 From: mturquette@linaro.org (Mike Turquette) Date: Wed, 03 Apr 2013 14:49:23 -0700 Subject: [PATCH v2 7/7] clk: sunxi: drop an unnecesary kmalloc In-Reply-To: <1364419243-18446-8-git-send-email-emilio@elopez.com.ar> References: <1363962042-29536-1-git-send-email-emilio@elopez.com.ar> <1364419243-18446-1-git-send-email-emilio@elopez.com.ar> <1364419243-18446-8-git-send-email-emilio@elopez.com.ar> Message-ID: <20130403214923.3383.70847@quantum> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Quoting Emilio L?pez (2013-03-27 14:20:43) > clk_register will copy this information, so we can just use a normal > array and do one less dynamic allocation. > > Signed-off-by: Emilio L?pez Looks good to me. Regards, Mike > --- > > Changes from v1: > - this patch was not present on v1 > > drivers/clk/sunxi/clk-sunxi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c > index daa51ab..0bb0eb4 100644 > --- a/drivers/clk/sunxi/clk-sunxi.c > +++ b/drivers/clk/sunxi/clk-sunxi.c > @@ -232,7 +232,7 @@ static void __init sunxi_mux_clk_setup(struct device_node *node, > { > struct clk *clk; > const char *clk_name = node->name; > - const char **parents = kmalloc(sizeof(char *) * 5, GFP_KERNEL); > + const char *parents[5]; > void *reg; > int i = 0; > > -- > 1.8.2