summaryrefslogtreecommitdiff
path: root/include/linux/avtimer_kernel.h
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2019-05-29 10:13:26 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-12 13:17:07 +0100
commit8171dd5ae287bc3b6eb7ab236f658c551c287ce6 (patch)
treed3e6351a4ba45134a36f434c76369414444569ef /include/linux/avtimer_kernel.h
parenta2592cbdff09743ce86f6af5ba0ae9b187414702 (diff)
IB/qib: Use struct_size() helper
commit 829ca44ecf60e9b6f83d0161a6ef10c1304c5060 upstream. Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace the following form: sizeof(*pkt) + sizeof(pkt->addr[0])*n with: struct_size(pkt, addr, n) Also, notice that variable size is unnecessary, hence it is removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/avtimer_kernel.h')
0 files changed, 0 insertions, 0 deletions