RDMA/uverbs: Simplify UVERBS_ATTR family of macros
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 4 Jul 2018 05:50:25 +0000 (08:50 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 4 Jul 2018 19:47:01 +0000 (13:47 -0600)
commitd108dac08085b6fe3947df9625c76fc9f66c1bbb
treea0bac15e73129dbb54ddf5bf0e9b5653e79d488e
parentad544cfe54cbd1b0b68c620a371ebcde6a3264eb
RDMA/uverbs: Simplify UVERBS_ATTR family of macros

Instead of using a complex cascade of macros, just directly provide the
initializer list each of the declarations is trying to create.

Now that the macros are simplified this also reworks the uverbs_attr_spec
to be friendly to older compilers by eliminating any unnamed
structures/unions inside, and removing the duplication of some fields. The
structure size remains at 16 bytes which was the original motivation for
some of this oddness.

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