Skip to content

Commit

Permalink
fs/efs/namei.c: return is not a function
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Fabian Frederick authored and torvalds committed Aug 8, 2014
1 parent c119239 commit ca35664
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fs/efs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#include "efs.h"


static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len) {
static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len)
{
struct buffer_head *bh;

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

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

namelen = dirslot->namelen;
Expand All @@ -52,12 +53,12 @@ static efs_ino_t efs_find_entry(struct inode *inode, const char *name, int len)
if ((namelen == len) && (!memcmp(name, nameptr, len))) {
inodenum = be32_to_cpu(dirslot->inode);
brelse(bh);
return(inodenum);
return inodenum;
}
}
brelse(bh);
}
return(0);
return 0;
}

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

0 comments on commit ca35664

Please sign in to comment.