diff options
author | Julia Lawall <julia@diku.dk> | 2010-05-11 14:28:14 -0400 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-05-18 15:31:10 -0400 |
commit | 3914ed0cec6532ab4feb202424fc95ad05024497 (patch) | |
tree | 034377b0e2cf83e3a6fca5883ea8e4e5191a469a /fs/ocfs2/dlm/dlmlock.c | |
parent | c1631d4a484fbb498e35d661f1aebd64c86b66bf (diff) |
fs/ocfs2/dlm: Drop memory allocation cast
Drop cast on the result of kmalloc and similar functions.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
@@
- (T *)
(\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...))
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmlock.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmlock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c index f1fba2a6a8fe..69cf369961c4 100644 --- a/fs/ocfs2/dlm/dlmlock.c +++ b/fs/ocfs2/dlm/dlmlock.c | |||
@@ -431,7 +431,7 @@ struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, | |||
431 | struct dlm_lock *lock; | 431 | struct dlm_lock *lock; |
432 | int kernel_allocated = 0; | 432 | int kernel_allocated = 0; |
433 | 433 | ||
434 | lock = (struct dlm_lock *) kmem_cache_zalloc(dlm_lock_cache, GFP_NOFS); | 434 | lock = kmem_cache_zalloc(dlm_lock_cache, GFP_NOFS); |
435 | if (!lock) | 435 | if (!lock) |
436 | return NULL; | 436 | return NULL; |
437 | 437 | ||