From patchwork Fri Nov 9 23:10:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10676675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AD385109C for ; Fri, 9 Nov 2018 23:12:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FAFC2F164 for ; Fri, 9 Nov 2018 23:12:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93BDC2F16E; Fri, 9 Nov 2018 23:12:05 +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 3E9EB2F164 for ; Fri, 9 Nov 2018 23:12:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728927AbeKJIyE (ORCPT ); Sat, 10 Nov 2018 03:54:04 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:44736 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728928AbeKJIyE (ORCPT ); Sat, 10 Nov 2018 03:54:04 -0500 Received: by mail-lj1-f195.google.com with SMTP id k19-v6so2945673lji.11 for ; Fri, 09 Nov 2018 15:11:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zikFil/AtYdu6Kux+125DpNglxhjQyI/EB/SaAFQ3pM=; b=NySe9vGirPKOeoUta4zyOtLJVYIqmQ8s2VS0BBRcj6i1YKTxY5ycDcnlZwwKO7x8Qu sDh6Oo0BpWljCqqWRW1GB79qRExjB429UhlI+XgZ2X3NhwqcufuUMIpF+KGccM9+MzZL jNegXkMX1OqO0M/PnKQ6MCwLNTHO7p9yQvHf4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zikFil/AtYdu6Kux+125DpNglxhjQyI/EB/SaAFQ3pM=; b=SqSxSc7GWgP1/O21wJh8rSbTU2h6mq1OvVdrhJ/Kfgd3QUVddbYGPqe56KVJcyjLI6 EVL1ge1hhbP1EjZay03dCACN0EO40osjW3bW6QuE37LnytZHjjkN6EQH6wZCulh1l4h6 B4i7/uala6yWEdHxeTVX5vCbLgpL9oB+TFGrQHLDtkGXqcxwm/7gdH4G0tjXb5BAeJmk YlYuwF2EXTU6xDMQB1EUGy0aRfmIAPmNLKbrldizpIFJB3hPF/ga3DoWilPncPFj+Wr5 xJwYjRLlLNilN9F1RZzka/jkro+cLr6AJh3YiT9+ZoulKpq+ZU+/+GyX8VCdhdZlV6Sh KusA== X-Gm-Message-State: AGRZ1gKsis/uApeLB7pYDC8RkPB4R7ko1S5vtiydttmboWrN9rmLYZ85 F5One/l5mGSV8muWXV+ODq7ZMg== X-Google-Smtp-Source: AJdET5fcezmWo/EYhEv4h6PTkhr1PwuoYpPcKtAVIkVdn4bIiZHvdJH/sWFYpdwEZwBMX5+ClME7bg== X-Received: by 2002:a2e:9bc3:: with SMTP id w3-v6mr6479464ljj.70.1541805078151; Fri, 09 Nov 2018 15:11:18 -0800 (PST) Received: from prevas-ravi.prevas.se (dhcp-5-186-114-252.cgn.ip.fibianet.dk. [5.186.114.252]) by smtp.gmail.com with ESMTPSA id x16sm1584012lff.26.2018.11.09.15.11.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Nov 2018 15:11:17 -0800 (PST) From: Rasmus Villemoes To: Andrew Morton , Jason Baron Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org, "Rafael J . Wysocki" Subject: [PATCH v3 15/23] ACPI: use proper DYNAMIC_DEBUG_BRANCH macro Date: Sat, 10 Nov 2018 00:10:13 +0100 Message-Id: <20181109231021.11658-16-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.19.1.6.gbde171bbf5 In-Reply-To: <20181109231021.11658-1-linux@rasmusvillemoes.dk> References: <20181009112013.14238-1-linux@rasmusvillemoes.dk> <20181109231021.11658-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP dynamic debug may be implemented via static keys, but ACPI is missing out on that runtime benefit since it open-codes one possible definition of DYNAMIC_DEBUG_BRANCH. Cc: linux-acpi@vger.kernel.org Acked-by: Jason Baron Acked-by: Rafael J. Wysocki Signed-off-by: Rasmus Villemoes --- include/linux/acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index ed80f147bd50..052e6492ebd7 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -980,7 +980,7 @@ void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const c #define acpi_handle_debug(handle, fmt, ...) \ do { \ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ - if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ + if (DYNAMIC_DEBUG_BRANCH(descriptor)) \ __acpi_handle_debug(&descriptor, handle, pr_fmt(fmt), \ ##__VA_ARGS__); \ } while (0) From patchwork Fri Nov 9 23:10:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10676671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 557E0109C for ; Fri, 9 Nov 2018 23:11:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46D632F164 for ; Fri, 9 Nov 2018 23:11:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37B532F16E; Fri, 9 Nov 2018 23:11:23 +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 CC7792F164 for ; Fri, 9 Nov 2018 23:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728928AbeKJIyE (ORCPT ); Sat, 10 Nov 2018 03:54:04 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:34040 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728765AbeKJIyE (ORCPT ); Sat, 10 Nov 2018 03:54:04 -0500 Received: by mail-lj1-f195.google.com with SMTP id u6-v6so2980829ljd.1 for ; Fri, 09 Nov 2018 15:11:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PeycFQIWB361UCrQAw91tO/V5hkVyltTQfPihSwVUzE=; b=ORYJI5oZkS4NwmV0OtapOeeNHN3Z8Bcb93RsNA7pryOlUV+CPXVpJNyOtrpOVuklZ+ y9+Oiqhkqoqk9kb2sX3TPmWktBwtWmDprVHkoxC1pfYH55Cza0xOjuNpPYyzup2El7d0 OeMjDAtMzlJKNJoZODC+IuQZ+SLNXdJGEkKBo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PeycFQIWB361UCrQAw91tO/V5hkVyltTQfPihSwVUzE=; b=lHFWcu4RHuRXtaNKRqUt38Rer0lr3jlr4wIGCGWrW1KNVb5K/EXReQWkt0/p+UGz4r doAX5Yo+NcciZz7S0YWpDbJd6+J5ScFsAz9IugipI/H1p7HOjBZHO0KWlAZ14kUFwBqL 0IFfmZzwRnbPG4LUjZOCLXvyWuQqsNuvvENKvlPWjyao61ozqyx725/JOqHQFnOz7h7t Hrc8xTLK5i+HB22tyUTEk95Ncgdxmab0Hf5w1qmoI9kYIaM89n2GUohFB0b7jgVCvYE/ /ScuUX2B8+46S8NsGi5XB3Xz+zW4uDPfNeKIuctaL2WASeWutxZ9TgLHpiR2pRF86eC5 7aiw== X-Gm-Message-State: AGRZ1gI2JtE/DGK6uburqHZNa1/IkSq/PVarz3jvaBRhOsszCaNxvszt FBYwxRbe23rMDzEaRq6BCYhn/W94f7n4GQ== X-Google-Smtp-Source: AJdET5dSWX/JUGRZ5mSH0eZeoXcKYSTXEJCx6/IHg0wHch7cDxpT3xCCHeAfhAOEG8KJ7kij7Rj5Cw== X-Received: by 2002:a2e:82c9:: with SMTP id n9-v6mr6402169ljh.137.1541805079329; Fri, 09 Nov 2018 15:11:19 -0800 (PST) Received: from prevas-ravi.prevas.se (dhcp-5-186-114-252.cgn.ip.fibianet.dk. [5.186.114.252]) by smtp.gmail.com with ESMTPSA id x16sm1584012lff.26.2018.11.09.15.11.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Nov 2018 15:11:18 -0800 (PST) From: Rasmus Villemoes To: Andrew Morton , Jason Baron Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org, "Rafael J . Wysocki" Subject: [PATCH v3 16/23] ACPI: remove unused __acpi_handle_debug macro Date: Sat, 10 Nov 2018 00:10:14 +0100 Message-Id: <20181109231021.11658-17-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.19.1.6.gbde171bbf5 In-Reply-To: <20181109231021.11658-1-linux@rasmusvillemoes.dk> References: <20181009112013.14238-1-linux@rasmusvillemoes.dk> <20181109231021.11658-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If CONFIG_DYNAMIC_DEBUG is not set, acpi_handle_debug directly invokes acpi_handle_printk (if DEBUG) or does a no-printk (if !DEBUG). So this macro is never used. Cc: linux-acpi@vger.kernel.org Acked-by: Jason Baron Acked-by: Rafael J. Wysocki Signed-off-by: Rasmus Villemoes --- include/linux/acpi.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 052e6492ebd7..de8633456d71 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -946,9 +946,6 @@ acpi_handle_printk(const char *level, void *handle, const char *fmt, ...) {} #if defined(CONFIG_ACPI) && defined(CONFIG_DYNAMIC_DEBUG) __printf(3, 4) void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const char *fmt, ...); -#else -#define __acpi_handle_debug(descriptor, handle, fmt, ...) \ - acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__); #endif /* From patchwork Fri Nov 9 23:10:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10676673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A7B5109C for ; Fri, 9 Nov 2018 23:12:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BEE72F164 for ; Fri, 9 Nov 2018 23:12:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B1282F16E; Fri, 9 Nov 2018 23:12:01 +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 199D42F164 for ; Fri, 9 Nov 2018 23:12:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728994AbeKJIyH (ORCPT ); Sat, 10 Nov 2018 03:54:07 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:46566 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728765AbeKJIyG (ORCPT ); Sat, 10 Nov 2018 03:54:06 -0500 Received: by mail-lj1-f195.google.com with SMTP id v15-v6so2941949ljh.13 for ; Fri, 09 Nov 2018 15:11:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WjlkOi7SsoKeG44ML8h7MnjFOLGteuTlJadrTcyRrTQ=; b=gxNBQ1Jgalir7n7qBfARJLrySPGPeemWx8ePDBGJblGpaZbx+xIRof3IKgDtosB2j5 jYpwiF8oe3+KHfQ/b8HsdwFRhFpEGydX2ybC0gB6zbsIsowZ+sGa0z9SjzXV/W84YfI9 OXlY78Ha9rLTJHpSge3WruhMzaeQHKyMduBUs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WjlkOi7SsoKeG44ML8h7MnjFOLGteuTlJadrTcyRrTQ=; b=GEOdQb1IHezUfN/34VHq4ctW4R7qw2U6Q1/X5+YCT/sLnjb1SGKzVV/MFvYnBTeVZl U4q99VFOZSHndOAfpX1fm7EWrsNtSt7kAx3OsZQstNgGKhu9Pxp24GpbbcxVZzsEZm0l tdSST9DNLpVUpizLVD30qwM4u0aGHtNrt2y259UOM+FE8rFD59XXiA7H88OPnDN5QLXQ Yl7yIKRnSrxIzdFExtkQzC/q0MxIPdMPNW54Se854PF7MtFq+fzfcjpsNrrLlrP+dbTa NA341Tmk0f5AeJXticbJZctm3jXXlosnrXHaMKLuB2+AkCUCCUKbbI9tJ+OkGY7oKBuF X5dA== X-Gm-Message-State: AGRZ1gKAOuxJF/lSGm7jzmhhWIxkvkxdWiP+8uAgBeyt3d7+Ou3aIn41 5+4GhVIOJAE7EmjVD8++os0PBA== X-Google-Smtp-Source: AJdET5elACq6XJVK7gZmLt4RGbeG75mJlPBBpzOC98ImthMx8XGxkLJ5rMT6nOyMuaCx61lKBdgFFw== X-Received: by 2002:a2e:3218:: with SMTP id y24-v6mr3300351ljy.157.1541805080702; Fri, 09 Nov 2018 15:11:20 -0800 (PST) Received: from prevas-ravi.prevas.se (dhcp-5-186-114-252.cgn.ip.fibianet.dk. [5.186.114.252]) by smtp.gmail.com with ESMTPSA id x16sm1584012lff.26.2018.11.09.15.11.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Nov 2018 15:11:20 -0800 (PST) From: Rasmus Villemoes To: Andrew Morton , Jason Baron Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org, "Rafael J . Wysocki" Subject: [PATCH v3 17/23] ACPI: implement acpi_handle_debug in terms of _dynamic_func_call Date: Sat, 10 Nov 2018 00:10:15 +0100 Message-Id: <20181109231021.11658-18-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.19.1.6.gbde171bbf5 In-Reply-To: <20181109231021.11658-1-linux@rasmusvillemoes.dk> References: <20181009112013.14238-1-linux@rasmusvillemoes.dk> <20181109231021.11658-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With coming changes on x86-64, all dynamic debug descriptors in a translation unit must have distinct names. The macro _dynamic_func_call takes care of that. No functional change. Cc: linux-acpi@vger.kernel.org Acked-by: Rafael J. Wysocki Acked-by: Jason Baron Signed-off-by: Rasmus Villemoes --- include/linux/acpi.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index de8633456d71..b284598ae023 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -975,12 +975,8 @@ void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const c #else #if defined(CONFIG_DYNAMIC_DEBUG) #define acpi_handle_debug(handle, fmt, ...) \ -do { \ - DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ - if (DYNAMIC_DEBUG_BRANCH(descriptor)) \ - __acpi_handle_debug(&descriptor, handle, pr_fmt(fmt), \ - ##__VA_ARGS__); \ -} while (0) + _dynamic_func_call(fmt, __acpi_handle_debug, \ + handle, pr_fmt(fmt), ##__VA_ARGS__) #else #define acpi_handle_debug(handle, fmt, ...) \ ({ \