Re: [PATCH v2 0/2] Convert media drivers to use devm_kmemdup_array()

From: Sakari Ailus
Date: Tue Mar 11 2025 - 06:24:43 EST


Hi Raag,

On Tue, Mar 11, 2025 at 08:31:12AM +0200, Raag Jadav wrote:
> On Mon, Mar 10, 2025 at 10:53:57AM +0000, Sakari Ailus wrote:
> > Hi Raag,
> >
> > On Mon, Mar 10, 2025 at 08:45:12AM +0200, Raag Jadav wrote:
> > > On Fri, Feb 28, 2025 at 01:06:47PM +0530, Raag Jadav wrote:
> > > > This series converts media drivers to use the newly introduced[1]
> > > > devm_kmemdup_array() helper. This depends on changes available on
> > > > immutable tag[2].
> > > >
> > > > [1] https://lore.kernel.org/r/20250212062513.2254767-1-raag.jadav@xxxxxxxxx
> > > > [2] https://lore.kernel.org/r/Z7xGpz3Q4Zj6YHx7@xxxxxxxxxxxxxxxxxx
> > >
> > > Bump, anything I can do to move this forward?
> >
> > The patches these depend on (those adding devm_kmemdup_array()) aren't in
> > the Media tree yet. They don't seem urgent though so I'd just wait.
>
> I was hoping the immutable tag would be useful here. But sure, no problem.
>
> > Speaking of the patches themselves: I'd use *array instead of array[0] for
> > sizeof argument.
>
> I know it doesn't matter much to the compiler but since the source itself
> is an array here, doesn't [0] make more sense?

The element at index 0 isn't anyhow special in this respect so I do prefer
*array instead. In practice it works either way of course.

--
Regards,

Sakari Ailus