[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v81lool4.wl-kuninori.morimoto.gx@renesas.com>
Date: Thu, 4 Jul 2024 02:52:56 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Banajit Goswami <bgoswami@...cinc.com>,
linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org,
alsa-devel@...a-project.org,
linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 05/11] ASoC: simple-card-utils: Simplify with cleanup.h
Hi Krzysztof
> Allocate the memory with scoped/cleanup.h to reduce error handling (less
> error paths) and make the code a bit simpler.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> ---
(snip)
> @@ -151,14 +152,15 @@ int simple_util_parse_tdm_width_map(struct device *dev, struct device_node *np,
> if (!dai->tdm_width_map)
> return -ENOMEM;
>
> - array_values = kcalloc(n, sizeof(*array_values), GFP_KERNEL);
> + u32 *array_values __free(kfree) = kcalloc(n, sizeof(*array_values),
> + GFP_KERNEL);
We can use 100 char, it can be 1 line.
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Powered by blists - more mailing lists