summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@nvidia.com>2021-04-11 15:29:19 +0300
committerJason Gunthorpe <jgg@nvidia.com>2021-04-13 19:36:35 -0300
commit7ca2b8a378ca0d4ce52edc63d6b160467d8a10c1 (patch)
tree9b9ac297f320e92fc52371b2719f043b0a0adef8
parent63f9c44bca5e10fb1fd86aee7e38039ed98f95cc (diff)
RDMA/uverbs: Make UVERBS_OBJECT_METHODS to consider line number
In order to support multiple methods declaration in the same file we should use the line number as part of the name. Link: https://lore.kernel.org/r/20210411122924.60230-3-leon@kernel.org Signed-off-by: Maor Gottlieb <maorg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
-rw-r--r--include/rdma/uverbs_named_ioctl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/rdma/uverbs_named_ioctl.h b/include/rdma/uverbs_named_ioctl.h
index f04f5126f61e..ee7873f872c3 100644
--- a/include/rdma/uverbs_named_ioctl.h
+++ b/include/rdma/uverbs_named_ioctl.h
@@ -20,7 +20,7 @@
/* These are static so they do not need to be qualified */
#define UVERBS_METHOD_ATTRS(method_id) _method_attrs_##method_id
-#define UVERBS_OBJECT_METHODS(object_id) _object_methods_##object_id
+#define UVERBS_OBJECT_METHODS(object_id) _UVERBS_NAME(_object_methods_##object_id, __LINE__)
#define DECLARE_UVERBS_NAMED_METHOD(_method_id, ...) \
static const struct uverbs_attr_def *const UVERBS_METHOD_ATTRS( \