Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2563930rbb; Wed, 28 Feb 2024 06:01:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWQLcZ6eJ3GNBqiYH9likVHu3VXMfvpMBk68aPryn+NCtMoyYl8odL2uvPUr4q775bGhZIwlYglCB5PJOharG1BPPWXzEcAfJLXBTYzbg== X-Google-Smtp-Source: AGHT+IHtiYLx5pTvfsjS6Q0Jj+/SQuHVL9xE7hBaAISFlhqCV3DsKUzIeZ58N236a/d5sGWRX/Ma X-Received: by 2002:a17:906:3749:b0:a3e:b263:d769 with SMTP id e9-20020a170906374900b00a3eb263d769mr8202197ejc.4.1709128863286; Wed, 28 Feb 2024 06:01:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709128863; cv=pass; d=google.com; s=arc-20160816; b=U+f2sA8n1HVzaaLzbiOtjVK7oQuUPaTlvf5ctPWpwLbcY9rPra+/4M1Ce7lxo0ag9H 1ngG+U09/+/tQVQQTnZ4u1EgZXGip9RYbZQuTxpiQ16AD/rQgT7p3VwYiXQSJKMO839b WEw5zd92+KwGBbvomIeNz3h/Pt6nIfj9Zc+7KTK32aZV8DJ29F5TzOwkV25BM47hAjqX wobtgenrnxeCeri02utZiYAEOH7ldhG43HIXj/aViI8XMsfxhPGkWRq3EH3DWi7Rc4bH ROSxWt+vjjUolBi+lEVYnEsOgdthzz238E1V0/a07qgDr8sSr0Yod5RUZ3eN8CeAw9cL 5ndQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=bGJ0L0ITM0B3ncHkDNE6gDRkLCS6xZfRL2wzpitUjXo=; fh=pROKrtudychdWfX1/6j/Uq9afXUKMuzpYQEwL/mZsxw=; b=OT+yNASrTgh+LBTa+dMqliXYrr+xBn5Slvh7jW8iTpVRXfcQEZ2k5JU/cnW+i24m/q PhjTXaZvN1iAvc7iHLez19BH4b/j/koWoWVO/annL6kVcA5Kpek8nkZhkKUwmTd6R+fM egvvYLIeajokqCm9fYTJJSHu7czaCGBlMeDNj3r4RHKJnwlBA32W7D7q6DgT/QcDorKe bt3eO9YAvX0Tdkt29mqtAjdccneqfF4+ZP3O18Sl6gRvDM35mV2QfI9gozFb6RJDmdIu 7jVUW7klFTmvpcAkcLN+stwbdXlZVgJpTRl+ls/Vzzv4+/qJVLGr/TSZNwX6vB+LoIS9 j8/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-85147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85147-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c16-20020a170906171000b00a4305d78651si1717213eje.99.2024.02.28.06.01.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 06:01:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-85147-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85147-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E80A51F28BF5 for ; Wed, 28 Feb 2024 14:01:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D024D158D60; Wed, 28 Feb 2024 14:00:24 +0000 (UTC) Received: from andre.telenet-ops.be (andre.telenet-ops.be [195.130.132.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C200B14EFF5 for ; Wed, 28 Feb 2024 14:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.132.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709128824; cv=none; b=O/NzZL1EzgyKwBNJvaKa12R4WuxGDcwU/0Eqkj+NvaAnJ7R/uas2MYsEluWtO2BLkMpQtxj/nUXeGo5vxyFUMYG0Dg3X+JC6OYlO5tKokyJGGsIdNK3QTVzPMDaCXtWGC69el7POOs21kwNkRqCXYkyRzs5juULGr03b+rsWyPA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709128824; c=relaxed/simple; bh=QsCae0o9eyN75UvvnzCtyzD7Q33sU4Xy0REKuZlqxLw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AqK9ULyrcgNEUJqv40mBHzLyLLb93g89XHSaTTB2chvCb5dZigK8QdLIKgR8zKaQiIXrpnQO19+kPR9GDgGTPRPNqh7RTnIDfJ+qTS64HloUp6rAizIaqsahXMI3jaok5AVf7T5tstIMt15tYBqeJ0YDldYvwPlDMHjR1DBZbnI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.132.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:48c4:26a9:d9ec:22cb]) by andre.telenet-ops.be with bizsmtp id se072B0074gWvPH01e07Ym; Wed, 28 Feb 2024 15:00:13 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1rfKTV-001tZC-DU; Wed, 28 Feb 2024 15:00:07 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1rfKTe-006hlF-Uu; Wed, 28 Feb 2024 15:00:06 +0100 From: Geert Uytterhoeven To: Chris Down , Petr Mladek , Greg Kroah-Hartman , Andy Shevchenko , Jessica Yu , Steven Rostedt , John Ogness , Sergey Senozhatsky , Jason Baron , Jim Cromie , Ilya Dryomov , Xiubo Li , Jeff Layton Cc: linux-kernel@vger.kernel.org, ceph-devel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 3/4] dyndbg: Use *no_printk() helpers Date: Wed, 28 Feb 2024 15:00:04 +0100 Message-Id: <32e18ceb528b99d9147be9c1af578a1965e2bad9.1709127473.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When printk-indexing is enabled, each printk() or dev_printk() invocation emits a pi_entry structure. This is even true when the call is protected by an always-false check: while the actual code to print the message is optimized out by the compiler, the pi_entry structure is still emitted. Fix this by replacing "if (0) *printk(...)" constructs by calls to the corresponding *no_printk() helpers. Note that this has minimal impact, as most (all?) callers of dynamic_{pr,dev}_debug() are protected by checks for DYNAMIC_DEBUG anyway. Still, using the helpers serves as a good example to follow. Signed-off-by: Geert Uytterhoeven --- include/linux/dynamic_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 4fcbf4d4fd0a29d1..ff44ec346162a164 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -305,9 +305,9 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, #define DYNAMIC_DEBUG_BRANCH(descriptor) false #define dynamic_pr_debug(fmt, ...) \ - do { if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); } while (0) + no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) #define dynamic_dev_dbg(dev, fmt, ...) \ - do { if (0) dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); } while (0) + dev_no_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__) #define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \ groupsize, buf, len, ascii) \ do { if (0) \ -- 2.34.1