mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-02 11:13:02 +09:00
Adapt bdev_nr_zones and disk_zone_no functions so that they can also work for non-power-of-2 zone sizes. As the existing deployments assume that a device zone size is a power of 2 number of sectors, power-of-2 optimized calculation is used for those devices. There are no direct hot paths modified and the changes just introduce one new branch per call. Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Adam Manzanares <a.manzanares@samsung.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> Bug: 197782466 Bug: 269471019 Link: https://lore.kernel.org/linux-block/20220923173618.6899-2-p.raghav@samsung.com/ Change-Id: I1695f25f55579a342c44c6994fd43055d7356c81 Signed-off-by: Bart Van Assche <bvanassche@google.com>