]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
sparc64: viohs: Use struct_size() helper
authorGustavo A. R. Silva <gustavoars@kernel.org>
Sat, 20 Jun 2020 01:14:06 +0000 (20:14 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jun 2020 22:43:16 +0000 (15:43 -0700)
commitc05d042fda889f1e591b9d306482d9c16072dd60
tree879c23cadb62bd3a4b6cf5a5d41fabb3eba92ee2
parentdd0d718152e4c65b173070d48ea9dfc06894c3e5
sparc64: viohs: Use struct_size() helper

Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes. Also, remove unnecessary
variable _len_.

This code was detected with the help of Coccinelle and, audited and
fixed manually.

Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/viohs.c