From patchwork Mon Sep 21 11:43:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 7229351 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 414EB9F380 for ; Mon, 21 Sep 2015 11:44:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7661C20765 for ; Mon, 21 Sep 2015 11:44:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3185D2070E for ; Mon, 21 Sep 2015 11:44:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751740AbbIULoy (ORCPT ); Mon, 21 Sep 2015 07:44:54 -0400 Received: from m12-11.163.com ([220.181.12.11]:37606 "EHLO m12-11.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbbIULox (ORCPT ); Mon, 21 Sep 2015 07:44:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=U3NO7shIiWVZoA7kKn y7Vflonu6mxzcYgILJ8z93hqk=; b=BsX92JJFpYW4wqkTtDi0Kc0SQXMobeFiRl 0xTu1UicvNZcKdLBr23OGE7BZDlNIDqwCJYLDAeL0oKcOKvp0IS+7s5dH2NGCbIb ziDtwGdFma2n12x8FIEY3jR+/0vRYlRnEGowytObpJBB+9pqET2HX8vUYXCGJs3o oIucVqUe8= Received: from localhost (unknown [218.17.162.133]) by smtp7 (Coremail) with SMTP id C8CowECpYENj7f9VXJchCg--.1065S3; Mon, 21 Sep 2015 19:43:33 +0800 (CST) From: Geliang Tang To: Mike Marciniszyn , Doug Ledford , Sean Hefty , Hal Rosenstock , Greg Kroah-Hartman Cc: Geliang Tang , linux-rdma@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] IB/hfi1: use kvfree() in sdma.c Date: Mon, 21 Sep 2015 04:43:05 -0700 Message-Id: <9ab0afd682cc1b3919ef926aa9086eb09c9f90e9.1442864311.git.geliangtang@163.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: C8CowECpYENj7f9VXJchCg--.1065S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7XF13Kr4DWr4DZry7ZFWUurg_yoW3GFc_uF Wktr1xW3sFyFySkw1DuFWUAry2van5Xwsayr1jga95Zr45Za98t39rZr4rJ3srJa13Gr9x Crs5Wr13Kr12yjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUjUDG7UUUUU== X-Originating-IP: [218.17.162.133] X-CM-SenderInfo: 5jhoxtpqjwt0rj6rljoofrz/1tbiNQZ8mVSII8iMRwAAsq 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, 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 Use kvfree() instead of open-coding it. Signed-off-by: Geliang Tang Acked-by: Mike Marciniszyn --- drivers/staging/rdma/hfi1/sdma.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c index aecd1a7..9c02a3d 100644 --- a/drivers/staging/rdma/hfi1/sdma.c +++ b/drivers/staging/rdma/hfi1/sdma.c @@ -966,10 +966,7 @@ static void sdma_clean(struct hfi1_devdata *dd, size_t num_engines) sde->descq = NULL; sde->descq_phys = 0; } - if (is_vmalloc_addr(sde->tx_ring)) - vfree(sde->tx_ring); - else - kfree(sde->tx_ring); + kvfree(sde->tx_ring); sde->tx_ring = NULL; } spin_lock_irq(&dd->sde_map_lock);