From patchwork Fri Jan 7 05:29:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Cromie X-Patchwork-Id: 12706290 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0886DC433F5 for ; Fri, 7 Jan 2022 05:38:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=P/0iPbRtTQvJiyfFxphggl4YpBTwiYgwCTxEzV7qN/k=; b=2MvGEbQYe+2IIc U/3HsRxDqjvw5RpMhN75C/v/qOE8UuLLTQ/bsP67wmViD6yf1aC7TQanJGKUoeXGzsDOO5+5s58Qc 6uGLv/b4Fr0sgx2GCMxh32HnwHKtxkWqKG+PRZSdzq7PlpphpRqsE3pZaJ4wL7CxElmfaKnkL6xQQ KVMuerctOQNwRyBQkiELt3jYyHMMnvtLFsTr01vT369IsgmDZTVi8QLEMVK45czmHEQLdIfhmrhZE kEeuB7N7Mwq9JN0/+RYxubGfGBZntNximKM9bxQ+ytBGoQ2ZQN/b7LSQUI3IdtylFJxs6FSZL3y8g RwEHqKUffymqM7PmABOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5hvE-002QHe-Gw; Fri, 07 Jan 2022 05:36:17 +0000 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5hpI-002NOi-1m for linux-arm-kernel@lists.infradead.org; Fri, 07 Jan 2022 05:30:09 +0000 Received: by mail-io1-xd2e.google.com with SMTP id p65so5849447iof.3 for ; Thu, 06 Jan 2022 21:30:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fs9SXvpvEEnkA+pZj7l54+pYQd7M1OVNoq6NoKKp5pE=; b=BPvCeyaEsfkyYHJplLo278shtoIIb9ttoxvNbZHAmTThf0T7b3rtFx2a9vUqNjwfch nioeXn9/nQgokrJmOmYK7+lr0g8nICaJBJ3Q4VI6rRotAKLBeTIMbxum2W3CpjVblIYE M1NTdeWOTZn7ugu7aIsCs4JuwjgHyVnQTbaPdKo4G+cox7pD7igqayZaElp86ZUk496Q kL7oKgoL7MofSKtlH8pkHPDrmGVacnLJTs3AuN2KCdUUYu5tRSweIKgg7xAq1gdSJjnK JtZZ+tfuAwxsJ0/GoTVV2w7fUuyWt5NZSSib698HNisxorA4k54ln+rMEUBH9shuVVKj Ut6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fs9SXvpvEEnkA+pZj7l54+pYQd7M1OVNoq6NoKKp5pE=; b=50FisNcukX3tGskq1TQwxFAU1v/DwXLuOY4Bvtr/7htt1TBdtIe5HDHeK4UAnfGa0V w8TB6wVjk2T15ZnxnkHl4xBmvx/+2O7Ggk/hbCoklSqurwHT093i892a43UwO2oxdVa2 PNfHQdIZDk2c+1I3Vg2NSf+1sDYqVUfez268Yy+gaQ4KqRJ6cdhmdlnY7MH+zJTefIGs yB1Q1wp8ulGre+W5g820vgMF9zxop6AaCxJqd6vlwGXf43v355ZO8EREfDAOXT+got7e DL5x+T8RvKwzbBAYCDmtJZch731ujQxkje9XwiUsHN8DqzSwCTAno+Pg1PlflUysxkEb LXwA== X-Gm-Message-State: AOAM533aJoXRVr0uTi6iI9ZSUyyWT/q6IDezG3tE+Pbaw7OQPh5Rs3yf FuPdYopOsT/A6ShtId9Xhp0= X-Google-Smtp-Source: ABdhPJx7+AElBptGJel+f8XWKrTSvq1aQzmSbXkyUTKq/TkWKsGnfjRusoZRcHuw2zq/ku/ipdX6lA== X-Received: by 2002:a05:6638:1244:: with SMTP id o4mr26844964jas.80.1641533406977; Thu, 06 Jan 2022 21:30:06 -0800 (PST) Received: from frodo.. (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id c18sm1843446iod.18.2022.01.06.21.30.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 21:30:06 -0800 (PST) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, linux@rasmusvillemoes.dk, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, daniel.vetter@ffwll.ch, seanpaul@chromium.org, robdclark@gmail.com, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: quic_saipraka@quicinc.com, will@kernel.org, catalin.marinas@arm.com, quic_psodagud@quicinc.com, maz@kernel.org, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, mingo@redhat.com, jim.cromie@gmail.com Subject: [PATCH v11 14/19] drm_print: prefer bare printk KERN_DEBUG on generic fn Date: Thu, 6 Jan 2022 22:29:37 -0700 Message-Id: <20220107052942.1349447-15-jim.cromie@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220107052942.1349447-1-jim.cromie@gmail.com> References: <20220107052942.1349447-1-jim.cromie@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220106_213008_119365_D6042D4A X-CRM114-Status: GOOD ( 11.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org drm_print.c calls pr_debug() just once, from __drm_printfn_debug(), which is a generic/service fn. The callsite is compile-time enabled by DEBUG in both DYNAMIC_DEBUG=y/n builds. For dyndbg builds, reverting this callsite back to bare printk is correcting a few anti-features: 1- callsite is generic, serves multiple drm users. its hardwired on currently could accidentally: #> echo -p > /proc/dynamic_debug/control 2- optional "decorations" by dyndbg are unhelpful/misleading they describe only the generic site, not end users IOW, 1,2 are unhelpful at best, and possibly confusing. reverting yields a nominal data and text shrink: text data bss dec hex filename 462583 36604 54592 553779 87333 /lib/modules/5.16.0-rc4-lm1-00008-ged3eac8ceeea/kernel/drivers/gpu/drm/drm.ko 462515 36532 54592 553639 872a7 /lib/modules/5.16.0-rc4-lm1-00009-g6ce0b88d2539-dirty/kernel/drivers/gpu/drm/drm.ko NB: this was noticed using _drm_debug_enabled(), added earlier. Signed-off-by: Jim Cromie --- drivers/gpu/drm/drm_print.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c index aab29dd6cad1..b911f949af5b 100644 --- a/drivers/gpu/drm/drm_print.c +++ b/drivers/gpu/drm/drm_print.c @@ -23,8 +23,6 @@ * Rob Clark */ -#define DEBUG /* for pr_debug() */ - #include #include @@ -165,7 +163,8 @@ EXPORT_SYMBOL(__drm_printfn_info); void __drm_printfn_debug(struct drm_printer *p, struct va_format *vaf) { - pr_debug("%s %pV", p->prefix, vaf); + /* pr_debug callsite decorations are unhelpful here */ + printk(KERN_DEBUG "%s %pV", p->prefix, vaf); } EXPORT_SYMBOL(__drm_printfn_debug);