Skip to content

Commit ca35664

Browse files
Fabian Fredericktorvalds
Fabian Frederick
authored andcommitted
fs/efs/namei.c: return is not a function
Fix checkpatch errors: "ERROR: return is not a function, parentheses are not required" Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent c119239 commit ca35664

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

fs/efs/namei.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
#include "efs.h"
1313

1414

15-
static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len) {
15+
static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len)
16+
{
1617
struct buffer_head *bh;
1718

1819
int slot, namelen;
@@ -40,10 +41,10 @@ static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len)
4041
if (be16_to_cpu(dirblock->magic) != EFS_DIRBLK_MAGIC) {
4142
pr_err("%s(): invalid directory block\n", __func__);
4243
brelse(bh);
43-
return(0);
44+
return 0;
4445
}
4546

46-
for(slot = 0; slot < dirblock->slots; slot++) {
47+
for (slot = 0; slot < dirblock->slots; slot++) {
4748
dirslot = (struct efs_dentry *) (((char *) bh->b_data) + EFS_SLOTAT(dirblock, slot));
4849

4950
namelen = dirslot->namelen;
@@ -52,12 +53,12 @@ static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len)
5253
if ((namelen == len) && (!memcmp(name, nameptr, len))) {
5354
inodenum = be32_to_cpu(dirslot->inode);
5455
brelse(bh);
55-
return(inodenum);
56+
return inodenum;
5657
}
5758
}
5859
brelse(bh);
5960
}
60-
return(0);
61+
return 0;
6162
}
6263

6364
struct dentry *efs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)

0 commit comments

Comments
 (0)