Skip to content

Commit c35403f

Browse files
Christoph Hellwigliu-song-6
authored andcommitted
md: use correct types in md_bitmap_print_sb
If we want to convert from a little endian format we need to cast to a little endian type, otherwise sparse will be unhappy. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Song Liu <songliubraving@fb.com>
1 parent ed4d0a4 commit c35403f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/md/md-bitmap.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,10 @@ void md_bitmap_print_sb(struct bitmap *bitmap)
490490
pr_debug(" magic: %08x\n", le32_to_cpu(sb->magic));
491491
pr_debug(" version: %d\n", le32_to_cpu(sb->version));
492492
pr_debug(" uuid: %08x.%08x.%08x.%08x\n",
493-
le32_to_cpu(*(__u32 *)(sb->uuid+0)),
494-
le32_to_cpu(*(__u32 *)(sb->uuid+4)),
495-
le32_to_cpu(*(__u32 *)(sb->uuid+8)),
496-
le32_to_cpu(*(__u32 *)(sb->uuid+12)));
493+
le32_to_cpu(*(__le32 *)(sb->uuid+0)),
494+
le32_to_cpu(*(__le32 *)(sb->uuid+4)),
495+
le32_to_cpu(*(__le32 *)(sb->uuid+8)),
496+
le32_to_cpu(*(__le32 *)(sb->uuid+12)));
497497
pr_debug(" events: %llu\n",
498498
(unsigned long long) le64_to_cpu(sb->events));
499499
pr_debug("events cleared: %llu\n",

0 commit comments

Comments
 (0)