From patchwork Thu Nov 15 17:49:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10684777 X-Patchwork-Delegate: jgg@ziepe.ca 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 725A314BA for ; Thu, 15 Nov 2018 17:49:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63BA62CD1E for ; Thu, 15 Nov 2018 17:49:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 582E62CD8F; Thu, 15 Nov 2018 17:49:54 +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,FREEMAIL_FROM,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 49D9D2CD1E for ; Thu, 15 Nov 2018 17:49:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388226AbeKPD6j (ORCPT ); Thu, 15 Nov 2018 22:58:39 -0500 Received: from mail-qk1-f196.google.com ([209.85.222.196]:38585 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726746AbeKPD6j (ORCPT ); Thu, 15 Nov 2018 22:58:39 -0500 Received: by mail-qk1-f196.google.com with SMTP id d19so33126567qkg.5 for ; Thu, 15 Nov 2018 09:49:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=/d1rgSfVSUrr6/9EP3shEaUo604HRhONB4D4rJGwa84=; b=fzXQsCuI8bxvAEi0cG1wiL6V0kqHoiB8ol3bgvLwtGJheHi5pBESzq2LYLRzjbkKrt evlAQJZNi6pv5/nC/GBncOyyl5OjN4NrlPSq23105UhlRYugguzNG/xxSn9vnlSQ/Y/N edq9mTh9+zTqltPM8q7uCSYPuSX7PHCwUAWHX4Qh6cSXn1hQ2y/Ho2wKQX7ZRnGmDU7M zTPF60lpOn3VDZLEB0XzV3qzuF9R3Ic7epEVVDRLgDB+7Zrs3dNtOam26I+7+ogedXEE EIv/yerhSWRIMkLpKQ0GwTu4hnT8eA4VMrxfcgPHKkP3kaKJNDMNTVmmAmfJj0k/3c53 5wzA== 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; bh=/d1rgSfVSUrr6/9EP3shEaUo604HRhONB4D4rJGwa84=; b=lpv7r9lfIxtB26ofWztQoo+Gj1hwVJ4f2Y4A5Ug5ByyH8SqL60Tj2PkY3uN2XBi3DA 0lR3e9oM8Gwnp7Lw5RucWxbGaTyQo88GHLU11ZNBTE1PR3CbepekHNYdo4b1MI59/lAr ZSWlteyxN32OD4CPs4mA1j/uX3qJp5DIOhT+IOMKN0uUqv8scnY1cdduWmhgOeGjkmJn m196O/QqEGg9ZQr3QrYO6kvGzgxZtM5pvWPOj8uhXN5NwhvcuK+bsAvnrdfBqz9dD7OT S4NCKoux4gYnQcapphMNV4lvPyDU+0EclfiA4BwKYJ3uDYgNx6Qy7mNDmpsKPeQvtzcG QR5g== X-Gm-Message-State: AGRZ1gIKaBH7Fz1j6xqjZ+cYP/6iS86DNediFV0HCcIFtr52JuKiQikz HJyHuEkz0fo01R4xVAXR1FU= X-Google-Smtp-Source: AJdET5eLeNr5K9sAyPdT6ZU8UEATDOe7NB1wVY1dzz+XSfbzMm3dZboTysKIlHKkR0TDY9R+iSRmQA== X-Received: by 2002:a0c:f648:: with SMTP id s8mr7206037qvm.122.1542304190719; Thu, 15 Nov 2018 09:49:50 -0800 (PST) Received: from kheib-workstation.redhat.com ([64.114.255.97]) by smtp.gmail.com with ESMTPSA id k189sm5422863qkf.64.2018.11.15.09.49.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Nov 2018 09:49:49 -0800 (PST) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, Kamal Heib Subject: [PATCH rdma-next v2] RDMA/rdmavt: Fix rvt_create_ah prototype Date: Thu, 15 Nov 2018 09:49:38 -0800 Message-Id: <20181115174938.19950-1-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.5 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 This patch fixes the wrong assignment of the create_ah function pointer, the create_ah verb receive three parameters while the rvt_create_ah receives two parameters, this happens due to the wrong function casting that is done in check_driver_override(). v2: - Add fixes tag. Fixes: 477864c8fcd9 ("IB/core: Let create_ah return extended response to user") Signed-off-by: Kamal Heib Reviewed-by: Dennis Dalessandro --- drivers/infiniband/sw/rdmavt/ah.c | 4 +++- drivers/infiniband/sw/rdmavt/ah.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/sw/rdmavt/ah.c b/drivers/infiniband/sw/rdmavt/ah.c index 89ec0f64abfc..084bb4baebb5 100644 --- a/drivers/infiniband/sw/rdmavt/ah.c +++ b/drivers/infiniband/sw/rdmavt/ah.c @@ -91,13 +91,15 @@ EXPORT_SYMBOL(rvt_check_ah); * rvt_create_ah - create an address handle * @pd: the protection domain * @ah_attr: the attributes of the AH + * @udata: pointer to user's input output buffer information. * * This may be called from interrupt context. * * Return: newly allocated ah */ struct ib_ah *rvt_create_ah(struct ib_pd *pd, - struct rdma_ah_attr *ah_attr) + struct rdma_ah_attr *ah_attr, + struct ib_udata *udata) { struct rvt_ah *ah; struct rvt_dev_info *dev = ib_to_rvt(pd->device); diff --git a/drivers/infiniband/sw/rdmavt/ah.h b/drivers/infiniband/sw/rdmavt/ah.h index 16105af99189..25271b48a683 100644 --- a/drivers/infiniband/sw/rdmavt/ah.h +++ b/drivers/infiniband/sw/rdmavt/ah.h @@ -51,7 +51,8 @@ #include struct ib_ah *rvt_create_ah(struct ib_pd *pd, - struct rdma_ah_attr *ah_attr); + struct rdma_ah_attr *ah_attr, + struct ib_udata *udata); int rvt_destroy_ah(struct ib_ah *ibah); int rvt_modify_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr); int rvt_query_ah(struct ib_ah *ibah, struct rdma_ah_attr *ah_attr);