diff options
| author | gkostka <kostka.grzegorz@gmail.com> | 2015-12-07 18:54:08 +0100 |
|---|---|---|
| committer | gkostka <kostka.grzegorz@gmail.com> | 2015-12-07 18:54:08 +0100 |
| commit | b3ec2b25f88be6d9ec861e789763225906d9935c (patch) | |
| tree | 807128901fb6e7e75d2cfa876e28c5486816e32e | |
| parent | 9195095bf35d65118fe69fd26906840bd5fcfc9f (diff) | |
Style fixes in multiple modules
| -rw-r--r-- | lwext4/ext4_blockdev.c | 4 | ||||
| -rw-r--r-- | lwext4/ext4_debug.h | 26 | ||||
| -rw-r--r-- | lwext4/ext4_dir_idx.c | 10 | ||||
| -rw-r--r-- | lwext4/ext4_extent.c | 2 | ||||
| -rw-r--r-- | lwext4/ext4_fs.c | 2 | ||||
| -rw-r--r-- | lwext4/ext4_ialloc.c | 4 |
6 files changed, 24 insertions, 24 deletions
diff --git a/lwext4/ext4_blockdev.c b/lwext4/ext4_blockdev.c index 8ad251b..0698413 100644 --- a/lwext4/ext4_blockdev.c +++ b/lwext4/ext4_blockdev.c @@ -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); diff --git a/lwext4/ext4_debug.h b/lwext4/ext4_debug.h index aec4dcf..4c69a4e 100644 --- a/lwext4/ext4_debug.h +++ b/lwext4/ext4_debug.h @@ -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 diff --git a/lwext4/ext4_dir_idx.c b/lwext4/ext4_dir_idx.c index 830b73c..1b78905 100644 --- a/lwext4/ext4_dir_idx.c +++ b/lwext4/ext4_dir_idx.c @@ -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); } diff --git a/lwext4/ext4_extent.c b/lwext4/ext4_extent.c index a356518..d6f373b 100644 --- a/lwext4/ext4_extent.c +++ b/lwext4/ext4_extent.c @@ -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)); diff --git a/lwext4/ext4_fs.c b/lwext4/ext4_fs.c index edc87ad..7250839 100644 --- a/lwext4/ext4_fs.c +++ b/lwext4/ext4_fs.c @@ -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); diff --git a/lwext4/ext4_ialloc.c b/lwext4/ext4_ialloc.c index 0a73b3a..7dad65d 100644 --- a/lwext4/ext4_ialloc.c +++ b/lwext4/ext4_ialloc.c @@ -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; |
