diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2024-05-16 10:54:41 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2024-05-16 10:55:05 +0200 |
commit | 964b8998fdce789fd06540e414fe0a044ccf5127 (patch) | |
tree | 72dc32e00a61111265069304a86ba78fbbe0aab6 /drivers/mtd | |
parent | 6277967d872e229de53b0585ebc34c8172965492 (diff) | |
parent | c84b3925c7d6c649f5add009084ff409139f894d (diff) | |
download | linux-964b8998fdce789fd06540e414fe0a044ccf5127.tar.gz linux-964b8998fdce789fd06540e414fe0a044ccf5127.tar.bz2 linux-964b8998fdce789fd06540e414fe0a044ccf5127.zip |
Merge tag 'spi-nor/for-6.10' into mtd/next
SPI NOR now uses div_u64() instead of div64_u64() in places where the
divisor is 32 bits. Many 32 bit architectures can optimize this variant
better than a full 64 bit divide.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/spi-nor/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 3e1f1913536b..028514c6996f 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -2893,7 +2893,7 @@ static int spi_nor_late_init_params(struct spi_nor *nor) spi_nor_init_default_locking_ops(nor); if (params->n_banks > 1) - params->bank_size = div64_u64(params->size, params->n_banks); + params->bank_size = div_u64(params->size, params->n_banks); return 0; } @@ -3406,7 +3406,7 @@ static int spi_nor_set_mtd_eraseregions(struct spi_nor *nor) return -EINVAL; mtd_region[i].erasesize = erasesize; - mtd_region[i].numblocks = div64_ul(region[i].size, erasesize); + mtd_region[i].numblocks = div_u64(region[i].size, erasesize); mtd_region[i].offset = region[i].offset; } |