diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 20:03:00 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 20:03:00 -0800 |
| commit | 32a92f8c89326985e05dce8b22d3f0aa07a3e1bd (patch) | |
| tree | 65f84985b9ed2d5cf3c5243aca78d9428e25c312 /fs/jffs2/summary.c | |
| parent | 323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff) | |
Convert more 'alloc_obj' cases to default GFP_KERNEL argumentsHEADtorvalds/mastertorvalds/HEADmaster
This converts some of the visually simpler cases that have been split
over multiple lines. I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.
Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script. I probably had made it a bit _too_ trivial.
So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.
The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jffs2/summary.c')
| -rw-r--r-- | fs/jffs2/summary.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c index d0b689ee8d32..4521a7723f30 100644 --- a/fs/jffs2/summary.c +++ b/fs/jffs2/summary.c @@ -115,8 +115,7 @@ int jffs2_sum_add_padding_mem(struct jffs2_summary *s, uint32_t size) int jffs2_sum_add_inode_mem(struct jffs2_summary *s, struct jffs2_raw_inode *ri, uint32_t ofs) { - struct jffs2_sum_inode_mem *temp = kmalloc_obj(struct jffs2_sum_inode_mem, - GFP_KERNEL); + struct jffs2_sum_inode_mem *temp = kmalloc_obj(struct jffs2_sum_inode_mem); if (!temp) return -ENOMEM; @@ -264,8 +263,7 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs, switch (je16_to_cpu(node->u.nodetype)) { case JFFS2_NODETYPE_INODE: { struct jffs2_sum_inode_mem *temp = - kmalloc_obj(struct jffs2_sum_inode_mem, - GFP_KERNEL); + kmalloc_obj(struct jffs2_sum_inode_mem); if (!temp) goto no_mem; @@ -316,8 +314,7 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs, #ifdef CONFIG_JFFS2_FS_XATTR case JFFS2_NODETYPE_XATTR: { struct jffs2_sum_xattr_mem *temp; - temp = kmalloc_obj(struct jffs2_sum_xattr_mem, - GFP_KERNEL); + temp = kmalloc_obj(struct jffs2_sum_xattr_mem); if (!temp) goto no_mem; @@ -332,8 +329,7 @@ int jffs2_sum_add_kvec(struct jffs2_sb_info *c, const struct kvec *invecs, } case JFFS2_NODETYPE_XREF: { struct jffs2_sum_xref_mem *temp; - temp = kmalloc_obj(struct jffs2_sum_xref_mem, - GFP_KERNEL); + temp = kmalloc_obj(struct jffs2_sum_xref_mem); if (!temp) goto no_mem; temp->nodetype = node->r.nodetype; |
