Re: [PATCH] staging: greybus: power_supply: Use struct_size() helper
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Johan Hovold <johan@xxxxxxxxxx>
- Subject: Re: [PATCH] staging: greybus: power_supply: Use struct_size() helper
- From: "Gustavo A. R. Silva" <gustavo@xxxxxxxxxxxxxx>
- Date: Wed, 10 Apr 2019 13:30:28 -0500
- In-reply-to: <20190404065733.GA12635@localhost>
- Openpgp: preference=signencrypt
- References: <20190403205801.GA19762@embeddedor> <20190404065733.GA12635@localhost>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
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
_______________________________________________
greybus-dev mailing list
greybus-dev@xxxxxxxxxxxxxxxx
https://lists.linaro.org/mailman/listinfo/greybus-dev
[Index of Archives]
[Asterisk App Development]
[PJ SIP]
[Gnu Gatekeeper]
[IETF Sipping]
[Info Cyrus]
[ALSA User]
[Fedora Linux Users]
[Linux SCTP]
[DCCP]
[Gimp]
[Yosemite News]
[Deep Creek Hot Springs]
[Yosemite Campsites]
[ISDN Cause Codes]
[Asterisk Books]