Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
[firefly-linux-kernel-4.4.55.git] / fs / fat / fatent.c
index 31f08ab62c562d1926a75183c802793642cd390c..260705c58062cc425b8c656434883de98e1b9e2a 100644 (file)
@@ -186,9 +186,6 @@ static void fat16_ent_put(struct fat_entry *fatent, int new)
 
 static void fat32_ent_put(struct fat_entry *fatent, int new)
 {
-       if (new == FAT_ENT_EOF)
-               new = EOF_FAT32;
-
        WARN_ON(new & 0xf0000000);
        new |= le32_to_cpu(*fatent->u.ent32_p) & ~0x0fffffff;
        *fatent->u.ent32_p = cpu_to_le32(new);
@@ -203,15 +200,18 @@ static int fat12_ent_next(struct fat_entry *fatent)
 
        fatent->entry++;
        if (fatent->nr_bhs == 1) {
-               WARN_ON(ent12_p[0] > (u8 *)(bhs[0]->b_data + (bhs[0]->b_size - 2)));
-               WARN_ON(ent12_p[1] > (u8 *)(bhs[0]->b_data + (bhs[0]->b_size - 1)));
+               WARN_ON(ent12_p[0] > (u8 *)(bhs[0]->b_data +
+                                                       (bhs[0]->b_size - 2)));
+               WARN_ON(ent12_p[1] > (u8 *)(bhs[0]->b_data +
+                                                       (bhs[0]->b_size - 1)));
                if (nextp < (u8 *)(bhs[0]->b_data + (bhs[0]->b_size - 1))) {
                        ent12_p[0] = nextp - 1;
                        ent12_p[1] = nextp;
                        return 1;
                }
        } else {
-               WARN_ON(ent12_p[0] != (u8 *)(bhs[0]->b_data + (bhs[0]->b_size - 1)));
+               WARN_ON(ent12_p[0] != (u8 *)(bhs[0]->b_data +
+                                                       (bhs[0]->b_size - 1)));
                WARN_ON(ent12_p[1] != (u8 *)bhs[1]->b_data);
                ent12_p[0] = nextp - 1;
                ent12_p[1] = nextp;
@@ -631,7 +631,6 @@ error:
 
        return err;
 }
-
 EXPORT_SYMBOL_GPL(fat_free_clusters);
 
 /* 128kb is the whole sectors for FAT12 and FAT16 */