Re: [PATCH v1 1/1] ARM: omap2: Switch to use kmemdup_array()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>

A.




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux