Style fixes in multiple modules
authorgkostka <kostka.grzegorz@gmail.com>
Mon, 7 Dec 2015 17:54:08 +0000 (18:54 +0100)
committergkostka <kostka.grzegorz@gmail.com>
Mon, 7 Dec 2015 17:54:08 +0000 (18:54 +0100)
lwext4/ext4_blockdev.c
lwext4/ext4_debug.h
lwext4/ext4_dir_idx.c
lwext4/ext4_extent.c
lwext4/ext4_fs.c
lwext4/ext4_ialloc.c

index 8ad251b042d79b9908869b9522a8567e08c524a0..069841305cce88eb5c8caee0a5defd1f601e57c6 100644 (file)
@@ -117,7 +117,7 @@ int ext4_block_cache_shake(struct ext4_blockdev *bdev)
        struct ext4_buf *buf;
        while (!RB_EMPTY(&bdev->bc->lru_root) &&
                ext4_bcache_is_full(bdev->bc)) {
-               
+
                buf = ext4_buf_lowest_lru(bdev->bc);
                ext4_assert(buf);
                if (ext4_bcache_test_flag(buf, BC_DIRTY)) {
@@ -384,7 +384,7 @@ int ext4_block_cache_write_back(struct ext4_blockdev *bdev, uint8_t on_off)
 
        /*Flush all delayed cache blocks*/
        while (!SLIST_EMPTY(&bdev->bc->dirty_list)) {
-               
+
                buf = SLIST_FIRST(&bdev->bc->dirty_list);
                ext4_assert(buf);
                r = ext4_block_flush_buf(bdev, buf);
index aec4dcf4459f3ace5eb25e92724e70d5f691a906..4c69a4e3e83c15270ed63489c2f47e2a4916909f 100644 (file)
@@ -157,19 +157,19 @@ uint32_t ext4_dmask_get(void);
 
 #if CONFIG_DEBUG_ASSERT
 /**@brief   Debug assertion.*/
- #if CONFIG_HAVE_OWN_ASSERT
- #define ext4_assert(_v)                                                       \
-       do {                                                                   \
-               if (!(_v)) {                                                   \
-                       printf("assertion failed:\nfile: %s\nline: %d\n",      \
-                              __FILE__, __LINE__);                            \
-                              while (1)                                       \
-                                      ;                                       \
-               }                                                              \
-       } while (0)
- #else
- #define ext4_assert(_v) assert(_v)
- #endif
+#if CONFIG_HAVE_OWN_ASSERT
+#define ext4_assert(_v)                                                        \
+       do {                                                                   \
+               if (!(_v)) {                                                   \
+                       printf("assertion failed:\nfile: %s\nline: %d\n",      \
+                              __FILE__, __LINE__);                            \
+                              while (1)                                       \
+                                      ;                                       \
+               }                                                              \
+       } while (0)
+#else
+#define ext4_assert(_v) assert(_v)
+#endif
 #else
 #define ext4_assert(_v)
 #endif
index 830b73cf696a2fc5396f05ff18a57c0900bca2fa..1b78905c1d2d0d5e2095c1213510906b46d43386 100644 (file)
@@ -205,7 +205,7 @@ static int ext4_dir_dx_hash_string(struct ext4_hash_info *hinfo, int len,
 #if CONFIG_META_CSUM_ENABLE
 static uint32_t ext4_dir_dx_checksum(struct ext4_inode_ref *inode_ref, void *de,
                                     int count_offset, int count,
-                                    struct ext4_dir_idx_tail *t)
+                                    struct ext4_dir_idx_tail *t)
 {
        uint32_t orig_cum, csum = 0;
        struct ext4_sblock *sb = &inode_ref->fs->sb;
@@ -1203,8 +1203,8 @@ ext4_dir_dx_split_index(struct ext4_inode_ref *ino_ref,
                        /* Finally insert new entry */
                        ext4_dir_dx_insert_entry(ino_ref, dx_blks, hash_right,
                                                 new_iblk);
-                       ext4_dir_set_dx_csum(ino_ref, (void *)dx_blks[0].b.data);
-                       ext4_dir_set_dx_csum(ino_ref, (void *)dx_blks[1].b.data);
+                       ext4_dir_set_dx_csum(ino_ref, (void*)dx_blks[0].b.data);
+                       ext4_dir_set_dx_csum(ino_ref, (void*)dx_blks[1].b.data);
                        ext4_bcache_set_dirty(dx_blks[0].b.buf);
                        ext4_bcache_set_dirty(dx_blks[1].b.buf);
 
@@ -1239,8 +1239,8 @@ ext4_dir_dx_split_index(struct ext4_inode_ref *ino_ref,
                        dxb->b = b;
                        *new_dx_block = dxb;
 
-                       ext4_dir_set_dx_csum(ino_ref, (void *)dx_blks[0].b.data);
-                       ext4_dir_set_dx_csum(ino_ref, (void *)dx_blks[1].b.data);
+                       ext4_dir_set_dx_csum(ino_ref, (void*)dx_blks[0].b.data);
+                       ext4_dir_set_dx_csum(ino_ref, (void*)dx_blks[1].b.data);
                        ext4_bcache_set_dirty(dx_blks[0].b.buf);
                        ext4_bcache_set_dirty(dx_blks[1].b.buf);
                }
index a356518d3dbf63c5fd28c3b12e8e8776e6d2fcb1..d6f373bb0f5846afc3ed4cf1f539a3ecbcb8c7ba 100644 (file)
@@ -90,7 +90,7 @@ static uint32_t ext4_ext_block_csum(struct ext4_inode_ref *inode_ref,
                                     sizeof(ino_index));
                checksum = ext4_crc32c(checksum, &ino_gen,
                                     sizeof(ino_gen));
-               /* Finally calculate crc32 checksum against 
+               /* Finally calculate crc32 checksum against
                 * the entire extent block up to the checksum field */
                checksum = ext4_crc32c(checksum, eh,
                                EXT4_EXTENT_TAIL_OFFSET(eh));
index edc87ad4e0a44cf5f0a4e1d7427d0602ce9798a9..725083967bc9e8f0be768b73f3999491e0425f31 100644 (file)
@@ -661,7 +661,7 @@ static uint32_t ext4_fs_inode_checksum(struct ext4_inode_ref *inode_ref)
                 * and inode generation */
                checksum = ext4_crc32c(checksum, &ino_index, sizeof(ino_index));
                checksum = ext4_crc32c(checksum, &ino_gen, sizeof(ino_gen));
-               /* Finally calculate crc32 checksum against 
+               /* Finally calculate crc32 checksum against
                 * the entire inode */
                checksum = ext4_crc32c(checksum, inode_ref->inode, inode_size);
                ext4_inode_set_csum(sb, inode_ref->inode, orig_checksum);
index 0a73b3ab83c7b16198bf5ab59c0da8066e3b0a94..7dad65d553bd8ec26a90c51ecaba18603b63b263 100644 (file)
@@ -112,7 +112,7 @@ void ext4_ialloc_set_bitmap_csum(struct ext4_sblock *sb, struct ext4_bgroup *bg,
        uint32_t csum = ext4_ialloc_bitmap_csum(sb, bitmap);
        uint16_t lo_csum = to_le16(csum & 0xFFFF),
                 hi_csum = to_le16(csum >> 16);
-       
+
        if (!ext4_sb_feature_ro_com(sb, EXT4_FRO_COM_METADATA_CSUM))
                return;
 
@@ -136,7 +136,7 @@ ext4_ialloc_verify_bitmap_csum(struct ext4_sblock *sb, struct ext4_bgroup *bg,
 
        if (!ext4_sb_feature_ro_com(sb, EXT4_FRO_COM_METADATA_CSUM))
                return true;
-       
+
        if (bg->inode_bitmap_csum_lo != lo_csum)
                return false;