Re: [PATCH] ahci: use hweight_long() to count port_map bits
From: Damien Le Moal
Date: Thu May 28 2026 - 01:31:25 EST
On 5/28/26 03:18, Damien Le Moal wrote:
> 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>
Note: the patch title should be:
ata: libahci: use hweight_long() to count port_map bits
Maybe Niklas can fix this when applying.
--
Damien Le Moal
Western Digital Research