From patchwork Fri Apr 20 15:16:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrique de Moraes Holschuh X-Patchwork-Id: 10352969 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0B262602B1 for ; Fri, 20 Apr 2018 15:16:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1CD4287A7 for ; Fri, 20 Apr 2018 15:16:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E657D287A9; Fri, 20 Apr 2018 15:16:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 938CD287A7 for ; Fri, 20 Apr 2018 15:16:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755353AbeDTPQw (ORCPT ); Fri, 20 Apr 2018 11:16:52 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:58647 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755326AbeDTPQv (ORCPT ); Fri, 20 Apr 2018 11:16:51 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2D4A521DE0; Fri, 20 Apr 2018 11:16:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 20 Apr 2018 11:16:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hmh.eng.br; h=cc :date:from:in-reply-to:in-reply-to:message-id:references :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=ksPzdHKqEeloKv5jHdbVyCQu7dMw5Ruq+p38g2+YvtM=; b=IjOxBy0E 7Rxs1M+Jg3GT7tnLIfVhqnT+EKddein8U+VYVU3WClOhSNcjT17crb9ULcATMjUg cAQTXIaxLWUXOV0Hu1GuSDwDZyUdNxUTs6oXpVbgSAhCvj6XjzUeddk7UCkhh8KX uOvyumGS3DJ45+DGB/JVuYQm6NHkBvR6ALiFE2ee1PfE9h6x4qcl0AbX7TDZsIxy uSVHHsrpurBEwjKGPztJLG4azsO8fdYRx3P+7oY7AK8fPeFtbiVdhUnYIHPwt1EG 1yz37J+vEOkKCTBrQTeJDbZbZ/peRdFHtSRN9lusISiYjfKPm6mFNz0eT5Tz/IBB TsvLVMW3ot4/zg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:in-reply-to :message-id:references:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=ksPzdHKqEeloKv5jHdbVyCQu7dMw5 Ruq+p38g2+YvtM=; b=b5M01eru8cMHs1sNMCrNCrDswc1sCnPs44pFI6CALqoEA Djq8N5j854kR6mx22TOyLS3Sar9+wBtW1DwYT4ODIOaW6D4Jh/lKNT0LrCoEFmwd H/RA+WS7o5RKmeXaRi5yM+uxDJaF5yLWzT9Sb03F1zxeV8qWpjF9KVEXEfY4bps/ 0OkrdyhYvvkZsVeaRRgT3Nqif1nqqv4JdaooAvP6kqa/Q9hgry1/ClptPK+NLTuc 7rWLlWvi12E0mE61ZVzXYX9xSgIj1/XqphnNgkPuT1mc5npeXg6Ke0v+6MOX8Ti3 yD3KonYedIj2y+pqkEmrbI19oorUfC50SXB8sVfNg== X-ME-Sender: Received: from khazad-dum.debian.net (unknown [201.82.128.91]) by mail.messagingengine.com (Postfix) with ESMTPA id BDD6310256; Fri, 20 Apr 2018 11:16:50 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id EFCE33401FFB; Fri, 20 Apr 2018 12:16:48 -0300 (-03) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from khazad-dum.debian.net ([127.0.0.1]) by localhost (khazad-dum2.khazad-dum.debian.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Ivconz9GakL8; Fri, 20 Apr 2018 12:16:48 -0300 (-03) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 594EF3401FE8; Fri, 20 Apr 2018 12:16:48 -0300 (-03) From: Henrique de Moraes Holschuh To: Platform Driver Cc: Henrique de Moraes Holschuh , Andy Shevchenko , Darren Hart , Christian Kellner , ibm-acpi-devel@lists.sourceforge.net, bberg@redhat.com, Golden_Miller83@protonmail.ch, FP1 Zhang Subject: [UNTESTED 3/3] thinkpad-acpi: silence false-positive-prone pr_warn Date: Fri, 20 Apr 2018 12:16:29 -0300 Message-Id: <20180420151629.12993-3-hmh@hmh.eng.br> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180420151629.12993-1-hmh@hmh.eng.br> References: <20180420151629.12993-1-hmh@hmh.eng.br> In-Reply-To: <-B_kuLAsoL7HNLV_as9l197VeKXFOu7R-GfEj_oV2TRu40VHMh4SRkEpgaOEMhEqi5-t9Qdk4c8_vMNOXDk_QHuNj-EPKs2afxrL0zTBZxc=@protonmail.ch> References: <-B_kuLAsoL7HNLV_as9l197VeKXFOu7R-GfEj_oV2TRu40VHMh4SRkEpgaOEMhEqi5-t9Qdk4c8_vMNOXDk_QHuNj-EPKs2afxrL0zTBZxc=@protonmail.ch> Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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)