From: Heinz Mauelshagen <heinzm@xxxxxxxxxx> Signed-off-by: heinzm <heinzm@xxxxxxxxxx> --- drivers/md/md.c | 3 +-- drivers/md/raid0.c | 6 +++--- drivers/md/raid1-10.c | 3 +-- drivers/md/raid1.c | 2 +- drivers/md/raid5.c | 4 ++-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 6a4d01efaca5..9b734720b9c1 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2064,8 +2064,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev) sb->feature_map |= cpu_to_le32(MD_FEATURE_BAD_BLOCKS); if (bb->changed) { - unsigned seq; - + unsigned int seq; retry: seq = read_seqbegin(&bb->lock); diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index b4c372c6861b..cedb91f84b69 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -70,7 +70,7 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf) struct strip_zone *zone; int cnt; struct r0conf *conf = kzalloc(sizeof(*conf), GFP_KERNEL); - unsigned blksize = 512; + unsigned int blksize = 512; *private_conf = ERR_PTR(-ENOMEM); if (!conf) @@ -519,8 +519,8 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio) sector_t bio_sector; sector_t sector; sector_t orig_sector; - unsigned chunk_sects; - unsigned sectors; + unsigned int chunk_sects; + unsigned int sectors; if (unlikely(bio->bi_opf & REQ_PREFLUSH) && md_flush_request(mddev, bio)) diff --git a/drivers/md/raid1-10.c b/drivers/md/raid1-10.c index e61f6cad4e08..8658f474bf2e 100644 --- a/drivers/md/raid1-10.c +++ b/drivers/md/raid1-10.c @@ -73,8 +73,7 @@ static inline void resync_get_all_pages(struct resync_pages *rp) get_page(rp->pages[i]); } -static inline struct page *resync_fetch_page(struct resync_pages *rp, - unsigned idx) +static inline struct page *resync_fetch_page(struct resync_pages *rp, unsigned int idx) { if (WARN_ON_ONCE(idx >= RESYNC_PAGES)) return NULL; diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index bd245f41393a..8097e01cd63b 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1128,7 +1128,7 @@ static void alloc_behind_master_bio(struct r1bio *r1_bio, struct bio *bio) { int size = bio->bi_iter.bi_size; - unsigned vcnt = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; + unsigned int vcnt = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; int i = 0; struct bio *behind_bio = NULL; diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 84e4eaa937cf..557398bf4c72 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -5632,8 +5632,8 @@ static struct bio *chunk_aligned_read(struct mddev *mddev, struct bio *raid_bio) { struct bio *split; sector_t sector = raid_bio->bi_iter.bi_sector; - unsigned chunk_sects = mddev->chunk_sectors; - unsigned sectors = chunk_sects - (sector & (chunk_sects-1)); + unsigned int chunk_sects = mddev->chunk_sectors; + unsigned int sectors = chunk_sects - (sector & (chunk_sects-1)); if (sectors < bio_sectors(raid_bio)) { struct r5conf *conf = mddev->private; -- 2.39.2