Home
last modified time | relevance | path

Searched hist:a7ad53cb (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/leds/
H A Dleds-ns2.ca7ad53cb Wed Jun 17 18:07:57 CDT 2020 Gustavo A. R. Silva <gustavoars@kernel.org> leds: ns2: Use struct_size() in devm_kzalloc()

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@kernel.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
a7ad53cb Wed Jun 17 18:07:57 CDT 2020 Gustavo A. R. Silva <gustavoars@kernel.org> leds: ns2: Use struct_size() in devm_kzalloc()

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@kernel.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>