diff --git a/drivers/md/md.c b/drivers/md/md.c index 1af74721e67cbfda2b2693f9606c7b4dffa3b10a..84f7db6913350ffba3b060e84b31741ad342ddb1 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -4563,7 +4563,7 @@ __ATTR_PREALLOC(array_state, S_IRUGO|S_IWUSR, array_state_show, array_state_stor static ssize_t max_corrected_read_errors_show(struct mddev *mddev, char *page) { - return sprintf(page, "%d\n", + return sprintf(page, "%u\n", atomic_read(&mddev->max_corr_read_errors)); } diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 744b4abe2c3b0b67147374d7d7d936d2d5c5fe4c..b13dcbe00c38c4462d3441187965e2e33a880168 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -2325,7 +2325,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 int sect = 0; /* Offset from r10_bio->sector */ int sectors = r10_bio->sectors; struct md_rdev *rdev; - int max_read_errors = atomic_read(&mddev->max_corr_read_errors); + unsigned int max_read_errors = atomic_read(&mddev->max_corr_read_errors); int d = r10_bio->devs[r10_bio->read_slot].devnum; /* still own a reference to this rdev, so it cannot @@ -2344,7 +2344,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 char b[BDEVNAME_SIZE]; bdevname(rdev->bdev, b); - pr_notice("md/raid10:%s: %s: Raid device exceeded read_error threshold [cur %d:max %d]\n", + pr_notice("md/raid10:%s: %s: Raid device exceeded read_error threshold [cur %u:max %u]\n", mdname(mddev), b, atomic_read(&rdev->read_errors), max_read_errors); pr_notice("md/raid10:%s: %s: Failing raid device\n",