From patchwork Thu Nov 22 23:24:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 10694979 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1A80D1709 for ; Thu, 22 Nov 2018 23:24:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B39C2BF0F for ; Thu, 22 Nov 2018 23:24:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F41802C3A6; Thu, 22 Nov 2018 23:24:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F4272C196 for ; Thu, 22 Nov 2018 23:24:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389637AbeKWKGF (ORCPT ); Fri, 23 Nov 2018 05:06:05 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34137 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407881AbeKWKGF (ORCPT ); Fri, 23 Nov 2018 05:06:05 -0500 Received: by mail-pl1-f194.google.com with SMTP id f12-v6so9804388plo.1 for ; Thu, 22 Nov 2018 15:24:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QQikufbD0iOr/0/ZUuc7CKm9Xm0Jpny4Z1c4eIngpSc=; b=ABD0FeS9B+vVMlRNqWPkLWqXHqFgaCoZHRl87NrBODBSJw3ExIi+0AXTFCmkJvz3BV kuKpZ7i24tsdub1jG/fkIgtznUuChUq2Z/yHUKWGDktpLZJrzNDSeMgsqsmZaooEI0Kq G5p8G7P6IeWABiS+RpdhK43+S39I2bhxoYTROARZ0ABXqS17islo3iFJDHLNVXblpT/z QdjKO2LnGmNU1yG0s8bf0Qc40mdNX/XbxIbk3qRArvNUZVezrrPvNZHvEj51HeIlO7la ZPlrLQRWCmX4lwCO3VFXzXDls2XUmxCyGR9ZnQ0jI88XUEHXv3Pjpc/4qKNRqGnZIxL+ 7bzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QQikufbD0iOr/0/ZUuc7CKm9Xm0Jpny4Z1c4eIngpSc=; b=QmHvSpaEvFQ9/dbUyQyeOvkpltD0crehI2uUq1+weDdqSLtvizLIGutQ+nr7lFIwEt g/5IOv9TXPSqXUwgt9wpmtAAXTuGtrz9hcEp7x5IYx6Ij0Jy3jBtK1jtMszBYF1lU+jE qbbooP9j3vJ/s3ZESnGJponsk98RzgL47usirbIil52vhCZYSK7ema1MQvDMmXqzudAi KxMMkLw7ikCV4Fo27ufbJGuKwNprmdhweaVDBKInGFI9TSCawj1tvrCDvF2PqdPt5r6S uWMIMJm58It4Hj8G3Cy71dDEViU88G4zoL6gwOUkva/e0w9zsYWtXMDIRJYLrp9ssFB5 HMVw== X-Gm-Message-State: AA+aEWZEGFYrcFLC86FpvLFhUdfs1cRJyRU96y0vEnPiKihr/1+A0c+v liXaDCfRT8A/BRgaUTBYSllF6bghtJI= X-Google-Smtp-Source: AFSGD/X0wBP09YLA87vObK54tN6GGN+3YDHlvGjJufYjZnWuan+K+PVWMINF2NODGdOsmK//t0zccA== X-Received: by 2002:a17:902:6907:: with SMTP id j7mr12702358plk.221.1542929062202; Thu, 22 Nov 2018 15:24:22 -0800 (PST) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id z14sm39126680pgv.47.2018.11.22.15.24.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Nov 2018 15:24:19 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1gPyKY-0007sR-AM; Thu, 22 Nov 2018 16:24:18 -0700 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Jason Gunthorpe Subject: [PATCH rdma-core 02/10] verbs: Add explicit arguments to DECLARE_CMD_BUFFER_COMPAT() Date: Thu, 22 Nov 2018 16:24:08 -0700 Message-Id: <20181122232416.30132-3-jgg@ziepe.ca> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181122232416.30132-1-jgg@ziepe.ca> References: <20181122232416.30132-1-jgg@ziepe.ca> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jason Gunthorpe It is hard to read when this macro implicitly reaches into the argument list to get the parameters. Type them again.. Signed-off-by: Jason Gunthorpe --- libibverbs/cmd_cq.c | 8 ++++++-- libibverbs/cmd_write.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libibverbs/cmd_cq.c b/libibverbs/cmd_cq.c index 766951888e9f99..3406115559aaa7 100644 --- a/libibverbs/cmd_cq.c +++ b/libibverbs/cmd_cq.c @@ -119,7 +119,9 @@ int ibv_cmd_create_cq(struct ibv_context *context, int cqe, size_t cmd_size, struct ib_uverbs_create_cq_resp *resp, size_t resp_size) { - DECLARE_CMD_BUFFER_COMPAT(cmdb, UVERBS_OBJECT_CQ, UVERBS_METHOD_CQ_CREATE); + DECLARE_CMD_BUFFER_COMPAT(cmdb, UVERBS_OBJECT_CQ, + UVERBS_METHOD_CQ_CREATE, cmd, cmd_size, resp, + resp_size); return ibv_icmd_create_cq(context, cqe, channel, comp_vector, 0, cq, cmdb); @@ -133,7 +135,9 @@ int ibv_cmd_create_cq_ex(struct ibv_context *context, struct ib_uverbs_ex_create_cq_resp *resp, size_t resp_size) { - DECLARE_CMD_BUFFER_COMPAT(cmdb, UVERBS_OBJECT_CQ, UVERBS_METHOD_CQ_CREATE); + DECLARE_CMD_BUFFER_COMPAT(cmdb, UVERBS_OBJECT_CQ, + UVERBS_METHOD_CQ_CREATE, cmd, cmd_size, resp, + resp_size); uint32_t flags = 0; if (!check_comp_mask(cq_attr->comp_mask, IBV_CQ_INIT_ATTR_MASK_FLAGS)) diff --git a/libibverbs/cmd_write.h b/libibverbs/cmd_write.h index 6ee4f30813bb67..98aa58a26d6728 100644 --- a/libibverbs/cmd_write.h +++ b/libibverbs/cmd_write.h @@ -98,7 +98,8 @@ void *_write_get_resp_ex(struct ibv_command_buffer *link, void _write_set_uhw(struct ibv_command_buffer *cmdb, const void *req, size_t core_req_size, size_t req_size, void *resp, size_t core_resp_size, size_t resp_size); -#define DECLARE_CMD_BUFFER_COMPAT(_name, _object_id, _method_id) \ +#define DECLARE_CMD_BUFFER_COMPAT(_name, _object_id, _method_id, cmd, \ + cmd_size, resp, resp_size) \ DECLARE_COMMAND_BUFFER(_name, _object_id, _method_id, 2); \ _write_set_uhw(_name, cmd, sizeof(*cmd), cmd_size, resp, \ sizeof(*resp), resp_size)