Skip to content

Commit

Permalink
md: use correct types in md_bitmap_print_sb
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Song Liu committed Apr 10, 2019
1 parent ed4d0a4 commit c35403f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/md/md-bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,10 @@ void md_bitmap_print_sb(struct bitmap *bitmap)
pr_debug(" magic: %08x\n", le32_to_cpu(sb->magic));
pr_debug(" version: %d\n", le32_to_cpu(sb->version));
pr_debug(" uuid: %08x.%08x.%08x.%08x\n",
le32_to_cpu(*(__u32 *)(sb->uuid+0)),
le32_to_cpu(*(__u32 *)(sb->uuid+4)),
le32_to_cpu(*(__u32 *)(sb->uuid+8)),
le32_to_cpu(*(__u32 *)(sb->uuid+12)));
le32_to_cpu(*(__le32 *)(sb->uuid+0)),
le32_to_cpu(*(__le32 *)(sb->uuid+4)),
le32_to_cpu(*(__le32 *)(sb->uuid+8)),
le32_to_cpu(*(__le32 *)(sb->uuid+12)));
pr_debug(" events: %llu\n",
(unsigned long long) le64_to_cpu(sb->events));
pr_debug("events cleared: %llu\n",
Expand Down

0 comments on commit c35403f

Please sign in to comment.