Commit 964b8998 authored by Miquel Raynal's avatar Miquel Raynal

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: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parents 6277967d c84b3925
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment