From patchwork Tue Jun 9 10:46:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 187661 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp407029ilo; Tue, 9 Jun 2020 03:49:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRjZ5YGOMbwx8WzQJ70f4/8IFG1Q2kTkIW0kwQnir0qYYDZtacLMvVfFKYxb3vTQEPklOU X-Received: by 2002:a17:906:1f15:: with SMTP id w21mr23102282ejj.265.1591699775174; Tue, 09 Jun 2020 03:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591699775; cv=none; d=google.com; s=arc-20160816; b=GjHGZeLtTWAUFd2NEKv2jZ/M99xfaeQRPtG3Lxdvw/8g1eG4KBmcrwDGb7exDh4PVM 8OKLMp9PcrgLxzyhEFWfWBoREqvyrFkLvJZCI0a0iBw+62Ov2UW6cIOwinxOtZwIdszf 2nZPU3j+jlWFMQy8LSpI9P5AdEeZdec8hdUzSWN3+qTmmUU1BjDhJNGHsbd5vTBuHyZa xnSBQN7d+AyEIyI/1Tqz0sOTF9WmeJV9rDWbIdut0UAS+mK3aehXknA/iYg/4mO021j2 dF2Ip6uOoLOHzaHO9tVclHxyYqNd4MWZRA+fQkv//bS35puOS5vKY8wOHXpMj+nVPaJk CrGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=nJBKYN0yMS8AJgBotdxC1qOHMAr254b0bdL2BOSVBX8=; b=pDX9xdWw+4JOEr+3PHyV/EUm+8k582hJpbBR020SDruaB3Aqym8Ao3xjJJ/a8HV4cV wM6wqS0jRcY3W9nYBwQGO+WOPXMaJZRspGRsl7X6W4BmfW2eaIAkrEE5CFtFHUWHTcXT tBiZ76zOtIre7LPUeqijfRJgdNQI/EqS8+2n0Hf9Bwp3m5z0Fes+L5uSu7z71f8GxW4i of2QUaq4qDaoXWvYM+gyrQi1rfAe4fxJowh1eK0ap2qtwKtrGcj2LoxxFJQu86x+NsJQ 65URZ0KGgFjmU9J2+mAg9MCWvxfhg6LoqENhEPeNHM0xsrz+vXCPx1MjeiaS7VhB08gW jJkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q35TGCGg; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si10208506ejb.517.2020.06.09.03.49.34; Tue, 09 Jun 2020 03:49:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-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=@linaro.org header.s=google header.b=q35TGCGg; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727941AbgFIKtc (ORCPT + 16 others); Tue, 9 Jun 2020 06:49:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728902AbgFIKrw (ORCPT ); Tue, 9 Jun 2020 06:47:52 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27128C008638 for ; Tue, 9 Jun 2020 03:47:43 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id o15so21789129ejm.12 for ; Tue, 09 Jun 2020 03:47:43 -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=nJBKYN0yMS8AJgBotdxC1qOHMAr254b0bdL2BOSVBX8=; b=q35TGCGg2mkkEjc2wKlEhVaWy46yXIz+7jdW6N6OkmJb73py5fZiUzxTInYQq0bo+F D97pelWumzAAEdcO8aFTs9/xmUjvxBzF5dgRrVlNpV0QPs4BmirmqiXT60dogulqVqDk /2/8mlHTtSWjanvIyzfTh11muRWkGWkVC1kL+s9b3aXLnqcsYKp4KBrqOK4Gd54yPPet n8MSEc59ajB3s538tDFCCfQD/bylg4wisxrZJMp9ApiHtzVsi+QMSeyoo0xeNqwe8zhv TTgpCcwVcQ1EuY5KZIhARuAFN4xdFt8NdIM8OlX4WRiuMtUaKoYHy93CvXg2HxkKZOv8 12mg== 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=nJBKYN0yMS8AJgBotdxC1qOHMAr254b0bdL2BOSVBX8=; b=qErtOHRDCUgA1/lQQNHw5SwiRJ0y0TwbOfVROLHKLzKMCBeGJCcUKfsj/h8drg83ow K1y2q8eMYqB53HzS8LQnjnufu4KXfVskE71y7EEscY9MYaempv/XBDDf9hhPSxhScia7 RBWNv0HmHdWE6bP9b8/ZXvM+CJkXQLl6BcuChQcEoN4rpVRaomIb2NbO8Rj8DjAutlkp wMiWya8CwvnZJsM+impvEkm3jeKJOsstsWsPPKLXQuis1OoE1Qf/BbH9YWynxLvx/KDX cVxTYIANpp9+3lVRB9aO6/62apPKh54lEiMLGqdLhEP3boclGc3JaDvNlbDtnnWipxBF tBIg== X-Gm-Message-State: AOAM533WToIneGE4MatZg9lLb8bZ1GmbkrvwKMnO8TZjsg5PkKMnrPtZ ovE84aBJF4Uycx9xYz9tIHxr2w== X-Received: by 2002:a17:906:e247:: with SMTP id gq7mr24263420ejb.107.1591699661849; Tue, 09 Jun 2020 03:47:41 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 03:47:41 -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 4/7] printk: Add pr_debug_level macro over dynamic one Date: Tue, 9 Jun 2020 13:46:01 +0300 Message-Id: <20200609104604.1594-5-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: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Introduce new pr_debug_level macro over dynamic_debug level one to allow dynamic debugging to show only important messages. Signed-off-by: Stanimir Varbanov --- include/linux/printk.h | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 diff --git a/include/linux/printk.h b/include/linux/printk.h index ceea84aa705b..2a6eca56010f 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@ -416,12 +416,18 @@ extern int kptr_restrict; */ #define pr_debug(fmt, ...) \ dynamic_pr_debug(fmt, ##__VA_ARGS__) +#define pr_debug_level(lvl, fmt, ...) \ + dynamic_pr_debug_level(lvl, fmt, ##__VA_ARGS__) #elif defined(DEBUG) #define pr_debug(fmt, ...) \ printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) +#define pr_debug_level(lvl, fmt, ...) \ + printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) #else #define pr_debug(fmt, ...) \ no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) +#define pr_debug_level(lvl, fmt, ...) \ + no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) #endif /*