Johan,
On 4/4/19 2:24 AM, Johan Hovold wrote:
> On Thu, Apr 04, 2019 at 08:09:51AM +0100, Rui Miguel Silva wrote:
>> Hi Gustavo,
>> Thanks a lot for the patch.
>>
>> On Wed 03 Apr 2019 at 21:58, Gustavo A. R. Silva wrote:
>>> Make use of the struct_size() helper instead of an open-coded
>>> versi
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
On Thu, Apr 04, 2019 at 08:09:51AM +0100, Rui Miguel Silva wrote:
> Hi Gustavo,
> Thanks a lot for the patch.
>
> On Wed 03 Apr 2019 at 21:58, Gustavo A. R. Silva wrote:
> > Make use of the struct_size() helper instead of an open-coded
> > version
> > in order to avoid any potential type mistakes
Hi Gustavo,
Thanks a lot for the patch.
On Wed 03 Apr 2019 at 21:58, Gustavo A. R. Silva wrote:
Make use of the struct_size() helper instead of an open-coded
version
in order to avoid any potential type mistakes, in particular in
the
context in which this code is being used.
So, replace code
On Wed, Apr 03, 2019 at 03:58:01PM -0500, Gustavo A. R. Silva wrote:
> Make use of the struct_size() helper instead of an open-coded version
> in order to avoid any potential type mistakes, in particular in the
> context in which this code is being used.
>
> So, replace code of the following form:
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.
So, replace code of the following form:
sizeof(*resp) + props_count * sizeof(struct gb_power_supply_props_desc)
with