mempool.c: clean up type-casting
authorFigo.zhang <figo1802@gmail.com>
Sat, 8 Aug 2009 13:01:22 +0000 (21:01 +0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 10 Aug 2009 15:31:16 +0000 (08:31 -0700)
clean up type-casting twice.  "size_t" is typedef as "unsigned long" in
64-bit system, and "unsigned int" in 32-bit system, and the intermediate
cast to 'long' is pointless.

Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mempool.c

index a46eb1b4bb661e12a6f752964ad2df190bc763aa..32e75d4005032620e8f9cb9161a8c66f025470bb 100644 (file)
@@ -303,14 +303,14 @@ EXPORT_SYMBOL(mempool_free_slab);
  */
 void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data)
 {
-       size_t size = (size_t)(long)pool_data;
+       size_t size = (size_t)pool_data;
        return kmalloc(size, gfp_mask);
 }
 EXPORT_SYMBOL(mempool_kmalloc);
 
 void *mempool_kzalloc(gfp_t gfp_mask, void *pool_data)
 {
-       size_t size = (size_t) pool_data;
+       size_t size = (size_t)pool_data;
        return kzalloc(size, gfp_mask);
 }
 EXPORT_SYMBOL(mempool_kzalloc);