Skip to contentSkip to conversation

ACPI: FAN: Update fps count debug print

PATCH Superseded Sumeet Pawnikar 2 participants 3 messages Jun 21, 2025 – Jul 3, 2025 1 message not in the archive ACPI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: FAN: Update fps count debug print

Update invalid value returned debug print with fps_count instead of control value for checking fan fps count condition.

---
 drivers/acpi/fan_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/fan_core.c +1 -1
index 8ad12ad3aaaf..9f2696a1928c 100644
@@ -102,7 +102,7 @@ static int fan_get_state_acpi4(struct acpi_device *device, unsigned long *state)
 			break;
 	}
 	if (i == fan->fps_count) {
-		dev_dbg(&device->dev, "Invalid control value returned\n");
+		dev_dbg(&device->dev, "Invalid fps_count value returned\n");
 		return -EINVAL;
 	}
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 14 lines · Sumeet Pawnikar

Update invalid value returned debug print with fps_count instead of control value for checking fan fps count condition.

---
 drivers/acpi/fan_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/fan_core.c +0 -0
index 8ad12ad3aaaf..9f2696a1928c 100644

drivers/acpi/fan_core.c static int fan_get_state_acpi4(struct acpi_device *device, unsigned long *state) · line 105

Quoted 5 lines
drivers/acpi/fan_core.c +1 -1
@@ -102,7 +102,7 @@ static int fan_get_state_acpi4(struct acpi_device *device, unsigned long *state)
                        break;
        }
        if (i == fan->fps_count) {
-               dev_dbg(&device->dev, "Invalid control value returned\n");
+               dev_dbg(&device->dev, "Invalid fps_count value returned\n");

I guess this should be "fps" instead of "fps_count" because the latter is just the array size, isn't it?

But I don't see why it should not be "control" either.

Quoted 4 lines
drivers/acpi/fan_core.c +0 -1
                return -EINVAL;
        }
 
--

A message that is not in the archive (sent off-list or not yet received): CAJ9orWQAPun6Oy3wMOBK+OYcvUTHDEZ7GUgsuxU2pctNY7O3Mw@mail.gmail.com

#3 lore raw
Quoted 32 lines · Sumeet R.P.
Quoted 11 lines · Rafael J. Wysocki
Quoted 9 lines · Sumeet Pawnikar

Update invalid value returned debug print with fps_count instead of control value for checking fan fps count condition.

---
 drivers/acpi/fan_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

drivers/acpi/fan_core.c static int fan_get_state_acpi4(struct acpi_device *device, unsigned long *state) · line 105

Quoted 10 lines
drivers/acpi/fan_core.c +1 -1
index 8ad12ad3aaaf..9f2696a1928c 100644
@@ -102,7 +102,7 @@ static int fan_get_state_acpi4(struct acpi_device *device, unsigned long *state)
                        break;
        }
        if (i == fan->fps_count) {
-               dev_dbg(&device->dev, "Invalid control value returned\n");
+               dev_dbg(&device->dev, "Invalid fps_count value returned\n");

I guess this should be "fps" instead of "fps_count" because the latter is just the array size, isn't it?

Yes, this can be fps.

Quoted 1 line
Quoted 6 lines
Quoted 2 lines

But I don't see why it should not be "control" either.

In this same function fan_get_state_acpi4(), the same debug print message is already present for invalid control value.
So, it's confusing when we get the message and difficult to identify due to which condition the message is coming from.

Agreed, so maybe change the second message to something like "No matching fps control value".