lkml.org 
[lkml]   [2012]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/6] zsmalloc: remove unnecessary type casting
Date
Let's remove unnecessary type casting of (void *).

Signed-off-by: Minchan Kim <minchan@kernel.org>
---
drivers/staging/zsmalloc/zsmalloc-main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b/drivers/staging/zsmalloc/zsmalloc-main.c
index b7d31cc..ff089f8 100644
--- a/drivers/staging/zsmalloc/zsmalloc-main.c
+++ b/drivers/staging/zsmalloc/zsmalloc-main.c
@@ -644,8 +644,7 @@ void zs_free(struct zs_pool *pool, void *obj)
spin_lock(&class->lock);

/* Insert this object in containing zspage's freelist */
- link = (struct link_free *)((unsigned char *)kmap_atomic(f_page)
- + f_offset);
+ link = (struct link_free *)(kmap_atomic(f_page) + f_offset);
link->next = first_page->freelist;
kunmap_atomic(link);
first_page->freelist = obj;
--
1.7.9.5


\
 
 \ /
  Last update: 2012-04-25 08:29    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site