Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp83407pxb; Wed, 24 Feb 2021 19:08:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWK4hBFqixvO/gtAp9MrJzsjlYOMUvQ8Hb10r/wYCVtYOpn/+CH/5LhK+a2pyYa+R/eAce X-Received: by 2002:aa7:de8f:: with SMTP id j15mr882399edv.268.1614222532400; Wed, 24 Feb 2021 19:08:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614222532; cv=none; d=google.com; s=arc-20160816; b=LIWrClvzhS3xvmD2dB8J8Qcb3eYWaRobeN7IvJ5HrS5M9z1OuKKVMCPWzhI4iBZ2tK ZqiYT4kT0iX8U3Ij1RI3keMZgtK/MkLT+hOwO35r7105qi0xpT4czZ3QmXrFZouL91/q cgHsywtjCwuzqHDOf9aJPjQ79JRJ2vUP0VF7oZXfpwy9VblBsh1eCuijb8MqW2tAxnNF 3YvH4vB6mDe74LEGe/UqCLwffZRznrnQMQ7OUsudt69KzLbHDL3sZOK9OT1PWKbV7kyj NG8R6BO5nHkRU9Wx+QUr1vtxx+Gjrx4kMDFRG1N8V6mn3kSYu2SHhbYGse8wUsRwPb/n oG7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=u+EMByXEAMcLjs2lT0DO6ZP0sHHTFFMd/P2d0CZf5CQ=; b=aB28FJcjwSSi3pNiLh76dgnUlVx6mqe3fAGr4HYNR93UAePljVB8W0gv5XBlc47sZZ 6lgv5EP7zoGBaCRnVgZYNbtFBts1319sVt0AtJFMztj9tYUbxui9auDR+7Bzu7FAuZnS OP6QqyajPgsT4WpVp+S/6+/dlXEeANZHoo53e3alXZBqiQT5NrN66oZfB2qv5m7JWUCB 9jMFCoeflitwjcK9PZ9H50/7y0lQ7gOh0/AsvrTFGYPlfeTUUMwYRzU9f9bkYk910Qpp p25phaHx/lnvPnpoXiC2qsFFtu8SoMbFkSdZXXzS3Dbn/mZ2YtLtIWpHFnknd0VFRfsA MwRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k5si2688335ejo.356.2021.02.24.19.08.27; Wed, 24 Feb 2021 19:08:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233732AbhBXSm3 (ORCPT + 99 others); Wed, 24 Feb 2021 13:42:29 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:47084 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230121AbhBXSm2 (ORCPT ); Wed, 24 Feb 2021 13:42:28 -0500 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_smtp) via UNIX with SMTP (IdeaSmtpServer 0.83.537) id ea52b9e47c7a2361; Wed, 24 Feb 2021 19:41:46 +0100 Received: from kreacher.localnet (89-64-80-80.dynamic.chello.pl [89.64.80.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 6B73066152E; Wed, 24 Feb 2021 19:41:45 +0100 (CET) From: "Rafael J. Wysocki" To: Platform Driver Cc: Linux ACPI , LKML , Hanjun Guo , Hans de Goede , Chen Yu Subject: [PATCH v1] platform: x86: ACPI: Get rid of ACPICA message printing Date: Wed, 24 Feb 2021 19:41:44 +0100 Message-ID: <2074665.VPHYfYaQb6@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduledrkeejgdduudegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkggfgtgesthfuredttddtvdenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeevudefgfeguedtjedvhfetveegleduveeuvedvjeekleefhfduhfefheekffefveenucfkphepkeelrdeigedrkedtrdektdenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepihhnvghtpeekledrieegrdektddrkedtpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhrtghpthhtohepphhlrghtfhhorhhmqdgurhhivhgvrhdqgiekieesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehguhhohhgrnhhjuhhnsehhuhgrfigvihdrtghomhdprhgtphhtthhopehhuggvghhovgguvges rhgvughhrghtrdgtohhmpdhrtghpthhtohephihurdgtrdgthhgvnhesihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki A few x86 platform drivers use ACPI_DEBUG_PRINT() or ACPI_EXCEPTION() for printing messages, but that is questionable, because those macros belong to ACPICA and they should not be used elsewhere. In addition, ACPI_DEBUG_PRINT() requires special enabling to allow it to actually print the message, which is a nuisance, and the _COMPONENT symbol generally needed for that is not defined in any of the files in question. For this reason, replace the ACPI_DEBUG_PRINT() in lg-laptop.c with pr_debug() and the one in xo15-ebook.c with acpi_handle_debug() (with the additional benefit that the source object can be identified more easily after this change), and replace the ACPI_EXCEPTION() in acer-wmi.c with pr_warn(). Also drop the ACPI_MODULE_NAME() definitions that are only used by the ACPICA message printing macros from those files and from wmi.c and surfacepro3_button.c (while at it). Signed-off-by: Rafael J. Wysocki --- drivers/platform/surface/surfacepro3_button.c | 2 -- drivers/platform/x86/acer-wmi.c | 4 ++-- drivers/platform/x86/lg-laptop.c | 2 +- drivers/platform/x86/wmi.c | 1 - drivers/platform/x86/xo15-ebook.c | 6 ++---- 5 files changed, 5 insertions(+), 10 deletions(-) Index: linux-pm/drivers/platform/x86/lg-laptop.c =================================================================== --- linux-pm.orig/drivers/platform/x86/lg-laptop.c +++ linux-pm/drivers/platform/x86/lg-laptop.c @@ -678,7 +678,7 @@ static int __init acpi_init(void) result = acpi_bus_register_driver(&acpi_driver); if (result < 0) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error registering driver\n")); + pr_debug("Error registering driver\n"); return -ENODEV; } Index: linux-pm/drivers/platform/x86/xo15-ebook.c =================================================================== --- linux-pm.orig/drivers/platform/x86/xo15-ebook.c +++ linux-pm/drivers/platform/x86/xo15-ebook.c @@ -26,8 +26,6 @@ #define XO15_EBOOK_HID "XO15EBK" #define XO15_EBOOK_DEVICE_NAME "EBook Switch" -ACPI_MODULE_NAME(MODULE_NAME); - MODULE_DESCRIPTION("OLPC XO-1.5 ebook switch driver"); MODULE_LICENSE("GPL"); @@ -66,8 +64,8 @@ static void ebook_switch_notify(struct a ebook_send_state(device); break; default: - ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Unsupported event [0x%x]\n", event)); + acpi_handle_debug(device->handle, + "Unsupported event [0x%x]\n", event); break; } } Index: linux-pm/drivers/platform/x86/acer-wmi.c =================================================================== --- linux-pm.orig/drivers/platform/x86/acer-wmi.c +++ linux-pm/drivers/platform/x86/acer-wmi.c @@ -30,7 +30,6 @@ #include #include -ACPI_MODULE_NAME(KBUILD_MODNAME); MODULE_AUTHOR("Carlos Corbacho"); MODULE_DESCRIPTION("Acer Laptop WMI Extras Driver"); MODULE_LICENSE("GPL"); @@ -1605,7 +1604,8 @@ static void acer_kbd_dock_get_initial_st status = wmi_evaluate_method(WMID_GUID3, 0, 0x2, &input_buf, &output_buf); if (ACPI_FAILURE(status)) { - ACPI_EXCEPTION((AE_INFO, status, "Error getting keyboard-dock initial status")); + pr_warn("Error getting keyboard-dock initial status: %s\n", + acpi_format_exception(status)); return; } Index: linux-pm/drivers/platform/surface/surfacepro3_button.c =================================================================== --- linux-pm.orig/drivers/platform/surface/surfacepro3_button.c +++ linux-pm/drivers/platform/surface/surfacepro3_button.c @@ -40,8 +40,6 @@ static const guid_t MSHW0040_DSM_UUID = #define SURFACE_BUTTON_NOTIFY_PRESS_VOLUME_DOWN 0xc2 #define SURFACE_BUTTON_NOTIFY_RELEASE_VOLUME_DOWN 0xc3 -ACPI_MODULE_NAME("surface pro 3 button"); - MODULE_AUTHOR("Chen Yu"); MODULE_DESCRIPTION("Surface Pro3 Button Driver"); MODULE_LICENSE("GPL v2"); Index: linux-pm/drivers/platform/x86/wmi.c =================================================================== --- linux-pm.orig/drivers/platform/x86/wmi.c +++ linux-pm/drivers/platform/x86/wmi.c @@ -32,7 +32,6 @@ #include #include -ACPI_MODULE_NAME("wmi"); MODULE_AUTHOR("Carlos Corbacho"); MODULE_DESCRIPTION("ACPI-WMI Mapping Driver"); MODULE_LICENSE("GPL");