Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1579450pxb; Thu, 4 Feb 2021 17:28:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDVRD4Y03Z/f+pN0Bs01rC30n2wbQhAffXtFnFH//p1hP8kVsJ/Noj6/yWsTUh0QIygSX4 X-Received: by 2002:a17:906:1796:: with SMTP id t22mr1731403eje.372.1612488534271; Thu, 04 Feb 2021 17:28:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612488534; cv=none; d=google.com; s=arc-20160816; b=0+YRpJ2Z1GmTi9+VuX32ocLEJWi657x3H9KCnr/STMLVX2W6U2bkIrgjghYa5c4SUR vVxXeN+Qfs9tgeqFEXdyzsXk58m+uXsknbbDa8nExMyidfzRDRijSLBgdfJY1gyNHbHa kPNXRg+pI0ef/GEWsKy2pH2he7fpThqdRcq64dkEeHHkiuyODqDM7k/FO/NGomQiJ4fx WTRE+EyxhuF9j1ThgbU1YuNxzPJhsuNLRAmpcuBoatmwWzT/mv6LrMaO3EpPMkjrnJr1 9VNwxm8+3wv4lpysTrMQQ5LSyD8iEDmM3rHvl/CwTBi1FDodXdPh2C1PtHtl9qO2T1DQ 45yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=CaVqlNIeecJeWkJVHOtZ7cF2n5I5GFK1T6qxrN1YZuw=; b=bqOhieHlpxCmt8WRKkZ7jMA1T0pQAMwO5ev5KfIyHkDLm9J/50aOp1mOxWoIjXSG1v wFAjt/KMF+CoeZoS5eQD1C5R0VMwna7qYvCZU2AByouqE8rOlHQcdMBhvBUHcAtVXO82 R5hilHnBQQDwQLDt0H4rewceQcGR+aM1BM9XSBOsYL7m7cCjezcz5ZYRFX6cHAob683d pAu4/b+K+iRgTTcrx+fUxc8vq6x8vtEdrKdiiNqroSXeVEhLVHYyqPvFyQ7fvpW0DdDy jykAtgWGhKiiPsVkVgJmE/aWW4lRHqJ8kRnBvyki3XsOmz1jdDm9uwLCwYfoNzIJ42rN Lepg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BStYMAVX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay23si4129646ejb.33.2021.02.04.17.28.29; Thu, 04 Feb 2021 17:28:54 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BStYMAVX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238276AbhBDSaz (ORCPT + 99 others); Thu, 4 Feb 2021 13:30:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:36590 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239113AbhBDS3q (ORCPT ); Thu, 4 Feb 2021 13:29:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612463299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CaVqlNIeecJeWkJVHOtZ7cF2n5I5GFK1T6qxrN1YZuw=; b=BStYMAVXwjLwSBTdaen4TxCvlbLE/fBjZZ7xj54ty9ufMXC0oShHW1fFCcuiaolbLC2Fh8 BEJ0zz60C/6oXQWnPgXqQvofTziSrKz1HcDP9gujCwxBOrVgVVPZazUTtxfx2g8SvDmDgp k3qmxh3ObINsb3ZS5d5HRfEUVyqDJhQ= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-184-iKe9NrqqNJazKStnln7cpQ-1; Thu, 04 Feb 2021 13:28:18 -0500 X-MC-Unique: iKe9NrqqNJazKStnln7cpQ-1 Received: by mail-ej1-f71.google.com with SMTP id aq28so3287924ejc.20 for ; Thu, 04 Feb 2021 10:28:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CaVqlNIeecJeWkJVHOtZ7cF2n5I5GFK1T6qxrN1YZuw=; b=McbqA0+VBrxqNerTJiwv77dRrCzw4AjvWZJ9PC6yN50vTPj6o6hOuBay82Eru8oevH oU91iUfv/dtLtePwjk6HW1jTLfcw0IbCJIfLx2j/dcIZxxTlRcnJU6SP3wO2i6K5u1Y4 dP1Tgp6c5E8JvuyjdmJGqkGiQvRJ5INHKpRTnJ3G3IVlm60H60f+hc3zOGkSaAKOWZOY PS3c5zSvt2LP3+ebsTNeTaUKnVTc8ecAHb9VmPcaCcEelHq5jt+0Uv1XkyUxr3GTkymK eeNO1WpV2Cporx+kvlgvDyXsHeHWsoNlNoZypD0lBHbelb4Jnqwp3ucxb/GGqA96oBca KqOg== X-Gm-Message-State: AOAM533DnY45GeysMYSZXudH8+Wno6UZ+AJEeU9iRZ3HKnU0Np1wItwp 3D0q15n3QS8cWggJIahMzDJEblSRz83mizvBTbHG9yTKEQXaTnEvoBY/6vEtQiNuw13HLduKoTe T1y/14DIvcVgWyXjfJNo17EAD X-Received: by 2002:aa7:d912:: with SMTP id a18mr266832edr.73.1612463296960; Thu, 04 Feb 2021 10:28:16 -0800 (PST) X-Received: by 2002:aa7:d912:: with SMTP id a18mr266814edr.73.1612463296692; Thu, 04 Feb 2021 10:28:16 -0800 (PST) Received: from x1.localdomain (2001-1c00-0c1e-bf00-37a3-353b-be90-1238.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:37a3:353b:be90:1238]) by smtp.gmail.com with ESMTPSA id l13sm2835655eji.49.2021.02.04.10.28.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Feb 2021 10:28:16 -0800 (PST) Subject: Re: [PATCH v3 3/5] ACPI: button: Clean up printing messages To: "Rafael J. Wysocki" , Linux ACPI Cc: Linux PM , LKML , "Rafael J. Wysocki" , Zhang Rui , Erik Kaneda , Joe Perches , Hanjun Guo References: <2367702.B5bJTmGzJm@kreacher> <1991501.dpTHplkurC@kreacher> <1961054.9MKZ8ejxOh@kreacher> <5061782.uJCyLE8JBt@kreacher> From: Hans de Goede Message-ID: Date: Thu, 4 Feb 2021 19:28:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <5061782.uJCyLE8JBt@kreacher> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2/3/21 7:46 PM, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Replace the ACPI_DEBUG_PRINT() instance in button.c with an > acpi_handle_debug() call, drop the _COMPONENT and ACPI_MODULE_NAME() > definitions that are not used any more, drop the no longer needed > ACPI_BUTTON_COMPONENT definition from the headers and update the > documentation accordingly. > > While at it, replace the direct printk() invocations with pr_info() > (that changes the excessive log level for some of them too) and drop > the unneeded PREFIX sybmbol definition from battery.c. > > Signed-off-by: Rafael J. Wysocki > Reviewed-by: Hanjun Guo Thanks, patch looks good to me: Reviewed-by: Hans de Goede Regards, Hans > --- > > v2 -> v3: Add R-by tag. > > v1 -> v2: Changelog update. > > --- > Documentation/firmware-guide/acpi/debug.rst | 1 - > drivers/acpi/button.c | 15 +++++---------- > drivers/acpi/sysfs.c | 1 - > include/acpi/acpi_drivers.h | 1 - > 4 files changed, 5 insertions(+), 13 deletions(-) > > Index: linux-pm/drivers/acpi/button.c > =================================================================== > --- linux-pm.orig/drivers/acpi/button.c > +++ linux-pm/drivers/acpi/button.c > @@ -21,8 +21,6 @@ > #include > #include > > -#define PREFIX "ACPI: " > - > #define ACPI_BUTTON_CLASS "button" > #define ACPI_BUTTON_FILE_STATE "state" > #define ACPI_BUTTON_TYPE_UNKNOWN 0x00 > @@ -54,9 +52,6 @@ static const char * const lid_init_state > [ACPI_BUTTON_LID_INIT_DISABLED] = "disabled", > }; > > -#define _COMPONENT ACPI_BUTTON_COMPONENT > -ACPI_MODULE_NAME("button"); > - > MODULE_AUTHOR("Paul Diefenbaugh"); > MODULE_DESCRIPTION("ACPI Button Driver"); > MODULE_LICENSE("GPL"); > @@ -285,7 +280,7 @@ static int acpi_button_add_fs(struct acp > return 0; > > if (acpi_button_dir || acpi_lid_dir) { > - printk(KERN_ERR PREFIX "More than one Lid device found!\n"); > + pr_info("More than one Lid device found!\n"); > return -EEXIST; > } > > @@ -434,8 +429,8 @@ static void acpi_button_notify(struct ac > } > 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; > } > } > @@ -523,7 +518,7 @@ static int acpi_button_add(struct acpi_d > ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); > input->open = acpi_lid_input_open; > } else { > - printk(KERN_ERR PREFIX "Unsupported hid [%s]\n", hid); > + pr_info("Unsupported hid [%s]\n", hid); > error = -ENODEV; > goto err_free_input; > } > @@ -567,7 +562,7 @@ static int acpi_button_add(struct acpi_d > } > > device_init_wakeup(&device->dev, true); > - printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device)); > + pr_info("%s [%s]\n", name, acpi_device_bid(device)); > return 0; > > err_remove_fs: > Index: linux-pm/Documentation/firmware-guide/acpi/debug.rst > =================================================================== > --- linux-pm.orig/Documentation/firmware-guide/acpi/debug.rst > +++ linux-pm/Documentation/firmware-guide/acpi/debug.rst > @@ -52,7 +52,6 @@ shows the supported mask values, current > ACPI_CA_DISASSEMBLER 0x00000800 > ACPI_COMPILER 0x00001000 > ACPI_TOOLS 0x00002000 > - ACPI_BUTTON_COMPONENT 0x00080000 > ACPI_SBS_COMPONENT 0x00100000 > ACPI_FAN_COMPONENT 0x00200000 > ACPI_PCI_COMPONENT 0x00400000 > Index: linux-pm/drivers/acpi/sysfs.c > =================================================================== > --- linux-pm.orig/drivers/acpi/sysfs.c > +++ linux-pm/drivers/acpi/sysfs.c > @@ -52,7 +52,6 @@ static const struct acpi_dlayer acpi_deb > ACPI_DEBUG_INIT(ACPI_COMPILER), > ACPI_DEBUG_INIT(ACPI_TOOLS), > > - ACPI_DEBUG_INIT(ACPI_BUTTON_COMPONENT), > ACPI_DEBUG_INIT(ACPI_SBS_COMPONENT), > ACPI_DEBUG_INIT(ACPI_FAN_COMPONENT), > ACPI_DEBUG_INIT(ACPI_PCI_COMPONENT), > Index: linux-pm/include/acpi/acpi_drivers.h > =================================================================== > --- linux-pm.orig/include/acpi/acpi_drivers.h > +++ linux-pm/include/acpi/acpi_drivers.h > @@ -15,7 +15,6 @@ > * Please update drivers/acpi/debug.c and Documentation/firmware-guide/acpi/debug.rst > * if you add to this list. > */ > -#define ACPI_BUTTON_COMPONENT 0x00080000 > #define ACPI_SBS_COMPONENT 0x00100000 > #define ACPI_FAN_COMPONENT 0x00200000 > #define ACPI_PCI_COMPONENT 0x00400000 > > >