[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221028002710.89A81C43470@smtp.kernel.org>
Date: Thu, 27 Oct 2022 17:27:08 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Dario Binacchi <dario.binacchi@...rulasolutions.com>,
linux-kernel@...r.kernel.org
Cc: Amarula patchwork <linux-amarula@...rulasolutions.com>,
michael@...rulasolutions.com,
Dario Binacchi <dario.binacchi@...rulasolutions.com>,
kernel test robot <lkp@...el.com>,
Allison Randal <allison@...utok.net>,
Miaoqian Lin <linmq006@...il.com>,
Michael Turquette <mturquette@...libre.com>,
Tero Kristo <kristo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Tony Lindgren <tony@...mide.com>, linux-clk@...r.kernel.org,
linux-omap@...r.kernel.org
Subject: Re: [PATCH v2] clk: ti: dra7-atl: don't allocate `parent_names' variable
Quoting Dario Binacchi (2022-10-18 09:03:52)
> diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c
> index ff4d6a951681..78482d1a4a33 100644
> --- a/drivers/clk/ti/clk-dra7-atl.c
> +++ b/drivers/clk/ti/clk-dra7-atl.c
> @@ -188,24 +188,17 @@ static void __init of_dra7_atl_clock_setup(struct device_node *node)
> goto cleanup;
> }
>
> - parent_names = kzalloc(sizeof(char *), GFP_KERNEL);
> -
> - if (!parent_names)
> - goto cleanup;
> -
> parent_names[0] = of_clk_get_parent_name(node, 0);
Can you use struct clk_parent_data instead and assign index to 0? Then
we don't even need to use of_clk_get_parent_name() here.
Powered by blists - more mailing lists