Something went wrong. Try again.
(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Something went wrong. Try again.
ata: ahci: use hweight_long() to count port_map bits
Replace the open loop used to calculate the number of set bits in the port mapping with the `hweight_long()` function, which simplifies the code without altering its functionality. Signed-off-by: TanZheng <tanzheng@kylinos.cn> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@kernel.org> Signed-off-by: Niklas Cassel <cassel@kernel.org>
Author TanZheng Committer Niklas Cassel Date (Jun 1, 2026, 5:07 PM UTC) Commit
Copy SHA
Parent aa0ae1c3 aa0ae1c35f7b3e9afed2324bed5f5c87ad55b92c