Re: [PATCH v2] ata: ahci: use hweight_long() to count port_map bits
From: Hannes Reinecke
Date: Thu May 28 2026 - 02:15:09 EST
On 5/28/26 08:00, kensanya@xxxxxxx wrote:
From: TanZheng <tanzheng@xxxxxxxxxx>Reviewed-by: Hannes Reinecke <hare@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.
Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
Signed-off-by: TanZheng <tanzheng@xxxxxxxxxx>
---
v2:
- Add the prefix "ata:" to the patch title
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich