Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3278988iob; Mon, 16 May 2022 17:59:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwVxOlRKr3VmMwGexSO67JRv/wqMDj6WwvYcDJXTWj8LBaT+2ezIh0Um/HLl5VLqTZ/Hbd X-Received: by 2002:a17:907:7204:b0:6f4:2c26:5f7 with SMTP id dr4-20020a170907720400b006f42c2605f7mr17481455ejc.506.1652749180750; Mon, 16 May 2022 17:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652749180; cv=none; d=google.com; s=arc-20160816; b=0+x0RWn9Mxf+AAgQUnj89hri3ciFbOZFwi2j9m50t5tMe5wfYNDXWP4yXhsybgYz0f JYEK/SAuH/XHDDYZfuT/F9dC+OzZpmF/s8Qdfk/OqTaDKkvT9dJOHJjXnz5CfVJKpO09 gOD+QIevrneiBPUnb8u0e8zD3TouAdJbp0NHESNwBYNN+Elz35ot+X4/iVB2iRHYXNy+ Bh2CQuEQoc2k+WI+f3NXW/ukUSvvk9CKoVs5tJD4FycKbJ16m3JwZx9MU8dDI6Xbb2Qt 1on9YidQf+5xazVCaXWSS8w+xL/NSOtXEnGj0qbzvebqi60YDTdb6lHwj46yIR9hTpj1 HW0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=275OPBiQ2XPDTBRqKvoZzw/+Pf2YOYW8BZL5aogRIAM=; b=tCUr0M5Gm9VCQo4JB2KbGwFFxhWx/Oy/Vdczl3yjvshwJknB4SAyXJp+55eFxo+I0y gbAHDkKV4q/ydh6o0geV1g2+v1y86ZFldPlP0USn2vzULDrPLXlYdtWNpG6/oWczlsyu e/oCBw3IN/aAAsiTAbQAi2ziChueIllBhBuT8AuwaKemK6K9TNbuFUkuZRHrPtgyP3p6 gLHJNyfqxzJDx8a5DGTe23WlVQw3YaISeOMF+q0NOx5+03GoM26wA1GoPXcxVp0CrY3J 12qsVMtmpqoTNv7WaLJTlJ+lxr/XwPWtSGZjcoVeTDaMiLgOpgL0b765m8Bn/NkqGhw9 zW1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="erXw/Yod"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i3-20020a170906444300b006df76385e67si920872ejp.775.2022.05.16.17.59.16; Mon, 16 May 2022 17:59:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="erXw/Yod"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350027AbiEPW7B (ORCPT + 99 others); Mon, 16 May 2022 18:59:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350034AbiEPW5a (ORCPT ); Mon, 16 May 2022 18:57:30 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A55146650; Mon, 16 May 2022 15:57:28 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id y12so9273223ior.7; Mon, 16 May 2022 15:57:28 -0700 (PDT) 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=275OPBiQ2XPDTBRqKvoZzw/+Pf2YOYW8BZL5aogRIAM=; b=erXw/YodA3OXO6nPINUovqh61wUerUIUtr0unKej/ygKy09BntPa7b2Ga/snFnWqRN mtoKDgBhHIuI18S7owrD22QKbctFTy/M6o9shAJ6+0ouzudUyjANzXNDMc0Q3hIV+f5q XnYixuoQFoJZCiCQDsXoPHqPdfWbeEA0c/7106IbTnzOiTQOCS35fre1X9yfUACWftd8 LgQfxHSO1ccHM7ZFABS+oM9u+ZYIQfZXUVXowulqyibhSPLwsJiSFjdYhvpsOOygWG+u n6kLxDSr0CYelPk7OPO3/RynfWIFOXZ/aAUWpWWu1hoV6RWlrK08yikqaaHJMadlmP8H L6Cg== 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=275OPBiQ2XPDTBRqKvoZzw/+Pf2YOYW8BZL5aogRIAM=; b=MvvIecrdZ5eUAABg4mBqYwXsyVwSYYrdacpF7qMBRkdBXb74yl6xST+C3eKocZwlu1 GAVS2V6p1iOKKaRCCU/TertSdHx6AxZ8A310KGWCca5DRIgivTx/tx/7NHfo9HwFy/gs mVSYQmOBOktblc2Wb/vbhv/PhLiObapYb4R0e2FEX+Bou4v5fP6DLbrmOMIEIPp/iYIR bZPranxq1cMkIEXzYVeN9YAXITY2kMoLoV+EuS4Wvqs7N90InxKbyJsor2mBLXImW6sa I/rVzPVIQHQhwB5tAlOHjPlxlYYfpmagGDDVb9zI3Q5nI9AVuxT0dxu3kC+o6YaPY9UC 2IQA== X-Gm-Message-State: AOAM531hd90Yw8KhBd+a1SEMmChGZehI07geHa99qGLxdooosqezczyK 5XOIKzVfsTCtQxJ63Azp2f8= X-Received: by 2002:a05:6638:b:b0:32e:3b8d:3e5d with SMTP id z11-20020a056638000b00b0032e3b8d3e5dmr2979106jao.91.1652741847355; Mon, 16 May 2022 15:57:27 -0700 (PDT) Received: from frodo.hsd1.co.comcast.net ([2601:284:8204:2010::dd9f]) by smtp.googlemail.com with ESMTPSA id k26-20020a02661a000000b0032b74686763sm3133949jac.76.2022.05.16.15.57.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 15:57:26 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Cc: gregkh@linuxfoundation.org, daniel.vetter@ffwll.ch, seanpaul@chromium.org, robdclark@gmail.com, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, 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 v2 21/27] drm_print: prefer bare printk KERN_DEBUG on generic fn Date: Mon, 16 May 2022 16:56:34 -0600 Message-Id: <20220516225640.3102269-22-jim.cromie@gmail.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220516225640.3102269-1-jim.cromie@gmail.com> References: <20220516225640.3102269-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 /kernel/drivers/gpu/drm/drm.ko 462515 36532 54592 553639 872a7 -dirty/kernel/drivers/gpu/drm/drm.ko 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 22b7ab1c5c40..1b11a15366b7 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 @@ -172,7 +170,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); -- 2.35.3