From patchwork Sun Apr 11 12:29:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 419473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BBC1C433ED for ; Sun, 11 Apr 2021 12:29:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7850760FF1 for ; Sun, 11 Apr 2021 12:29:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235546AbhDKMaD (ORCPT ); Sun, 11 Apr 2021 08:30:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:51520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235517AbhDKMaA (ORCPT ); Sun, 11 Apr 2021 08:30:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2998A610C8; Sun, 11 Apr 2021 12:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618144183; bh=llpiJ23BaDMVc5YoUZRod9Gtb8+AxvI90lK7C/0LfFU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lsIwq/R/rkIG0eCPR0JmZ52L820sCnKMvtHLioyav9UiMxL4YMzvit3ssabyAAV+P lG6H2I5V6Rp/6XwBpKNjkygzi9s0sd/PwMF8oxZpWTzflZZYKrTjKpRllyfRzVfsZL xgU2S6cdHT9OXThDrZ5kY3WYmrbVvTV58fg08Bh4nUEZHp+bEncZgAKXFTd+WslN6E +wi75jjxvvfAvScvOshgYUpW4/hJk385C5QimcbCf1H0ISl/+pPlZmkmgDPufDecJx ywHwMUR3dTDx89wMtQlbr6r37YI2n3PGmZWvGC6vu2nsr10MZPRAJOzGZIb2Uejp5E n7E0Egcwh9onQ== From: Leon Romanovsky To: Doug Ledford , Jason Gunthorpe Cc: Maor Gottlieb , linux-api@vger.kernel.org, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Saeed Mahameed , Yishai Hadas Subject: [PATCH rdma-next v1 2/7] RDMA/uverbs: Make UVERBS_OBJECT_METHODS to consider line number Date: Sun, 11 Apr 2021 15:29:19 +0300 Message-Id: <20210411122924.60230-3-leon@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210411122924.60230-1-leon@kernel.org> References: <20210411122924.60230-1-leon@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Maor Gottlieb 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 Signed-off-by: Leon Romanovsky --- include/rdma/uverbs_named_ioctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( \