From patchwork Wed Jan 6 18:23:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Dalessandro X-Patchwork-Id: 7969911 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5E3E59F1CC for ; Wed, 6 Jan 2016 18:23:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A10120145 for ; Wed, 6 Jan 2016 18:23:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EDE42013D for ; Wed, 6 Jan 2016 18:23:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752160AbcAFSXd (ORCPT ); Wed, 6 Jan 2016 13:23:33 -0500 Received: from mga11.intel.com ([192.55.52.93]:51920 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752011AbcAFSXc (ORCPT ); Wed, 6 Jan 2016 13:23:32 -0500 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 06 Jan 2016 10:23:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,530,1444719600"; d="scan'208";a="24669008" Received: from scymds02.sc.intel.com ([10.82.195.37]) by fmsmga004.fm.intel.com with ESMTP; 06 Jan 2016 10:23:32 -0800 Received: from scvm10.sc.intel.com (scvm10.sc.intel.com [10.82.195.27]) by scymds02.sc.intel.com with ESMTP id u06INVr3027420; Wed, 6 Jan 2016 10:23:31 -0800 Received: from scvm10.sc.intel.com (localhost [127.0.0.1]) by scvm10.sc.intel.com with ESMTP id u06INVh2007217; Wed, 6 Jan 2016 10:23:31 -0800 Subject: [PATCH 6/9] IB/qib: Delete QIB user context allocation and de-alloction functions To: dledford@redhat.com From: Dennis Dalessandro Cc: linux-rdma@vger.kernel.org, Harish Chegondi , Ira Weiny Date: Wed, 06 Jan 2016 10:23:31 -0800 Message-ID: <20160106182331.5401.51396.stgit@scvm10.sc.intel.com> In-Reply-To: <20160106181837.5401.67435.stgit@scvm10.sc.intel.com> References: <20160106181837.5401.67435.stgit@scvm10.sc.intel.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Harish Chegondi IB user context alloc and dealloc functions have been added to rdmavt. Delete the QIB user context alloc/dealloc functions and use the ones in rdmavt. Reviewed-by: Ira Weiny Signed-off-by: Harish Chegondi --- drivers/infiniband/hw/qib/qib_verbs.c | 44 ++------------------------------- 1 files changed, 2 insertions(+), 42 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/hw/qib/qib_verbs.c b/drivers/infiniband/hw/qib/qib_verbs.c index 059ebda..f785680 100644 --- a/drivers/infiniband/hw/qib/qib_verbs.c +++ b/drivers/infiniband/hw/qib/qib_verbs.c @@ -133,16 +133,6 @@ const int ib_qib_state_ops[IB_QPS_ERR + 1] = { QIB_POST_SEND_OK | QIB_FLUSH_SEND, }; -struct qib_ucontext { - struct ib_ucontext ibucontext; -}; - -static inline struct qib_ucontext *to_iucontext(struct ib_ucontext - *ibucontext) -{ - return container_of(ibucontext, struct qib_ucontext, ibucontext); -} - /* * Translate ib_wr_opcode into ib_wc_opcode. */ @@ -1836,36 +1826,6 @@ unsigned qib_get_pkey(struct qib_ibport *ibp, unsigned index) return ret; } -/** - * qib_alloc_ucontext - allocate a ucontest - * @ibdev: the infiniband device - * @udata: not used by the QLogic_IB driver - */ - -static struct ib_ucontext *qib_alloc_ucontext(struct ib_device *ibdev, - struct ib_udata *udata) -{ - struct qib_ucontext *context; - struct ib_ucontext *ret; - - context = kmalloc(sizeof(*context), GFP_KERNEL); - if (!context) { - ret = ERR_PTR(-ENOMEM); - goto bail; - } - - ret = &context->ibucontext; - -bail: - return ret; -} - -static int qib_dealloc_ucontext(struct ib_ucontext *context) -{ - kfree(to_iucontext(context)); - return 0; -} - static void init_ibport(struct qib_pportdata *ppd) { struct qib_verbs_counters cntrs; @@ -2057,8 +2017,8 @@ int qib_register_ib_device(struct qib_devdata *dd) ibdev->modify_port = qib_modify_port; ibdev->query_pkey = NULL; ibdev->query_gid = qib_query_gid; - ibdev->alloc_ucontext = qib_alloc_ucontext; - ibdev->dealloc_ucontext = qib_dealloc_ucontext; + ibdev->alloc_ucontext = NULL; + ibdev->dealloc_ucontext = NULL; ibdev->alloc_pd = NULL; ibdev->dealloc_pd = NULL; ibdev->create_ah = NULL;