diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-09-27 04:49:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-27 11:26:10 -0400 |
commit | f52720ca5f48574e347dff35ffe6b389ace61537 (patch) | |
tree | 7efc8ec6bad32b98e406a5c553149d57e46bd07e /fs/jffs/inode-v23.c | |
parent | f8314dc60ccba7e41f425048c4160dc7f63377d5 (diff) |
[PATCH] fs: Removing useless casts
* Removing useless casts
* Removing useless wrapper
* Conversion from kmalloc+memset to kzalloc
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Acked-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/jffs/inode-v23.c')
-rw-r--r-- | fs/jffs/inode-v23.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/jffs/inode-v23.c b/fs/jffs/inode-v23.c index 93068697a9bf..b59553d28d13 100644 --- a/fs/jffs/inode-v23.c +++ b/fs/jffs/inode-v23.c | |||
@@ -652,7 +652,7 @@ jffs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) | |||
652 | lock_kernel(); | 652 | lock_kernel(); |
653 | 653 | ||
654 | D3({ | 654 | D3({ |
655 | char *s = (char *)kmalloc(len + 1, GFP_KERNEL); | 655 | char *s = kmalloc(len + 1, GFP_KERNEL); |
656 | memcpy(s, name, len); | 656 | memcpy(s, name, len); |
657 | s[len] = '\0'; | 657 | s[len] = '\0'; |
658 | printk("jffs_lookup(): dir: 0x%p, name: \"%s\"\n", dir, s); | 658 | printk("jffs_lookup(): dir: 0x%p, name: \"%s\"\n", dir, s); |
@@ -1173,8 +1173,8 @@ jffs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) | |||
1173 | lock_kernel(); | 1173 | lock_kernel(); |
1174 | D1({ | 1174 | D1({ |
1175 | int len = dentry->d_name.len; | 1175 | int len = dentry->d_name.len; |
1176 | char *_name = (char *)kmalloc(len + 1, GFP_KERNEL); | 1176 | char *_name = kmalloc(len + 1, GFP_KERNEL); |
1177 | char *_symname = (char *)kmalloc(symname_len + 1, GFP_KERNEL); | 1177 | char *_symname = kmalloc(symname_len + 1, GFP_KERNEL); |
1178 | memcpy(_name, dentry->d_name.name, len); | 1178 | memcpy(_name, dentry->d_name.name, len); |
1179 | _name[len] = '\0'; | 1179 | _name[len] = '\0'; |
1180 | memcpy(_symname, symname, symname_len); | 1180 | memcpy(_symname, symname, symname_len); |
@@ -1282,7 +1282,7 @@ jffs_create(struct inode *dir, struct dentry *dentry, int mode, | |||
1282 | lock_kernel(); | 1282 | lock_kernel(); |
1283 | D1({ | 1283 | D1({ |
1284 | int len = dentry->d_name.len; | 1284 | int len = dentry->d_name.len; |
1285 | char *s = (char *)kmalloc(len + 1, GFP_KERNEL); | 1285 | char *s = kmalloc(len + 1, GFP_KERNEL); |
1286 | memcpy(s, dentry->d_name.name, len); | 1286 | memcpy(s, dentry->d_name.name, len); |
1287 | s[len] = '\0'; | 1287 | s[len] = '\0'; |
1288 | printk("jffs_create(): dir: 0x%p, name: \"%s\"\n", dir, s); | 1288 | printk("jffs_create(): dir: 0x%p, name: \"%s\"\n", dir, s); |