]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ata: libahci: use ahci_nr_ports() helper
authorNiklas Cassel <cassel@kernel.org>
Thu, 23 Apr 2026 16:43:30 +0000 (18:43 +0200)
committerNiklas Cassel <cassel@kernel.org>
Mon, 1 Jun 2026 17:07:37 +0000 (19:07 +0200)
Use ahci_nr_ports() helper instead of open coding the same.

No functional change.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/libahci.c

index c79abdfcd7a9b05e05259f82cbb91df63dcc0ee2..7169e9e89034e5e44b1bcdf51ae5fe1ec4d267cb 100644 (file)
@@ -2636,7 +2636,7 @@ void ahci_print_info(struct ata_host *host, const char *scc_s)
                ,
 
                hweight32(impl),
-               (cap & 0x1f) + 1,
+               ahci_nr_ports(cap),
                impl);
 
        dev_info(host->dev,