Re: [PATCH net-next v2 6/7] net: ipa: embed interconnect array in the power structure

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

 



On 3/10/22 11:25 PM, Jakub Kicinski wrote:
On Wed,  9 Mar 2022 13:20:36 -0600 Alex Elder wrote:
-	power = kzalloc(sizeof(*power), GFP_KERNEL);
+	size = data->interconnect_count * sizeof(power->interconnect[0]);
+	power = kzalloc(sizeof(*power) + size, GFP_KERNEL);

struct_size(), can be a follow up

I can do that today; I'll look for other instances in the
driver where this could be done as well.  Thanks.

					-Alex



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux