>-----Original Message----- >From: Jason Gunthorpe [mailto:jgg@xxxxxxxx] >Sent: Tuesday, June 26, 2018 1:13 AM >-#define UVERBS_ATTR_ENUM_IN(_id, _enum_arr, ...) > \ >- UVERBS_ATTR(_id, UVERBS_ATTR_TYPE_ENUM_IN, enum_def, > \ >- .ids = (_enum_arr), \ >- .num_elems = ARRAY_SIZE(_enum_arr), ##__VA_ARGS__) >+/* Use in the '...' of any UVERBS_ATTR */ /* Must be used in the '...' of any UVERBS_ATTR */ ? >+#define UA_FLAGS(_flags) .flags = _flags >+ >+#define UVERBS_ATTR_IDR(_attr_id, _idr_type, _access, ...) \ >+ ((const struct uverbs_attr_def){ \ >+ .id = _attr_id, \ >+ .attr = { \ >+ .type = UVERBS_ATTR_TYPE_IDR, \ >+ .u.obj.obj_type = _idr_type, \ >+ .u.obj.access = _access, \ >+ __VA_ARGS__, \ >+ } }) >+ -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html