]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/uverbs: Use UVERBS_ATTR_MIN_SIZE correctly and uniformly
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 4 Jul 2018 05:50:30 +0000 (08:50 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 4 Jul 2018 19:47:01 +0000 (13:47 -0600)
commit575394b82ab1af60717a4716b0972a5de857c78a
treed5f6d2e7b23ec21c5ffde614fc5eb49f7f1e7712
parente2520df774476cf367279e646d769c0a8ed1768b
RDMA/uverbs: Use UVERBS_ATTR_MIN_SIZE correctly and uniformly

This newer macro allows specifying a lower bound on the accepted size, and
has an 'unlimited' upper bound. Due to this it never checks for trailing
zeroing so it doesn't make any sense to combine it with MIN_SZ_OR_ZERO, so
drop MIN_SZ_OR_ZERO when they are used together

There were a couple of places that open coded this pattern, switch them to
use the clearer UVERBS_ATTR_MIN_SIZE for clarity.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/core/uverbs_std_types_counters.c
drivers/infiniband/hw/mlx5/devx.c
include/rdma/uverbs_ioctl.h