diff options
| author | Arnd Bergmann <[email protected]> | 2024-03-13 08:46:52 +0000 |
|---|---|---|
| committer | Richard Weinberger <[email protected]> | 2024-07-12 17:46:21 +0000 |
| commit | 02096a0cf150fc8dc1cfe39afcd768d06b70e722 (patch) | |
| tree | 41aeb37e6f0df65c146d01524d7f56b43e51549b /drivers/fpga/tests | |
| parent | mtd: ubi: make ubi_class constant (diff) | |
| download | kernel-02096a0cf150fc8dc1cfe39afcd768d06b70e722.tar.gz kernel-02096a0cf150fc8dc1cfe39afcd768d06b70e722.zip | |
mtd: ubi: avoid expensive do_div() on 32-bit machines
The use of do_div() in ubi_nvmem_reg_read() makes calling it on
32-bit machines rather expensive. Since the 'from' variable is
known to be a 32-bit quantity, it is clearly never needed and
can be optimized into a regular division operation.
Fixes: b8a77b9a5f9c ("mtd: ubi: fix NVMEM over UBI volumes on 32-bit systems")
Fixes: 3ce485803da1 ("mtd: ubi: provide NVMEM layer over UBI volumes")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Zhihao Cheng <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
Diffstat (limited to 'drivers/fpga/tests')
0 files changed, 0 insertions, 0 deletions
