[PATCH v2 2/2] powerpc: pci-ioda: Optimize pnv_ioda_pick_m64_pe()
Andrew Donnellan
ajd at linux.ibm.com
Tue Aug 12 13:45:32 AEST 2025
On Mon, 2025-08-11 at 12:51 -0400, Yury Norov wrote:
> From: "Yury Norov (NVIDIA)" <yury.norov at gmail.com>
>
> bitmap_empty() in pnv_ioda_pick_m64_pe() is O(N) and useless because
> the following find_next_bit() does the same work.
>
> Drop it, and while there replace a while() loop with the dedicated
> for_each_set_bit().
>
> Signed-off-by: Yury Norov (NVIDIA) <yury.norov at gmail.com>
Reviewed-by: Andrew Donnellan <ajd at linux.ibm.com>
--
Andrew Donnellan OzLabs, ADL Canberra
ajd at linux.ibm.com IBM Australia Limited
More information about the Linuxppc-dev
mailing list