From patchwork Tue Apr 24 19:56:05 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: 10360893 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 ED143602D6 for ; Tue, 24 Apr 2018 19:56:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD79C28B76 for ; Tue, 24 Apr 2018 19:56:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1EA428C51; Tue, 24 Apr 2018 19:56:22 +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 7E80F28B76 for ; Tue, 24 Apr 2018 19:56:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751213AbeDXT4W (ORCPT ); Tue, 24 Apr 2018 15:56:22 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48503 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750791AbeDXT4V (ORCPT ); Tue, 24 Apr 2018 15:56:21 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0E5C2215B7; Tue, 24 Apr 2018 15:56:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 24 Apr 2018 15:56:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hmh.eng.br; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=HPdtNTyPg7TJeRDJg B9iK/e0jaFM/Ey4yYBFlN3qtN4=; b=ju+gRfgkHgLbht52Jki8KVdQbIqCvka0t 9JdtCBWw4qx3JUF62Ov3OwTbIh1CFdPgXw8GSNvMz2rSqXWKoK2/6Yc5E2IfImKV 0yOm7ryA3sAhMMluU+KcIps47f29ZBtI+8fLzIzchosDPseK+C1HqmT9AE8djqsC Dd090tKPTUD5v6p6/zLk8bcMb9t+0S3vBotTMJAv69jC7H0NOEf/7CkjkZR3N2S4 WWg7WN96SLkNUdqIzPBf83R0rFm9hanSTfoky3zOox9/xxXEqXsdg5n9LDh7JEHx 1kGdmPHbPWQ7QZ2xnVTNKPCXxxm/QQ+8xL5qB+Q36JCBYc2DGzmDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=HPdtNTyPg7TJeRDJgB9iK/e0jaFM/Ey4yYBFlN3qtN4=; b=kxvj0IAQ k2TZy67CEa/RjhzgM7zZcwM0d/8Q4T+TItLsd1V28D822A8tdrhLIVvElNxHKFZO egdJ7bowmCNl9Us2nx9MHqO9cYMBrEGEB4nd6TV/4wJIefjZUfmct7ljimL65Npe V7VMthNwZRe/Y5qX5OG+TZqza9WPomMQnYNcGfyYa3Y0XwS+u+VC2JjTK1v+bRe4 j9jrplQ1oULO5OCIDBFRmKp5K+H2V8Th9ZGeSPov6y8wlWM7NDyV64+FMVEQllWQ snumNoUbfF5BYx68piyUcN0QXoAIrtImprLqYyVKeun3h5fQeRRjagk02RLk3G6V fz+4OD3gfu4Fjg== X-ME-Sender: Received: from khazad-dum.debian.net (unknown [201.82.128.91]) by mail.messagingengine.com (Postfix) with ESMTPA id A7840E4924; Tue, 24 Apr 2018 15:56:20 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by localhost.khazad-dum.debian.net (Postfix) with ESMTP id B3314340131B; Tue, 24 Apr 2018 16:56:18 -0300 (-03) X-Virus-Scanned: Debian amavisd-new at khazad-dum.debian.net 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 V6LzHYJjRPQP; Tue, 24 Apr 2018 16:56:18 -0300 (-03) Received: by khazad-dum.debian.net (Postfix, from userid 1000) id 4949B3401314; Tue, 24 Apr 2018 16:56:18 -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: [PATCH 3/3] thinkpad-acpi: silence false-positive-prone pr_warn Date: Tue, 24 Apr 2018 16:56:05 -0300 Message-Id: <20180424195605.17526-3-hmh@hmh.eng.br> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: 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 Tested-by: Jordan Glover --- 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)