Skip to content

Commit c00e452

Browse files
ISCAS-Vulabidryomov
authored andcommitted
ceph: remove unnecessary cast in kfree()
Remove unnecassary casts in the argument to kfree. Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1 parent 042f649 commit c00e452

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

fs/ceph/xattr.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,10 @@ static int __set_xattr(struct ceph_inode_info *ci,
497497
kfree(*newxattr);
498498
*newxattr = NULL;
499499
if (xattr->should_free_val)
500-
kfree((void *)xattr->val);
500+
kfree(xattr->val);
501501

502502
if (update_xattr) {
503-
kfree((void *)name);
503+
kfree(name);
504504
name = xattr->name;
505505
}
506506
ci->i_xattrs.names_size -= xattr->name_len;
@@ -566,9 +566,9 @@ static void __free_xattr(struct ceph_inode_xattr *xattr)
566566
BUG_ON(!xattr);
567567

568568
if (xattr->should_free_name)
569-
kfree((void *)xattr->name);
569+
kfree(xattr->name);
570570
if (xattr->should_free_val)
571-
kfree((void *)xattr->val);
571+
kfree(xattr->val);
572572

573573
kfree(xattr);
574574
}
@@ -582,9 +582,9 @@ static int __remove_xattr(struct ceph_inode_info *ci,
582582
rb_erase(&xattr->node, &ci->i_xattrs.index);
583583

584584
if (xattr->should_free_name)
585-
kfree((void *)xattr->name);
585+
kfree(xattr->name);
586586
if (xattr->should_free_val)
587-
kfree((void *)xattr->val);
587+
kfree(xattr->val);
588588

589589
ci->i_xattrs.names_size -= xattr->name_len;
590590
ci->i_xattrs.vals_size -= xattr->val_len;

0 commit comments

Comments
 (0)