cxgb4: Use struct_size() helper
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 19 Jun 2020 18:01:49 +0000 (13:01 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jun 2020 20:42:08 +0000 (13:42 -0700)
commita422d5ff6defb1c86a93f3f320d35eeb545455dd
treeff519a2b11f832c605b53aba7deaff7f22a5e35b
parentf362b70bd67add130ae4321306b62237356889a4
cxgb4: 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.

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>
drivers/net/ethernet/chelsio/cxgb4/sge.c