From patchwork Tue Oct 9 11:20:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10632357 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 B9F64112B for ; Tue, 9 Oct 2018 11:21:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B7E9289FB for ; Tue, 9 Oct 2018 11:21:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9015228A73; Tue, 9 Oct 2018 11:21:58 +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 42CD3289FB for ; Tue, 9 Oct 2018 11:21:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726771AbeJIShG (ORCPT ); Tue, 9 Oct 2018 14:37:06 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:43774 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727471AbeJIShF (ORCPT ); Tue, 9 Oct 2018 14:37:05 -0400 Received: by mail-ed1-f68.google.com with SMTP id y20-v6so1305247eds.10 for ; Tue, 09 Oct 2018 04:20:36 -0700 (PDT) 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=YnEe4RJi9cJsTZRq5G9IiFZ3ouBP3ndXXuRWxyHLTBA=; b=Q91B24AhIgPoFCJs2MwZ/Uo5Xg9F8cKgdwq1EOJLna5ELZcnp57Z25Ex2nByf+gglL rz7130IR22TomcVMs3SZKeSZIKngjYkch7Lt3WAvFPuStpLNyiDWpdEUEiQDd7YYa5kX 8IGjClBlko4OXO1Y5yn9/DQFM6cEX44/Y7LoY= 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=YnEe4RJi9cJsTZRq5G9IiFZ3ouBP3ndXXuRWxyHLTBA=; b=Z7gHxneLJP1vfmtQeUCJKNPP+3nSj4bPU83X1j5HPwXi33nID6XKDAs2YjsHb5JKqw MHAvhAqBkHo2/zfSSEmvlBXMmNeIjkpW7oWGJRY0OK+I93XqBxR12Mtnkm3tMxx/CtEX PFrmjXO70/laAKehXPePhiWRZlnSGUUz1QD4ZIgQD/VqP/nNSbpiaHeGmQDz8DHQUCQc XzS6cgwZ7puLGuq/9ZZt/Em+vuI7QCKMHLq6m1MruKA6Hwlrrpnm5LOb9oZjuoXTTbNn p1bk+UlQQ7GR2ltw+mcS+adqD9aCrtoU4BMbMnxDfh/eEYLI1Lxdz9yZr8abXhfAg06l 7s6w== X-Gm-Message-State: ABuFfogz2dYbUOVyzYhu3f+Wo90UJK+k7ZdRinld5G1IPQSXTiGWh+/s LA42RqYvxGuridoeakLTYuYUMg== X-Google-Smtp-Source: ACcGV63euAfRyUgSzPFYjSpTGwNUUMp9dmA1ZWiaPfZrTzS03WeeJePR+lf5oeP8lmgR8XXQsTnBlw== X-Received: by 2002:a17:906:90f:: with SMTP id i15-v6mr27111939ejd.225.1539084035573; Tue, 09 Oct 2018 04:20:35 -0700 (PDT) Received: from prevas-ravi.vestasvisitor.net ([193.47.71.171]) by smtp.gmail.com with ESMTPSA id n23-v6sm3595821eja.41.2018.10.09.04.20.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Oct 2018 04:20:35 -0700 (PDT) From: Rasmus Villemoes To: Jason Baron , Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org Subject: [PATCH v2 15/23] ACPI: use proper DYNAMIC_DEBUG_BRANCH macro Date: Tue, 9 Oct 2018 13:20:05 +0200 Message-Id: <20181009112013.14238-16-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.19.1.4.g721af0fda3 In-Reply-To: <20181009112013.14238-1-linux@rasmusvillemoes.dk> References: <20180919220444.23190-1-linux@rasmusvillemoes.dk> <20181009112013.14238-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 Signed-off-by: Rasmus Villemoes Acked-by: Rafael J. Wysocki --- 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 de8d3d3fa651..21e03aa32aae 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -982,7 +982,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 Tue Oct 9 11:20:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10632349 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 0726415E8 for ; Tue, 9 Oct 2018 11:20:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB7D628676 for ; Tue, 9 Oct 2018 11:20:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD3F928A6E; Tue, 9 Oct 2018 11:20:40 +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 B747528676 for ; Tue, 9 Oct 2018 11:20:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727577AbeJIShH (ORCPT ); Tue, 9 Oct 2018 14:37:07 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:44262 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726613AbeJIShG (ORCPT ); Tue, 9 Oct 2018 14:37:06 -0400 Received: by mail-ed1-f67.google.com with SMTP id z21-v6so1304636edb.11 for ; Tue, 09 Oct 2018 04:20:37 -0700 (PDT) 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=b/uCUfP8SuxFhuNaARI/TcFW71fTaY9liBiNrO3IVkM=; b=K4wtyX9HbbnM4clYyElO+N12hLv8DughUhNjldXBOzT0z/+7dV9xXN7i0aBbwvOO4e tMmHCyLeLm16ddpjUN6CoGkC+h0i1LNDnATouJwatEjQeHUCMPU0xSvpce0BOeqdi79Z e/UYTMYeWeOGI8u/o29xSMh94lH6QNK6TMUno= 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=b/uCUfP8SuxFhuNaARI/TcFW71fTaY9liBiNrO3IVkM=; b=pJSv9pch06wBKNf9ZkHEQSsHfc/85kMIkzevHoLwviBdSS0bSuU8tPmfU/ufAMtZQo GvSvohtx1QT1o2wmvbnj/vYvg7WbJXPrklZQnlmxsoYTDH4ba4q9dchy34h1p+ONuHC8 hk5COW73sojyg4t5nTDvRwhtTeb7VjcLxapqbfMHDMzs8YyQA3vwRKUnKrIuqr2HPPWZ QXM2KPRAi3n+ZFDXD0vbi2coX/zwOEGVybZUh4H3pt9cAVVAuQ/uKsRzjAk1dM1TsCIK rSa3K4GPj5MtxVDE2opC/5JhrclH0fkk2jGUXTO+D/W28n0ypN+hitut7x11hsUn43z8 KoNA== X-Gm-Message-State: ABuFfohdoDq7JqRWbESIXIdK3OHlULVfbpyLL2rxK1cXD9v/c3pkHUqw 4obuuERQeGEswVshH11W39bmDw== X-Google-Smtp-Source: ACcGV62TPVxdIvPLPUs8aRIN+0CH+3cIpKZGNS6KrJbEuvWoN2wIA0QMjytfyEVxt2T1RLI62IjFUQ== X-Received: by 2002:a50:ba43:: with SMTP id 3-v6mr33422770eds.227.1539084036650; Tue, 09 Oct 2018 04:20:36 -0700 (PDT) Received: from prevas-ravi.vestasvisitor.net ([193.47.71.171]) by smtp.gmail.com with ESMTPSA id n23-v6sm3595821eja.41.2018.10.09.04.20.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Oct 2018 04:20:36 -0700 (PDT) From: Rasmus Villemoes To: Jason Baron , Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org Subject: [PATCH v2 16/23] ACPI: remove unused __acpi_handle_debug macro Date: Tue, 9 Oct 2018 13:20:06 +0200 Message-Id: <20181009112013.14238-17-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.19.1.4.g721af0fda3 In-Reply-To: <20181009112013.14238-1-linux@rasmusvillemoes.dk> References: <20180919220444.23190-1-linux@rasmusvillemoes.dk> <20181009112013.14238-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 Signed-off-by: Rasmus Villemoes Acked-by: Rafael J. Wysocki --- include/linux/acpi.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 21e03aa32aae..e12d5ef1a054 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -948,9 +948,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 Tue Oct 9 11:20:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10632353 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 8E21815E8 for ; Tue, 9 Oct 2018 11:21:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FFD8289FB for ; Tue, 9 Oct 2018 11:21:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6427728A6F; Tue, 9 Oct 2018 11:21:43 +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 07A46289FB for ; Tue, 9 Oct 2018 11:21:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727579AbeJIShI (ORCPT ); Tue, 9 Oct 2018 14:37:08 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:34092 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727523AbeJIShI (ORCPT ); Tue, 9 Oct 2018 14:37:08 -0400 Received: by mail-ed1-f65.google.com with SMTP id w19-v6so1330920eds.1 for ; Tue, 09 Oct 2018 04:20:38 -0700 (PDT) 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=sA/jxv5F0qnu20pN8RN11C/qVSfpGyeJaerZ5AKmtrw=; b=UzHZEYUl5l+tombdmqejznWOMhkCvGGaGvUVKh5UY1P96yp9c96NY2T8qDJumNOjis gv+ExKavG9+qi6a//nsBB/qxhI7OzuBx/3TlczeWKBgoO9h4RhDnXsUfXeSHUbwbf0i9 POSE14zyfnKF2OZWaCDqvrT7WUSmyfG+pjT5o= 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=sA/jxv5F0qnu20pN8RN11C/qVSfpGyeJaerZ5AKmtrw=; b=riwJfYyQoMgLQVOTBVWWb5gvrMvUpSleMfcDG7pvTNlSuhy0YRNSnrR0GLvf3ulB5w pHH58BoJ9cGhc/3v2t858VPB5T3syg1bw5yFaOECRG2EvBH1O4hnS6119COsWwRBJ3nX k21Z7zi5PBvlmIDOBXdmRgNkJxd46xL0dC9EXFIJ8BEScRJZTnE4c02s07VLw1hJxUDU gdz9GaG/Pkg8xn8vb/uPfyNH/qi6gBAJ25WTmYeU6fnMAZpk/CKVdggNgUFuWWTOefmW 320Cdjo7HYZIDTYaZfaqAx+aAOqjKSX2DQe8ab3V55r0iXCewQhnbD9y9tdKpwZd81bK wKPw== X-Gm-Message-State: ABuFfohnGvJgwmfep8S7cEKl09ylhLwLejwluEs2nNaARfxJ6ib+kP/T jlt8/uYNTt4TP45x6slva0HTzQ== X-Google-Smtp-Source: ACcGV61tpBu0WZrNf/LYNlxmnAzSaQpd03+1J63CcJra5woKkfXH7Hm+vhjSa0stjjjNHmNgOfjBig== X-Received: by 2002:a50:d651:: with SMTP id c17-v6mr33324459edj.178.1539084037824; Tue, 09 Oct 2018 04:20:37 -0700 (PDT) Received: from prevas-ravi.vestasvisitor.net ([193.47.71.171]) by smtp.gmail.com with ESMTPSA id n23-v6sm3595821eja.41.2018.10.09.04.20.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Oct 2018 04:20:37 -0700 (PDT) From: Rasmus Villemoes To: Jason Baron , Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , linux-acpi@vger.kernel.org, "Rafael J . Wysocki" Subject: [PATCH v2 17/23] ACPI: implement acpi_handle_debug in terms of _dynamic_func_call Date: Tue, 9 Oct 2018 13:20:07 +0200 Message-Id: <20181009112013.14238-18-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.19.1.4.g721af0fda3 In-Reply-To: <20181009112013.14238-1-linux@rasmusvillemoes.dk> References: <20180919220444.23190-1-linux@rasmusvillemoes.dk> <20181009112013.14238-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 e12d5ef1a054..83bacf9039e9 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -977,12 +977,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, ...) \ ({ \