summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-04-04 18:56:13 +0200
committerSong Liu <songliubraving@fb.com>2019-04-11 00:26:09 +0200
commitae50640bebc48f1fc0092f16ea004c7c4d12c985 (patch)
tree51deec7d2c2fd9a78d092574023e8b268bd3a6f0 /drivers/md/md.c
parentmd: use correct type in super_1_load (diff)
downloadlinux-ae50640bebc48f1fc0092f16ea004c7c4d12c985.tar.xz
linux-ae50640bebc48f1fc0092f16ea004c7c4d12c985.zip
md: use correct type in super_1_sync
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>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 7a74e2de40b5..4a31380b0eff 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1872,7 +1872,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev)
md_error(mddev, rdev);
else {
struct badblocks *bb = &rdev->badblocks;
- u64 *bbp = (u64 *)page_address(rdev->bb_page);
+ __le64 *bbp = (__le64 *)page_address(rdev->bb_page);
u64 *p = bb->page;
sb->feature_map |= cpu_to_le32(MD_FEATURE_BAD_BLOCKS);
if (bb->changed) {