Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1229235 > unrolled thread

[PATCH] IB/hfi1: use kvfree() in sdma.c

Started byGeliang Tang <geliangtang@163.com>
First post2015-09-21 13:50 +0200
Last post2015-09-21 15:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] IB/hfi1: use kvfree() in sdma.c Geliang Tang <geliangtang@163.com> - 2015-09-21 13:50 +0200
    RE: [PATCH] IB/hfi1: use kvfree() in sdma.c "Marciniszyn, Mike" <mike.marciniszyn@intel.com> - 2015-09-21 15:30 +0200

#1229235 — [PATCH] IB/hfi1: use kvfree() in sdma.c

FromGeliang Tang <geliangtang@163.com>
Date2015-09-21 13:50 +0200
Subject[PATCH] IB/hfi1: use kvfree() in sdma.c
Message-ID<qb7LA-5yk-11@gated-at.bofh.it>
Use kvfree() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 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);
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1229310

From"Marciniszyn, Mike" <mike.marciniszyn@intel.com>
Date2015-09-21 15:30 +0200
Message-ID<qb9km-7Sv-9@gated-at.bofh.it>
In reply to#1229235
> Subject: [PATCH] IB/hfi1: use kvfree() in sdma.c
> 
> Use kvfree() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
>  drivers/staging/rdma/hfi1/sdma.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

Thanks for the patch.

Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web