]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ACPI: button: Improve warning message regarding lid state
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 1 Jun 2026 16:56:33 +0000 (18:56 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 1 Jun 2026 17:17:49 +0000 (19:17 +0200)
The warning message regarding an unexpected lid state printed by
acpi_lid_notify_state() is quite cryptic and there is no information
in it to indicate that it is about a platform firmware defect.  In
fact, it can only be understood after reading the comment below the
statement printing it.

For this reason, replace it with a more direct one including FW_BUG so
its connection to a firmware issue is clearer.

While at it, fix up a comment preceding the statement printing the
message in question.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/5084775.GXAFRqVoOG@rafael.j.wysocki
drivers/acpi/button.c

index 0b96db762bea22cd369d4d20c3b23fcd5f8f1e76..d2c2b81056391cb7c1b59c45175ea6088fd6dd4e 100644 (file)
@@ -227,8 +227,8 @@ static int acpi_lid_notify_state(struct acpi_button *button, int state)
                                ms_to_ktime(lid_report_interval));
        if (button->last_state == !!state &&
            ktime_after(ktime_get(), next_report)) {
-               /* Complain the buggy firmware */
-               pr_warn_once("The lid device is not compliant to SW_LID.\n");
+               /* Complain about the buggy firmware. */
+               pr_warn_once(FW_BUG "Unexpected lid state reported by firmware\n");
 
                /*
                 * Send the unreliable complement switch event: