Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10214647imu; Wed, 5 Dec 2018 18:52:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/VFRIGQi+m0fq3sGJ6cnLldKW1VpntlP/LZ2odDrq5f/V03EdZg1BkNAaJij0L/OlV73PMe X-Received: by 2002:a62:cf02:: with SMTP id b2mr27977575pfg.183.1544064764114; Wed, 05 Dec 2018 18:52:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544064764; cv=none; d=google.com; s=arc-20160816; b=FFZBK2BHbEGrzZv5pIwHDEAS+6HcvDSk7AP5q55S5W3PZMNkDeazer5KML1LYzlTeU r7GrfiF2tNx/KbbDwIhclLgDLyoMJGbfl4pLLrSuprbmSCFRmGe3J5ZVEMtT55Ad01PI SndYOJ/M9itlvNqo9d0Fao3CwnIMQoZlTxzjXGDEPWCXxkjtwTQVMz7lmFQnZUpDv6/n rJ1kVCo/rtwltxY+dmhu9WyWv7TqWZXlVOiFGABKx/C09y58DpKIuhAx+6a/cdRA6zXY CdEqn2HniL5xktXh1XJE0HW4FcZtUoLhRcsBm8oJd2dzSM7TdzjX/GzQSz7ImOT5yjcv CtCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=JkiQOr2nqWmeh0Yd93BL3UuhzH3KQJbON45xf1EFHZQ=; b=hanfuGLSauxzbP/CMSIIxzffctcOBvDGWzSgKbniDz6o4gfTGl1vX+ybmwoUn8ns+q 26eb6SmJ2P5M9TgXPAasVfY8X+FQlMxvvBR/J8BfLf0xNC8fqY1MK0xQ4Zx9ecLG1VYD loE8tA4xBnaKdi0QSkqTA4tOcYhe3KrTVNai06vRC3V83felaw6/74LCBcblMNx/kcYR H/xLfYlWdq15k97hrzYBwMfONUQnFoeitgJ6tnxWPzti2F6NaPbdoYuA2V5+Hs8ZaUii 4IvOabTf+gikm6bCU11FH2MEOuKs6WLJ+oovmudavFenfZApcazueLo+8yEqj9w6zLHg k1Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g59si22760629plb.302.2018.12.05.18.52.26; Wed, 05 Dec 2018 18:52:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728648AbeLFCvr (ORCPT + 99 others); Wed, 5 Dec 2018 21:51:47 -0500 Received: from smtprelay0143.hostedemail.com ([216.40.44.143]:56688 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727804AbeLFCvr (ORCPT ); Wed, 5 Dec 2018 21:51:47 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id B77A7182CED34; Thu, 6 Dec 2018 02:51:45 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:4605:5007:6119:7514:7576:7903:10004:10400:10848:11026:11232:11473:11658:11914:12048:12114:12296:12438:12555:12740:12895:12986:13439:13894:14096:14097:14181:14659:14721:21063:21080:21451:21627:30054:30064:30091,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:28,LUA_SUMMARY:none X-HE-Tag: ray11_666d8984bb302 X-Filterd-Recvd-Size: 3538 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA; Thu, 6 Dec 2018 02:51:43 +0000 (UTC) Message-ID: <1586a49594d30b4bf4d88eba0d258e21efd26da2.camel@perches.com> Subject: Re: [PATCH 1/2] drm: Only #define DEBUG if CONFIG_DYNAMIC_DEBUG is disabled From: Joe Perches To: "Zhang, Jerry(Junwei)" , Michel =?ISO-8859-1?Q?D=E4nzer?= , Christian Koenig , Huang Rui , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Chris Wilson Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Date: Wed, 05 Dec 2018 18:51:42 -0800 In-Reply-To: <10fca21a-5d7c-fe9e-07f0-6200e9de538e@amd.com> References: <20181205165621.5805-1-michel@daenzer.net> <10fca21a-5d7c-fe9e-07f0-6200e9de538e@amd.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-12-06 at 10:40 +0800, Zhang, Jerry(Junwei) wrote: > On 12/6/18 12:56 AM, Michel D?nzer wrote: > > From: Michel D?nzer > > > > The following cases are possible for pr_debug(): > > > > 1. CONFIG_DYNAMIC_DEBUG disabled > > a) DEBUG not defined: pr_debug() translates to no_printk(...), i.e. > > it never generates any output. > > b) DEBUG defined: pr_debug() translates to printk(KERN_DEBUG ...), > > i.e. it generates output which doesn't appear in dmesg by default, > > can be enabled dynamically. > > > > 2. CONFIG_DYNAMIC_DEBUG enabled: pr_debug() translates to > > dynamic_pr_debug() > > a) DEBUG not defined: dynamic_pr_debug() generates no output by > > default, can be enabled dynamically. > > b) DEBUG defined: dynamic_pr_debug() generates output by default, > > can be disabled dynamically. > > > > The intention for drm_debug_printer() is to generate output which > > doesn't appear in dmesg by default, but can be enabled dynamically, i.e. > > cases 1b) and 2a). However, defining DEBUG unconditionally gave us 2b) > > instead of 2a) with CONFIG_DYNAMIC_DEBUG enabled. > > > > Fixes: 79a5ad2fdb3c ("drm: Enable pr_debug() for drm_printer") I very much doubt this is a fix. Did you read the commit log for this commit? It says "make sure it will always produce output" And why didn't you cc Chris Wilson, the author of that patch? > > Signed-off-by: Michel D?nzer > Reviewed-by: Junwei Zhang > > > --- > > drivers/gpu/drm/drm_print.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c > > index 0e7fc3e7dfb4..ee56e4a1b343 100644 > > --- a/drivers/gpu/drm/drm_print.c > > +++ b/drivers/gpu/drm/drm_print.c > > @@ -23,11 +23,13 @@ > > * Rob Clark > > */ > > > > -#define DEBUG /* for pr_debug() */ > > - > > #include > > #include > > #include > > + > > +#ifndef CONFIG_DYNAMIC_DEBUG > > +#define DEBUG /* for pr_debug() */ > > +#endif > > #include > > > > void __drm_puts_coredump(struct drm_printer *p, const char *str)