platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org>
To: Platform Driver
	<platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: bberg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	Christian Kellner
	<ckellner-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Andy Shevchenko
	<andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Golden_Miller83-g/b1ySJe57IkP3XJZ0H8fw@public.gmane.org,
	Henrique de Moraes Holschuh
	<hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org>,
	FP1 Zhang <zhangfp1-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org>,
	Darren Hart <dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Subject: [UNTESTED 3/3] thinkpad-acpi: silence false-positive-prone pr_warn
Date: Fri, 20 Apr 2018 12:16:29 -0300	[thread overview]
Message-ID: <20180420151629.12993-3-hmh@hmh.eng.br> (raw)
In-Reply-To: <20180420151629.12993-1-hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org>
In-Reply-To: <-B_kuLAsoL7HNLV_as9l197VeKXFOu7R-GfEj_oV2TRu40VHMh4SRkEpgaOEMhEqi5-t9Qdk4c8_vMNOXDk_QHuNj-EPKs2afxrL0zTBZxc=@protonmail.ch>

Do not consider unknown HKEY events in the 0x6000 range to be thermal
warnings.  Instead, handle them as a generic unknown HKEY event, which
are reported to the kernel log at priority "notice", and do not trigger
a thermal registers state dump to the log.

Signed-off-by: Henrique de Moraes Holschuh <hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org>
---
 drivers/platform/x86/thinkpad_acpi.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 3d70ef7e8a68..a0e9ce0d85b9 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -4039,8 +4039,6 @@ static bool hotkey_notify_6xxx(const u32 hkey,
 				 bool *send_acpi_ev,
 				 bool *ignore_acpi_ev)
 {
-	bool known = true;
-
 	/* 0x6000-0x6FFF: thermal alarms/notices and keyboard events */
 	*send_acpi_ev = true;
 	*ignore_acpi_ev = false;
@@ -4107,13 +4105,12 @@ static bool hotkey_notify_6xxx(const u32 hkey,
 		return true;
 
 	default:
-		pr_warn("unknown possible thermal alarm or keyboard event received\n");
-		known = false;
+		/* report simply as unknown, no sensor dump */
+		return false;
 	}
 
 	thermal_dump_all_sensors();
-
-	return known;
+	return true;
 }
 
 static void hotkey_notify(struct ibm_struct *ibm, u32 event)
-- 
2.11.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

  parent reply	other threads:[~2018-04-20 15:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <PqonyRG1_zESPTDspqzZ2qO65lHbv5E1z8Ekcgrzh0TtbBmlm69BnfUqZIEuSbF-d1z0VeXHPMRRCQenBEMNP2L8NyTqvIui1FwdHnJ6RAc=@protonmail.ch>
     [not found] ` <ei0r_oTyOQrFrZKDqLMWzJHdipDsPEu8zxZxhnNuNa6L7TMRdZzu43Ldx0mcuOiRI2Ud-Lx746lfMG-9YpGR7vcp1HrsuroruKEWzhrr3dg=@protonmail.ch>
     [not found]   ` <FA1DB435B97D5A4192BAE54A4EA542A99ABEF68F@CNMAILEX04.lenovo.com>
2018-02-15 14:42     ` ThinkPad Yoga 370 thinkpad_acpi unhandled events Andy Shevchenko
2018-02-15 18:21       ` Henrique de Moraes Holschuh
2018-02-17 13:47         ` Peter FP1 Zhang
2018-02-17 17:20           ` Jordan Glover
     [not found]           ` <FA1DB435B97D5A4192BAE54A4EA542A99ABF1461-bOPtaeQOlBPKZl9SKDgXa6BKnGwkPULj@public.gmane.org>
2018-04-03 12:04             ` Jordan Glover via ibm-acpi-devel
2018-04-03 16:30               ` Peter FP1 Zhang
     [not found]                 ` <FA1DB435B97D5A4192BAE54A4EA542A99AC542CC-bOPtaeQOlBPKZl9SKDgXa6BKnGwkPULj@public.gmane.org>
2018-04-03 18:02                   ` Henrique de Moraes Holschuh
     [not found]                     ` <20180403180210.v5tnefl2cvdvudfi-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org>
2018-04-03 18:25                       ` Jordan Glover via ibm-acpi-devel
2018-04-09  2:58                       ` Henrique de Moraes Holschuh
     [not found]                         ` <20180409025836.ft3atn4goi4ebc4g-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org>
2018-04-20 12:20                           ` Jordan Glover via ibm-acpi-devel
2018-04-20 15:16                             ` [UNTESTED 1/3] thinkpad-acpi: silence HKEY 0x6032, 0x60f0, 0x6030 Henrique de Moraes Holschuh
     [not found]                             ` <20180420151629.12993-1-hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org>
2018-04-20 15:16                               ` [UNTESTED 2/3] thinkpad-acpi: do not report thermal sensor state for tablet mode switch Henrique de Moraes Holschuh
2018-04-20 15:16                               ` Henrique de Moraes Holschuh [this message]
2018-04-20 15:17                             ` ThinkPad Yoga 370 thinkpad_acpi unhandled events Henrique de Moraes Holschuh
     [not found]                               ` <20180420151750.bp4wy3fm6ymniool-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org>
2018-04-24 10:16                                 ` Jordan Glover via ibm-acpi-devel
2018-04-24 11:28                                   ` Henrique de Moraes Holschuh
     [not found]                                     ` <20180424112801.63ojsumt34q26wor-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org>
2018-04-24 16:12                                       ` Andy Shevchenko
     [not found]                                         ` <CAHp75VciLyh1Y1sws69Hn=vN39suV+HH-JwNLcbeUnZ_dwrc0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-24 19:56                                           ` [PATCH 1/3] thinkpad-acpi: silence HKEY 0x6032, 0x60f0, 0x6030 Henrique de Moraes Holschuh
2018-04-24 19:56                                           ` [PATCH 2/3] thinkpad-acpi: do not report thermal sensor state for tablet mode switch Henrique de Moraes Holschuh
2018-04-24 19:56                                           ` [PATCH 3/3] thinkpad-acpi: silence false-positive-prone pr_warn Henrique de Moraes Holschuh
     [not found]                                             ` <20180424195605.17526-3-hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org>
2018-04-25 14:16                                               ` Andy Shevchenko
2018-04-25 11:13                                   ` ThinkPad Yoga 370 thinkpad_acpi unhandled events Jordan Glover via ibm-acpi-devel
2018-04-25 11:25                                     ` Jordan Glover via ibm-acpi-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180420151629.12993-3-hmh@hmh.eng.br \
    --to=hmh-n3tv7giv+o9fyo9q7ep/yw@public.gmane.org \
    --cc=Golden_Miller83-g/b1ySJe57IkP3XJZ0H8fw@public.gmane.org \
    --cc=andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=bberg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=ckellner-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dvhart-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=platform-driver-x86-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=zhangfp1-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).