Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f52720ca authored by Panagiotis Issaris's avatar Panagiotis Issaris Committed by Linus Torvalds
Browse files

[PATCH] fs: Removing useless casts



* Removing useless casts
* Removing useless wrapper
* Conversion from kmalloc+memset to kzalloc

Signed-off-by: default avatarPanagiotis Issaris <takis@issaris.org>
Acked-by: default avatarDave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f8314dc6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -513,7 +513,7 @@ static int coda_venus_readdir(struct file *filp, filldir_t filldir,
	ino_t ino;
	int ret, i;

	vdir = (struct venus_dirent *)kmalloc(sizeof(*vdir), GFP_KERNEL);
	vdir = kmalloc(sizeof(*vdir), GFP_KERNEL);
	if (!vdir) return -ENOMEM;

	i = filp->f_pos;
+2 −2
Original line number Diff line number Diff line
@@ -89,8 +89,8 @@ ext2_acl_to_disk(const struct posix_acl *acl, size_t *size)
	size_t n;

	*size = ext2_acl_size(acl->a_count);
	ext_acl = (ext2_acl_header *)kmalloc(sizeof(ext2_acl_header) +
		acl->a_count * sizeof(ext2_acl_entry), GFP_KERNEL);
	ext_acl = kmalloc(sizeof(ext2_acl_header) + acl->a_count *
			sizeof(ext2_acl_entry), GFP_KERNEL);
	if (!ext_acl)
		return ERR_PTR(-ENOMEM);
	ext_acl->a_version = cpu_to_le32(EXT2_ACL_VERSION);
+2 −2
Original line number Diff line number Diff line
@@ -90,8 +90,8 @@ ext3_acl_to_disk(const struct posix_acl *acl, size_t *size)
	size_t n;

	*size = ext3_acl_size(acl->a_count);
	ext_acl = (ext3_acl_header *)kmalloc(sizeof(ext3_acl_header) +
		acl->a_count * sizeof(ext3_acl_entry), GFP_KERNEL);
	ext_acl = kmalloc(sizeof(ext3_acl_header) + acl->a_count *
			sizeof(ext3_acl_entry), GFP_KERNEL);
	if (!ext_acl)
		return ERR_PTR(-ENOMEM);
	ext_acl->a_version = cpu_to_le32(EXT3_ACL_VERSION);
+2 −2
Original line number Diff line number Diff line
@@ -439,8 +439,8 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
	if ((err = ext3_reserve_inode_write(handle, inode, &iloc)))
		goto exit_dindj;

	n_group_desc = (struct buffer_head **)kmalloc((gdb_num + 1) *
				sizeof(struct buffer_head *), GFP_KERNEL);
	n_group_desc = kmalloc((gdb_num + 1) * sizeof(struct buffer_head *),
			GFP_KERNEL);
	if (!n_group_desc) {
		err = -ENOMEM;
		ext3_warning (sb, __FUNCTION__,
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ void *hpfs_map_4sectors(struct super_block *s, unsigned secno, struct quad_buffe
		return NULL;
	}

	qbh->data = data = (char *)kmalloc(2048, GFP_NOFS);
	qbh->data = data = kmalloc(2048, GFP_NOFS);
	if (!data) {
		printk("HPFS: hpfs_map_4sectors: out of memory\n");
		goto bail;
Loading