[PATCH v1 1/1] ARM: omap2: Switch to use kmemdup_array()
Aaro Koskinen
aaro.koskinen at iki.fi
Thu Jun 6 12:47:07 PDT 2024
On Thu, Jun 06, 2024 at 10:43:07PM +0300, Andy Shevchenko wrote:
> On Thu, Jun 06, 2024 at 10:32:02PM +0300, Aaro Koskinen wrote:
> > On Thu, Jun 06, 2024 at 07:51:04PM +0300, Andy Shevchenko wrote:
> > > Let the kememdup_array() take care about multiplication and possible
> >
> > ^^^^^
> > Typo.
>
> Aha, thanks!
>
> > > overflows.
>
> ...
>
> > > - hwmods = kmemdup(ohs, sizeof(struct omap_hwmod *) * oh_cnt, GFP_KERNEL);
> > > + hwmods = kmemdup_array(ohs, oh_cnt, sizeof(*hwmods), GFP_KERNEL);
> >
> > Maybe same result, but I guess the 3rd parameter should be count?
>
> Actually it is going to be changed to follow kcalloc().
> https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=0ee14725471c
OK, good, you can add:
Reviewed-by: Aaro Koskinen <aaro.koskinen at iki.fi>
A.
More information about the linux-arm-kernel
mailing list