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

From: Alex Elder
Date: Fri Mar 11 2022 - 08:03:03 EST


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