From patchwork Tue Feb 12 21:41:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10808751 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 CF43613B4 for ; Tue, 12 Feb 2019 21:42:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFB442C1B0 for ; Tue, 12 Feb 2019 21:42:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3D5F2C1B3; Tue, 12 Feb 2019 21:42:28 +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 4EF092C1B0 for ; Tue, 12 Feb 2019 21:42:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729213AbfBLVm1 (ORCPT ); Tue, 12 Feb 2019 16:42:27 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:38454 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731109AbfBLVmL (ORCPT ); Tue, 12 Feb 2019 16:42:11 -0500 Received: by mail-ed1-f66.google.com with SMTP id h58so170510edb.5 for ; Tue, 12 Feb 2019 13:42:10 -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=8tQBQN4Gd6A8alQknyIJodX2WHALuebxSd6qUkfi74o=; b=KU3L829wnKF3SqK9LvGSd5qn/DtJqWO0TXSvxIKBmY7yRvVRmV7M5zHCJIPYK9zoP8 +5jWbVxOVuFSIzdVeYVHE/JvYd9S82moo64g+Xv8QUJDtSRxwUJF5sLxCt1JrCRhggtg KxxJ2PYCg+wCm0WpdCPciFq9Bld6NV7h8J8AQ= 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=8tQBQN4Gd6A8alQknyIJodX2WHALuebxSd6qUkfi74o=; b=ELh1+lbG3AQU56lPoNxcCbe1VKCSdi4Zgw4fQXOoS36W0yQu67+cwmva2Y8sGWunC2 X8vpMOViq2iAEijmSzauc9jonBDh6CQNR3EHP64M2gsd18LH0GIkdSg6YhXSqrh4/K0B J1Ju2I8SRo9TATgeGjJe6VmlOFP9vWFBpWmAc0IVneVuELXxocLW8BN7z8bEIOcZdRwx Q8I8YMKwuhs3KaZQOcbsZEYxhMqn8VqeYcC8jgUJrzAtLaPvttSugMEMER8sugd/k3Cz bvCkxQybiH7WZCyWCuArUXSBq/tq/89fRulOwZl7kGV90CFd9a2UgSpeuAsJ8ASohulk no3Q== X-Gm-Message-State: AHQUAuYXiilxRxZ2mv1tVx0EeCyVPnZKbdF3Ep3yH1P1n+h2ICT3DM3s WYZrVjWh67j3FLEdMTtvaekIGA== X-Google-Smtp-Source: AHgI3IYL7fHn0xJXjApiE5SmBJ8UwAZZS+WdZlHg+5w7Yf1q7tu7fRto9wYUuQrJ0ouTZqDfQEUXVQ== X-Received: by 2002:a17:906:9146:: with SMTP id y6mr1556765ejw.153.1550007729860; Tue, 12 Feb 2019 13:42:09 -0800 (PST) Received: from prevas-ravi.waoo.dk (ip-5-186-119-174.cgn.fibianet.dk. [5.186.119.174]) by smtp.gmail.com with ESMTPSA id v1sm3697607eds.47.2019.02.12.13.42.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 13:42:09 -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 v4 12/14] ACPI: use proper DYNAMIC_DEBUG_BRANCH macro Date: Tue, 12 Feb 2019 22:41:48 +0100 Message-Id: <20190212214150.4807-13-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190212214150.4807-1-linux@rasmusvillemoes.dk> References: <20190212214150.4807-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 87715f20b69a..bcdfbb2bea24 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -987,7 +987,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)