Re:Re: [PATCH] ahci: use hweight_long() to count port_map bits

From: kensanya

Date: Thu May 28 2026 - 02:04:50 EST



















At 2026-05-28 13:27:15, "Damien Le Moal" <dlemoal@xxxxxxxxxx> wrote:
>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

Hi

I will modify the patch title and resend the patch.

Bset regards,
TanZheng