staging: exfat: cleanup braces for if/else statements
authorValentin Vidic <vvidic@valentin-vidic.from.hr>
Tue, 3 Sep 2019 16:47:32 +0000 (18:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Sep 2019 20:05:51 +0000 (22:05 +0200)
Fixes checkpatch.pl warnings:

  CHECK: Unbalanced braces around else statement
  CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr>
Link: https://lore.kernel.org/r/20190903164732.14194-1-vvidic@valentin-vidic.from.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/exfat/exfat_core.c
drivers/staging/exfat/exfat_super.c

index 46b9f4455da1501bb1f63d8358bc4defa5214947..1246afcffb8deab7c80d3ca5448cbd3e190adb4d 100644 (file)
@@ -743,11 +743,11 @@ static s32 __load_upcase_table(struct super_block *sb, sector_t sector,
                                pr_debug("to 0x%X (amount of 0x%X)\n",
                                         index, uni);
                                skip = FALSE;
-                       } else if (uni == index)
+                       } else if (uni == index) {
                                index++;
-                       else if (uni == 0xFFFF)
+                       } else if (uni == 0xFFFF) {
                                skip = TRUE;
-                       else { /* uni != index , uni != 0xFFFF */
+                       else { /* uni != index , uni != 0xFFFF */
                                u16 col_index = get_col_index(index);
 
                                if (upcase_table[col_index] == NULL) {
@@ -805,11 +805,11 @@ static s32 __load_default_upcase_table(struct super_block *sb)
                        index += uni;
                        pr_debug("to 0x%X (amount of 0x%X)\n", index, uni);
                        skip = FALSE;
-               } else if (uni == index)
+               } else if (uni == index) {
                        index++;
-               else if (uni == 0xFFFF)
+               } else if (uni == 0xFFFF) {
                        skip = TRUE;
-               else { /* uni != index , uni != 0xFFFF */
+               else { /* uni != index , uni != 0xFFFF */
                        u16 col_index = get_col_index(index);
 
                        if (upcase_table[col_index] == NULL) {
index 881cd85cf677abb8fc4cd717eb1b0e63acfe5a23..e44b860e35e8539b259b0eeda24dc882bbc76fc1 100644 (file)
@@ -344,8 +344,10 @@ static int exfat_cmpi(const struct dentry *dentry, unsigned int len,
                if (t == NULL) {
                        if (strncasecmp(name->name, str, alen) == 0)
                                return 0;
-               } else if (nls_strnicmp(t, name->name, str, alen) == 0)
-                       return 0;
+               } else {
+                       if (nls_strnicmp(t, name->name, str, alen) == 0)
+                               return 0;
+               }
        }
        return 1;
 }
@@ -999,7 +1001,7 @@ static int ffsWriteFile(struct inode *inode, struct file_id_t *fid,
                                                                   &new_clu);
                        if (num_alloced == 0)
                                break;
-                       else if (num_alloced < 0) {
+                       if (num_alloced < 0) {
                                ret = FFS_MEDIAERR;
                                goto out;
                        }
@@ -1248,9 +1250,9 @@ static int ffsTruncateFile(struct inode *inode, u64 old_size, u64 new_size)
                p_fs->fs_func->set_entry_clu0(ep2, CLUSTER_32(0));
        }
 
-       if (p_fs->vol_type != EXFAT)
+       if (p_fs->vol_type != EXFAT) {
                buf_modify(sb, sector);
-       else {
+       else {
                update_dir_checksum_with_entry_set(sb, es);
                release_entry_set(es);
        }
@@ -1561,9 +1563,9 @@ static int ffsSetAttr(struct inode *inode, u32 attr)
        fid->attr = attr;
        p_fs->fs_func->set_entry_attr(ep, attr);
 
-       if (p_fs->vol_type != EXFAT)
+       if (p_fs->vol_type != EXFAT) {
                buf_modify(sb, sector);
-       else {
+       else {
                update_dir_checksum_with_entry_set(sb, es);
                release_entry_set(es);
        }