OSDN Git Service

RDMA/ucma: Use struct_size() helper
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 4 Jun 2019 15:42:22 +0000 (10:42 -0500)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 7 Jun 2019 18:02:28 +0000 (15:02 -0300)
commit9bcb8940f4c0c58d2bec66e72e019ed58e602b95
treeb010708f394859f5fb163af585804d269349bb51
parent4f18904c78495ec16e271ee507709c626e61a62a
RDMA/ucma: 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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/ucma.c