Re: [PATCH][next] leds: ns2: Use struct_size() in devm_kzalloc()

From: Pavel Machek
Date: Sun Jul 12 2020 - 04:26:48 EST


On Wed 2020-06-17 18:07:57, 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. Also, remove unnecessary
> function sizeof_ns2_led_priv().
>
> This code was detected with the help of Coccinelle and, audited and
> fixed manually.
>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@xxxxxxxxxx>

Thanks, applied.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature