From patchwork Tue Jun 9 10:46:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 217912 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44B5AC433DF for ; Tue, 9 Jun 2020 10:48:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15749207F9 for ; Tue, 9 Jun 2020 10:48:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hS4A2h3J" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728920AbgFIKsL (ORCPT ); Tue, 9 Jun 2020 06:48:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728881AbgFIKrq (ORCPT ); Tue, 9 Jun 2020 06:47:46 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D226C008630 for ; Tue, 9 Jun 2020 03:47:41 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id n24so21825596ejd.0 for ; Tue, 09 Jun 2020 03:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/5WnBa7fJn+pPKP5P8jfdYigZEMgAeAJ+nmAq9FbnZM=; b=hS4A2h3J+Pci4Lw+anaXS2PuQgAH2hIHxpqd0ezXZxBZ9me+hfgdQg5mvHjcq8SUiO EuY6p0NBvRb45UuQrdbwSLXcPmCxwBvC1lHF5LyVoiaJ8Sx7LThvB+VK7ZsHRno9Y2uz 6SBK2Nd8vb3GB5GOe8DWi6HPJvQeRk3hvhBy5OICiWc0tGOHQHpN2pIM2xv/FIUgpWI6 D+4lRUw0r9eb4u0Y5WU5nkzEVplGGsS2HlRlIsldw/wj3Ik+gd67w1NVDuyHJGq/QF/p 77MD86DPubivo8gbrQsAWCFwqMs/4ctENZres/LCUYw3JixwjJNmIkS6ZdOBqPwqK80t UO9w== 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; bh=/5WnBa7fJn+pPKP5P8jfdYigZEMgAeAJ+nmAq9FbnZM=; b=Gx3rLKleZLVSCEzGHpl2LIr4csxEefCb0pDW7hC9GYKN9g7mJT6NM0yFey58RA2ArY 0B7b5IoyqXVZHkpUsUZnHtxkoIMDxS9KRyv9TqhbDsDGm3rXgMIqedElP37SFLPlLur3 giRL8nonHRmmdknCQwiIinV0TtEWd3sAAt/uxOIN50TGh8mIcyZLjnm6mpbDG3cxg7lk c6uop0Ifjhm7PiovF47HPTrYCxS3KBdnQ9C+W17dz+y90kUK40iWdo68fYGnGeEeXYiY 5s0CXtabGQAUs3LsfdxlqIjbOCT6Foq1qkDYi1NzYuQyCmQzk8gAAP+4xyjVCf1Jn6pA 8vpw== X-Gm-Message-State: AOAM533lZYGu5mGXptSt1uVplvqqnNhrdlfbBYnzTg7i84MdupO9vGHt ehkgyzrCw8D7pZdg9ScJWRLHkw== X-Google-Smtp-Source: ABdhPJzH/K2NQQ2rv61OJWPAnFYGeM8y8y32U0bjShreSrArNp7+PSoZt2khzLblWMU0Eg0n23fgQA== X-Received: by 2002:a17:907:ab9:: with SMTP id bz25mr24488816ejc.39.1591699659825; Tue, 09 Jun 2020 03:47:39 -0700 (PDT) Received: from localhost.localdomain (hst-221-69.medicom.bg. [84.238.221.69]) by smtp.gmail.com with ESMTPSA id qt19sm12267763ejb.14.2020.06.09.03.47.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 03:47:39 -0700 (PDT) From: Stanimir Varbanov To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-acpi@vger.kernel.org, netdev@vger.kernel.org Cc: Joe Perches , Greg Kroah-Hartman , Jason Baron , Stanimir Varbanov Subject: [PATCH v3 3/7] dev_printk: Add dev_dbg_level macro over dynamic one Date: Tue, 9 Jun 2020 13:46:00 +0300 Message-Id: <20200609104604.1594-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200609104604.1594-1-stanimir.varbanov@linaro.org> References: <20200609104604.1594-1-stanimir.varbanov@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add dev_dbg_level macro wrapper over dynamic debug one for dev_dbg variants. Signed-off-by: Stanimir Varbanov --- include/linux/dev_printk.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/dev_printk.h b/include/linux/dev_printk.h index 7b50551833e1..d639dc60d84d 100644 --- a/include/linux/dev_printk.h +++ b/include/linux/dev_printk.h @@ -112,15 +112,24 @@ void _dev_info(const struct device *dev, const char *fmt, ...) #if defined(CONFIG_DYNAMIC_DEBUG) #define dev_dbg(dev, fmt, ...) \ dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) +#define dev_dbg_level(dev, lvl, fmt, ...) \ + dynamic_dev_dbg_level(dev, lvl, dev_fmt(fmt), ##__VA_ARGS__) #elif defined(DEBUG) #define dev_dbg(dev, fmt, ...) \ dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__) +#define dev_dbg_level(dev, lvl, fmt, ...) \ + dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__) #else #define dev_dbg(dev, fmt, ...) \ ({ \ if (0) \ dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ }) +#define dev_dbg_level(dev, lvl, fmt, ...) \ +({ \ + if (0) \ + dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ +}) #endif #ifdef CONFIG_PRINTK