]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
md: use correct types in md_bitmap_print_sb
authorChristoph Hellwig <hch@lst.de>
Thu, 4 Apr 2019 16:56:11 +0000 (18:56 +0200)
committerSong Liu <songliubraving@fb.com>
Wed, 10 Apr 2019 22:26:08 +0000 (15:26 -0700)
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>
drivers/md/md-bitmap.c

index 1cd4f991792cf138448584b1e5328d3a1a73ff1e..3a62a46b75c7278a68ecc11995be51a2e20f8a36 100644 (file)
@@ -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",