From patchwork Wed Oct 23 06:53:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 3086181 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C5A839F2B7 for ; Wed, 23 Oct 2013 06:53:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD39A202B8 for ; Wed, 23 Oct 2013 06:53:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D5E1202C1 for ; Wed, 23 Oct 2013 06:53:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751390Ab3JWGxf (ORCPT ); Wed, 23 Oct 2013 02:53:35 -0400 Received: from mail-ea0-f181.google.com ([209.85.215.181]:64010 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751051Ab3JWGxe (ORCPT ); Wed, 23 Oct 2013 02:53:34 -0400 Received: by mail-ea0-f181.google.com with SMTP id d10so168897eaj.40 for ; Tue, 22 Oct 2013 23:53:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZR3Rqs7anaMkzF6yyErxbvaMsQIYdoIgA9NlFKUkjrg=; b=KYRI8LkvELzucX42AfaBEdsajW33ZrBrun5u4AIepK2FRsVYQ89sA4+AQ3YJBmaB7+ xihYxVFidKC2U0783tB05IRAZQd7k4J29u3NtDt/UOIfClz7MIrQeaQOxbvQXTD56cN8 4Zwg6ndhXJjavm/1NVfMHoUacWxPHaKeuFs/qHd99xP/7N0SskTMKSO1y8GPWDbYO3l8 7ZNja4FKr/ENhhGTxji/j0ShU0MgSU72VUaECoUEWzCFLljhjvUc9HuAmbBvUQUjnH1y sQL41I+TpTaNCexmnIUNdA1tEGtkOZe4vRenwwslVBdXff+LiuDwApevbPJfOIFbCXLN bmVQ== X-Gm-Message-State: ALoCoQmrmW74WJdbq/LkdR1BoXjwhlSw5DzPhsbBHR3Z4x+pNacXqpJALdCzDuDIL73DJVTHJEW6 X-Received: by 10.15.54.2 with SMTP id s2mr166771eew.139.1382511213831; Tue, 22 Oct 2013 23:53:33 -0700 (PDT) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPSA id u46sm66182359eep.17.2013.10.22.23.53.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 22 Oct 2013 23:53:33 -0700 (PDT) From: Eli Cohen To: roland@kernel.org Cc: linux-rdma@vger.kernel.org, amirv@mellanox.com, ogerlitz@mellanox.com, yevgenyp@mellanox.com, Eli Cohen Subject: [PATCH for-next 4/9] IB/mlx5: Simplify mlx5_ib_destroy_srq Date: Wed, 23 Oct 2013 09:53:16 +0300 Message-Id: <1382511201-7061-5-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1382511201-7061-1-git-send-email-eli@mellanox.com> References: <1382511201-7061-1-git-send-email-eli@mellanox.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Make use of destroy_srq_kernel() to clear SRQ resouces. Signed-off-by: Eli Cohen --- drivers/infiniband/hw/mlx5/srq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/srq.c b/drivers/infiniband/hw/mlx5/srq.c index 0aa478b..f1e5845 100644 --- a/drivers/infiniband/hw/mlx5/srq.c +++ b/drivers/infiniband/hw/mlx5/srq.c @@ -390,9 +390,7 @@ int mlx5_ib_destroy_srq(struct ib_srq *srq) mlx5_ib_db_unmap_user(to_mucontext(srq->uobject->context), &msrq->db); ib_umem_release(msrq->umem); } else { - kfree(msrq->wrid); - mlx5_buf_free(&dev->mdev, &msrq->buf); - mlx5_db_free(&dev->mdev, &msrq->db); + destroy_srq_kernel(dev, msrq); } kfree(srq);