diff options
author | Richard Weinberger <richard@nod.at> | 2020-10-11 22:07:52 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2020-10-11 22:07:52 +0200 |
commit | 80510e25522949711410b37a7864f1b2d98215d8 (patch) | |
tree | f3fb37900167a09da585169f68ceea7ee957f9d8 /drivers/md/raid5.c | |
parent | Merge tag 'nand/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mt... (diff) | |
parent | Revert "mtd: spi-nor: Prefer asynchronous probe" (diff) | |
download | linux-80510e25522949711410b37a7864f1b2d98215d8.tar.xz linux-80510e25522949711410b37a7864f1b2d98215d8.zip |
Merge tag 'spi-nor/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next
SPI NOR core changes:
- Support for Winbond w25q64jwm flash
- Enable 4K sector support for mx25l12805d
SPI NOR controller drivers changes:
- intel-spi:
- Add Alder Lake-S PCI ID
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ef0fd4830803..225380efd1e2 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -4083,7 +4083,7 @@ static void handle_parity_checks5(struct r5conf *conf, struct stripe_head *sh, break; } dev = &sh->dev[s->failed_num[0]]; - /* fall through */ + fallthrough; case check_state_compute_result: sh->check_state = check_state_idle; if (!dev) @@ -4214,7 +4214,7 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh, /* we have 2-disk failure */ BUG_ON(s->failed != 2); - /* fall through */ + fallthrough; case check_state_compute_result: sh->check_state = check_state_idle; @@ -6514,9 +6514,12 @@ raid5_store_stripe_size(struct mddev *mddev, const char *page, size_t len) /* * The value should not be bigger than PAGE_SIZE. It requires to - * be multiple of DEFAULT_STRIPE_SIZE. + * be multiple of DEFAULT_STRIPE_SIZE and the value should be power + * of two. */ - if (new % DEFAULT_STRIPE_SIZE != 0 || new > PAGE_SIZE || new == 0) + if (new % DEFAULT_STRIPE_SIZE != 0 || + new > PAGE_SIZE || new == 0 || + new != roundup_pow_of_two(new)) return -EINVAL; err = mddev_lock(mddev); |