All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@nvidia.com>
Cc: Maor Gottlieb <maorg@nvidia.com>,
	linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
	Saeed Mahameed <saeedm@nvidia.com>,
	Yishai Hadas <yishaih@mellanox.com>
Subject: [PATCH rdma-next 2/7] RDMA/uverbs: Make UVERBS_OBJECT_METHODS to consider line number
Date: Thu, 18 Mar 2021 13:15:43 +0200	[thread overview]
Message-ID: <20210318111548.674749-3-leon@kernel.org> (raw)
In-Reply-To: <20210318111548.674749-1-leon@kernel.org>

From: Maor Gottlieb <maorg@nvidia.com>

In order to support multiple methods declaration in the same file we
should use the line number as part of the name.

Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 include/rdma/uverbs_named_ioctl.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/rdma/uverbs_named_ioctl.h b/include/rdma/uverbs_named_ioctl.h
index f04f5126f61e..f247e5d57bb1 100644
--- a/include/rdma/uverbs_named_ioctl.h
+++ b/include/rdma/uverbs_named_ioctl.h
@@ -20,7 +20,8 @@

 /* 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(        \
--
2.30.2


  parent reply	other threads:[~2021-03-18 11:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 11:15 [PATCH rdma-next 0/7] Add MEMIC operations support Leon Romanovsky
2021-03-18 11:15 ` [PATCH mlx5-next 1/7] net/mlx5: Add MEMIC operations related bits Leon Romanovsky
2021-03-18 11:15 ` Leon Romanovsky [this message]
2021-03-18 11:15 ` [PATCH rdma-next 3/7] RDMA/mlx5: Avoid use after free in allocate MEMIC bad flow Leon Romanovsky
2021-03-18 11:15 ` [PATCH rdma-next 4/7] RDMA/mlx5: Move all DM logic to separate file Leon Romanovsky
2021-03-18 11:15 ` [PATCH rdma-next 5/7] RDMA/mlx5: Add support to MODIFY_MEMIC command Leon Romanovsky
2021-03-18 11:15 ` [PATCH rdma-next 6/7] RDMA/mlx5: Add support in MEMIC operations Leon Romanovsky
2021-04-01 17:47   ` Jason Gunthorpe
2021-04-04  7:51     ` Leon Romanovsky
2021-03-18 11:15 ` [PATCH rdma-next 7/7] RDMA/mlx5: Expose UAPI to query DM Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210318111548.674749-3-leon@kernel.org \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=yishaih@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.