From: Sukadev Bhattiprolu Date: Wed, 10 Dec 2014 06:43:34 +0000 (-0500) Subject: power/perf/hv-24x7: Use kmem_cache_free() instead of kfree X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=ec2aef5a8d3c14272f7a2d29b34f1f8e71f2be5b;p=openwrt%2Fstaging%2Fblogic.git power/perf/hv-24x7: Use kmem_cache_free() instead of kfree Use kmem_cache_free() to free a buffer allocated with kmem_cache_alloc(). Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c index d073e0679a0c..f162d0b8eea3 100644 --- a/arch/powerpc/perf/hv-24x7.c +++ b/arch/powerpc/perf/hv-24x7.c @@ -177,7 +177,7 @@ static ssize_t _name##_show(struct device *dev, \ } \ ret = sprintf(buf, _fmt, _expr); \ e_free: \ - kfree(page); \ + kmem_cache_free(hv_page_cache, page); \ return ret; \ } \ static DEVICE_ATTR_RO(_name)