staging: erofs: remove redundant braces in inode.c
authorGao Xiang <gaoxiang25@huawei.com>
Wed, 31 Jul 2019 15:57:46 +0000 (23:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2019 11:52:07 +0000 (13:52 +0200)
Remove redundant braces in inode.c
since these are all single statements.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190731155752.210602-17-gaoxiang25@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/erofs/inode.c

index c13d66ccc74ab23ca8133d5c714a78c21e816ce6..2867291433657284f5d8c49bed512307f77762cb 100644 (file)
@@ -35,16 +35,15 @@ static int read_inode(struct inode *inode, void *data)
 
                inode->i_mode = le16_to_cpu(v2->i_mode);
                if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
-                   S_ISLNK(inode->i_mode)) {
+                   S_ISLNK(inode->i_mode))
                        vi->raw_blkaddr = le32_to_cpu(v2->i_u.raw_blkaddr);
-               } else if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) {
+               else if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
                        inode->i_rdev =
                                new_decode_dev(le32_to_cpu(v2->i_u.rdev));
-               } else if (S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) {
+               else if (S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode))
                        inode->i_rdev = 0;
-               } else {
+               else
                        return -EIO;
-               }
 
                i_uid_write(inode, le32_to_cpu(v2->i_uid));
                i_gid_write(inode, le32_to_cpu(v2->i_gid));
@@ -69,16 +68,15 @@ static int read_inode(struct inode *inode, void *data)
 
                inode->i_mode = le16_to_cpu(v1->i_mode);
                if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
-                   S_ISLNK(inode->i_mode)) {
+                   S_ISLNK(inode->i_mode))
                        vi->raw_blkaddr = le32_to_cpu(v1->i_u.raw_blkaddr);
-               } else if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) {
+               else if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode))
                        inode->i_rdev =
                                new_decode_dev(le32_to_cpu(v1->i_u.rdev));
-               } else if (S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) {
+               else if (S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode))
                        inode->i_rdev = 0;
-               } else {
+               else
                        return -EIO;
-               }
 
                i_uid_write(inode, le16_to_cpu(v1->i_uid));
                i_gid_write(inode, le16_to_cpu(v1->i_gid));