diff options
Diffstat (limited to 'fs/jffs')
-rw-r--r-- | fs/jffs/inode-v23.c | 4 | ||||
-rw-r--r-- | fs/jffs/intrep.c | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c index 7b40c69f44eb..43baa1afa021 100644 --- a/fs/jffs/inode-v23.c +++ b/fs/jffs/inode-v23.c | |||
@@ -818,7 +818,7 @@ jffs_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
818 | 818 | ||
819 | D1({ | 819 | D1({ |
820 | int len = dentry->d_name.len; | 820 | int len = dentry->d_name.len; |
821 | char *_name = (char *) kmalloc(len + 1, GFP_KERNEL); | 821 | char *_name = kmalloc(len + 1, GFP_KERNEL); |
822 | memcpy(_name, dentry->d_name.name, len); | 822 | memcpy(_name, dentry->d_name.name, len); |
823 | _name[len] = '\0'; | 823 | _name[len] = '\0'; |
824 | printk("***jffs_mkdir(): dir = 0x%p, name = \"%s\", " | 824 | printk("***jffs_mkdir(): dir = 0x%p, name = \"%s\", " |
@@ -964,7 +964,7 @@ jffs_remove(struct inode *dir, struct dentry *dentry, int type) | |||
964 | D1({ | 964 | D1({ |
965 | int len = dentry->d_name.len; | 965 | int len = dentry->d_name.len; |
966 | const char *name = dentry->d_name.name; | 966 | const char *name = dentry->d_name.name; |
967 | char *_name = (char *) kmalloc(len + 1, GFP_KERNEL); | 967 | char *_name = kmalloc(len + 1, GFP_KERNEL); |
968 | memcpy(_name, name, len); | 968 | memcpy(_name, name, len); |
969 | _name[len] = '\0'; | 969 | _name[len] = '\0'; |
970 | printk("***jffs_remove(): file = \"%s\", ino = %ld\n", _name, dentry->d_inode->i_ino); | 970 | printk("***jffs_remove(): file = \"%s\", ino = %ld\n", _name, dentry->d_inode->i_ino); |
diff --git a/fs/jffs/intrep.c b/fs/jffs/intrep.c index d0e783f199ea..6dd18911b44c 100644 --- a/fs/jffs/intrep.c +++ b/fs/jffs/intrep.c | |||
@@ -436,7 +436,7 @@ jffs_checksum_flash(struct mtd_info *mtd, loff_t start, int size, __u32 *result) | |||
436 | int i, length; | 436 | int i, length; |
437 | 437 | ||
438 | /* Allocate read buffer */ | 438 | /* Allocate read buffer */ |
439 | read_buf = (__u8 *) kmalloc (sizeof(__u8) * 4096, GFP_KERNEL); | 439 | read_buf = kmalloc(sizeof(__u8) * 4096, GFP_KERNEL); |
440 | if (!read_buf) { | 440 | if (!read_buf) { |
441 | printk(KERN_NOTICE "kmalloc failed in jffs_checksum_flash()\n"); | 441 | printk(KERN_NOTICE "kmalloc failed in jffs_checksum_flash()\n"); |
442 | return -ENOMEM; | 442 | return -ENOMEM; |
@@ -744,11 +744,11 @@ static int check_partly_erased_sectors(struct jffs_fmcontrol *fmc){ | |||
744 | 744 | ||
745 | 745 | ||
746 | /* Allocate read buffers */ | 746 | /* Allocate read buffers */ |
747 | read_buf1 = (__u8 *) kmalloc (sizeof(__u8) * READ_AHEAD_BYTES, GFP_KERNEL); | 747 | read_buf1 = kmalloc(sizeof(__u8) * READ_AHEAD_BYTES, GFP_KERNEL); |
748 | if (!read_buf1) | 748 | if (!read_buf1) |
749 | return -ENOMEM; | 749 | return -ENOMEM; |
750 | 750 | ||
751 | read_buf2 = (__u8 *) kmalloc (sizeof(__u8) * READ_AHEAD_BYTES, GFP_KERNEL); | 751 | read_buf2 = kmalloc(sizeof(__u8) * READ_AHEAD_BYTES, GFP_KERNEL); |
752 | if (!read_buf2) { | 752 | if (!read_buf2) { |
753 | kfree(read_buf1); | 753 | kfree(read_buf1); |
754 | return -ENOMEM; | 754 | return -ENOMEM; |
@@ -876,7 +876,7 @@ jffs_scan_flash(struct jffs_control *c) | |||
876 | } | 876 | } |
877 | 877 | ||
878 | /* Allocate read buffer */ | 878 | /* Allocate read buffer */ |
879 | read_buf = (__u8 *) kmalloc (sizeof(__u8) * 4096, GFP_KERNEL); | 879 | read_buf = kmalloc(sizeof(__u8) * 4096, GFP_KERNEL); |
880 | if (!read_buf) { | 880 | if (!read_buf) { |
881 | flash_safe_release(fmc->mtd); | 881 | flash_safe_release(fmc->mtd); |
882 | return -ENOMEM; | 882 | return -ENOMEM; |
@@ -1463,7 +1463,7 @@ jffs_insert_node(struct jffs_control *c, struct jffs_file *f, | |||
1463 | kfree(f->name); | 1463 | kfree(f->name); |
1464 | DJM(no_name--); | 1464 | DJM(no_name--); |
1465 | } | 1465 | } |
1466 | if (!(f->name = (char *) kmalloc(raw_inode->nsize + 1, | 1466 | if (!(f->name = kmalloc(raw_inode->nsize + 1, |
1467 | GFP_KERNEL))) { | 1467 | GFP_KERNEL))) { |
1468 | return -ENOMEM; | 1468 | return -ENOMEM; |
1469 | } | 1469 | } |
@@ -1737,7 +1737,7 @@ jffs_find_child(struct jffs_file *dir, const char *name, int len) | |||
1737 | printk("jffs_find_child(): Found \"%s\".\n", f->name); | 1737 | printk("jffs_find_child(): Found \"%s\".\n", f->name); |
1738 | } | 1738 | } |
1739 | else { | 1739 | else { |
1740 | char *copy = (char *) kmalloc(len + 1, GFP_KERNEL); | 1740 | char *copy = kmalloc(len + 1, GFP_KERNEL); |
1741 | if (copy) { | 1741 | if (copy) { |
1742 | memcpy(copy, name, len); | 1742 | memcpy(copy, name, len); |
1743 | copy[len] = '\0'; | 1743 | copy[len] = '\0'; |
@@ -2627,7 +2627,7 @@ jffs_print_tree(struct jffs_file *first_file, int indent) | |||
2627 | return; | 2627 | return; |
2628 | } | 2628 | } |
2629 | 2629 | ||
2630 | if (!(space = (char *) kmalloc(indent + 1, GFP_KERNEL))) { | 2630 | if (!(space = kmalloc(indent + 1, GFP_KERNEL))) { |
2631 | printk("jffs_print_tree(): Out of memory!\n"); | 2631 | printk("jffs_print_tree(): Out of memory!\n"); |
2632 | return; | 2632 | return; |
2633 | } | 2633 | } |