Re: [PATCH] ahci: use hweight_long() to count port_map bits
From: Damien Le Moal
Date: Wed May 27 2026 - 14:21:00 EST
On 2026/05/27 18:17, kensanya@xxxxxxx wrote:
> From: TanZheng <tanzheng@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
This looks good to me. But as Niklas commented, if this needs a Suggested-by
tag, please add it.
Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
--
Damien Le Moal
Western Digital Research