]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: selftests: Use struct_size() helper in kzalloc()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Tue, 16 Jun 2020 23:03:28 +0000 (18:03 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jun 2020 03:19:20 +0000 (20:19 -0700)
commit85f81a8e111e0d6044d5f82b78a7a09f17134e2e
tree9c3adb9752b29a79750c56843de08f07174246fd
parent91b9fbf67c90b665dba1f9d840eabffb0d22424d
net: stmmac: selftests: Use struct_size() helper in kzalloc()

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes.

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: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c