summaryrefslogtreecommitdiffstats
path: root/mm/mempool.c
diff options
context:
space:
mode:
authorFigo.zhang <figo1802@gmail.com>2009-08-08 21:01:22 +0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-08-10 08:31:16 -0700
commit5e2f89b5d5d87a7c3ba19fc85ba0c29adb65f639 (patch)
tree2737536b2183e1d089ef4d83495c75c815c7f448 /mm/mempool.c
parent1392e3b33319fd1a2527bebfc56631c2f2d3c7c5 (diff)
downloadlinux-stable-5e2f89b5d5d87a7c3ba19fc85ba0c29adb65f639.tar.gz
linux-stable-5e2f89b5d5d87a7c3ba19fc85ba0c29adb65f639.tar.bz2
linux-stable-5e2f89b5d5d87a7c3ba19fc85ba0c29adb65f639.zip
mempool.c: clean up type-casting
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>
Diffstat (limited to 'mm/mempool.c')
-rw-r--r--mm/mempool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mempool.c b/mm/mempool.c
index a46eb1b4bb66..32e75d400503 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -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);