[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6CSYn7ZDVNELIIv@smile.fi.intel.com>
Date: Mon, 3 Feb 2025 11:54:42 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Raag Jadav <raag.jadav@...el.com>
Cc: gregkh@...uxfoundation.org, rafael@...nel.org, linus.walleij@...aro.org,
mika.westerberg@...ux.intel.com, dmitry.torokhov@...il.com,
lgirdwood@...il.com, broonie@...nel.org, sre@...nel.org,
jic23@...nel.org, przemyslaw.kitszel@...el.com,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org, linux-sound@...r.kernel.org,
linux-pm@...r.kernel.org, linux-iio@...r.kernel.org
Subject: Re: [PATCH v3 14/20] iio: adc: xilinx-xadc-core: use
devm_kmemdup_array()
On Mon, Feb 03, 2025 at 01:38:56PM +0530, Raag Jadav wrote:
> Convert to use devm_kmemdup_array() which is more robust.
...
> - channels = devm_kmemdup(dev, channel_templates,
> - sizeof(channels[0]) * max_channels, GFP_KERNEL);
> + channels = devm_kmemdup_array(dev, channel_templates, max_channels,
> + sizeof(channels[0]), GFP_KERNEL);
I would use more regular sizeof(*channels)
> if (!channels)
> return -ENOMEM;
P.S. For all sizeof() replacements the changes would probably need the updated
commit messages.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists