bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Change variable name from spd to det in ahci.c, to reflect specs


From: Andrea G. Monaco
Subject: [PATCH] Change variable name from spd to det in ahci.c, to reflect specs
Date: Sun, 21 Feb 2021 00:21:28 +0100

Hello,


while working on this bug
(https://mail.gnu.org/archive/html/help-hurd/2020-12/msg00003.html)
and reading the AHCI specification, I found out that a variable is named
incorrectly though used properly.
The correct name is det, while spd is another field.
Maybe it's worth correcting for consistency with the specification.


Warmly,
Andrea



diff --git a/linux/dev/drivers/block/ahci.c b/linux/dev/drivers/block/ahci.c
index 6d5c2858..f8499c1f 100644
--- a/linux/dev/drivers/block/ahci.c
+++ b/linux/dev/drivers/block/ahci.c
@@ -895,7 +895,7 @@ static void ahci_probe_dev(unsigned char bus, unsigned char 
device)
 
        for (i = 0; i < AHCI_MAX_PORTS; i++) {
                u32 ssts;
-               u8 spd, ipm;
+               u8 det, ipm;
 
                if (!(port_map & (1U << i)))
                        continue;
@@ -903,8 +903,8 @@ static void ahci_probe_dev(unsigned char bus, unsigned char 
device)
                ahci_port = &ahci_host->ports[i];
 
                ssts = readl(&ahci_port->ssts);
-               spd = ssts & 0xf;
-               switch (spd)
+               det = ssts & 0xf;
+               switch (det)
                {
                        case 0x0:
                                /* Device not present */
@@ -919,7 +919,7 @@ static void ahci_probe_dev(unsigned char bus, unsigned char 
device)
                                printk("ahci: %02x:%02x.%x: Port %u phy 
offline?!\n", bus, dev, fun, i);
                                continue;
                        default:
-                               printk("ahci: %02x:%02x.%x: Unknown port %u SPD 
%x\n", bus, dev, fun, i, spd);
+                               printk("ahci: %02x:%02x.%x: Unknown port %u DET 
%x\n", bus, dev, fun, i, det);
                                continue;
                }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]