[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5e204c42-e567-9ab2-340c-1b8d017807e3@embeddedor.com>
Date: Wed, 10 Apr 2019 13:30:28 -0500
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Johan Hovold <johan@...nel.org>
Cc: Rui Miguel Silva <rmfrfs@...il.com>, Alex Elder <elder@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, greybus-dev@...ts.linaro.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: greybus: power_supply: Use struct_size() helper
Hi Johan,
On 4/4/19 1:57 AM, Johan Hovold wrote:
>
> This patch looks good, but I noticed a bug here in the current code,
> which should be fixed before applying this clean up.
>
> sizeof(req) should have been sizeof(*req) above.
>
Good catch.
>> - sizeof(struct gb_power_supply_props_desc),
>> + sizeof(req),
>> + struct_size(resp, props, props_count),
>> GFP_KERNEL);
>> if (!op)
>> return -ENOMEM;
>
> I've just submitted a fix (and CCed you as well).
>
> Would you mind respinning on top of that one?
>
Yep. I'll send v2 shortly.
Thanks
--
Gustavo
Powered by blists - more mailing lists