Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10587856imu; Thu, 6 Dec 2018 03:43:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/W2T1y1Amr4+AAZqw59DyRbaBusAuTo/4iws/n83rJ+NKL0FnSNALMEyVIPPpPaqwXvfbqx X-Received: by 2002:a62:345:: with SMTP id 66mr28013805pfd.189.1544096586873; Thu, 06 Dec 2018 03:43:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544096586; cv=none; d=google.com; s=arc-20160816; b=Hlqc0yvtlVLoBb68Mqdh1tiG+MtMBOKPbvX+UR8/4q4BpbxwlSHtgZCCONGIvquPp9 vMnWASBDdwlfAQAwUTKZMTP1XvlPBrk1wzM2qSTAobDy20o0LNpseox+Y25MyIMQhjKf MAv5x03bELiksUshg+qAj5X2a5t80UuOOHs/k1J922oFpN6rgqEwVxUQHKfew+WPxO3t NNVCKELJ3gONfdKkVgC5mtafxM1zVu9N0A8ax5KfHUZXElbXucNOK9rkuvIUU/DIXtkK Km5JxpUaQ4FVsShBM9gg2TeehXT19dbDBNTdenxw0xyF9db67VJbWGj0gIelbFpJd4e/ 6OPw== 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=hSQJ5adkdz8K6l7mEtIxObRr5rJYg5XfYEgZX3flQ7A=; b=OQaRIySoX8J0bo0JwKiKXFhZAJztlI80lqhYsYsfpGvLWVyn5m94P5gouNht6Ula2B bgZHqNZ2G4FOjlBG4VsqOfjBYbP5t3hAuN4lP5DaTWTt6IhzPESO292p7iiGMUw+w/wn d7gg17H99dYlYDl00pw5Z3CR+uDW45xLTCqsibM1BCgjog/uJYzkAsy8gehzsFQrcXM6 add3bvUmQibVwh13KXnuEvDvzdV1HJyBHCZ7DCHR7ZNcDLm6dLO9zRE+tGWS2Yqyz6Oy vENLSf9cJ6MJA4mprRgd09hPKVcUbq8D2eJu+k1RY/8VjipEAbFRepQ9sxRDPaDohyU2 7LOg== 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 8si83903plc.88.2018.12.06.03.42.32; Thu, 06 Dec 2018 03:43:06 -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 S1729025AbeLFLl4 (ORCPT + 99 others); Thu, 6 Dec 2018 06:41:56 -0500 Received: from smtprelay0152.hostedemail.com ([216.40.44.152]:41939 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727832AbeLFLl4 (ORCPT ); Thu, 6 Dec 2018 06:41:56 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id 7723318047610; Thu, 6 Dec 2018 11:41:54 +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:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2110:2393:2559:2562:2691:2693:2828:3138:3139:3140:3141:3142:3355:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:4552:4605:5007:6119:7576:7903:10004:10400:10848:11026:11232:11473:11658:11914:12048:12114:12296:12438:12740:12895:13439:13894:14096:14097:14181:14659:14721:21063:21080:21451:21627:21819:30021:30054:30064:30070: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: town23_4a9b2de08394f X-Filterd-Recvd-Size: 3790 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf17.hostedemail.com (Postfix) with ESMTPA; Thu, 6 Dec 2018 11:41:52 +0000 (UTC) Message-ID: Subject: Re: [PATCH 1/2] drm: Only #define DEBUG if CONFIG_DYNAMIC_DEBUG is disabled From: Joe Perches To: Michel =?ISO-8859-1?Q?D=E4nzer?= , "Zhang, Jerry(Junwei)" , Christian Koenig , Huang Rui , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Chris Wilson Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Thu, 06 Dec 2018 03:41:51 -0800 In-Reply-To: <276fbf7f-d33f-83a5-cb88-bd4051dc03ba@daenzer.net> References: <20181205165621.5805-1-michel@daenzer.net> <10fca21a-5d7c-fe9e-07f0-6200e9de538e@amd.com> <1586a49594d30b4bf4d88eba0d258e21efd26da2.camel@perches.com> <276fbf7f-d33f-83a5-cb88-bd4051dc03ba@daenzer.net> 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:23 +0100, Michel D?nzer wrote: > On 2018-12-06 3:51 a.m., Joe Perches wrote: > > 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" > > I thought the commit log covered this, suggestions for improvement welcome. > > Chris' change addressed case 1a), but also took us from 2a) to 2b). But > we want 2a) > I suspect Chris missed that pr_debug()'s output is visible by default if > CONFIG_DYNAMIC_DEBUG and DEBUG are both defined. I believe you and Chris have different goals and that your point of 2b is misguided. I think the language used in the Chris' commit log is plain ans obvious. 'always produce output'. > > And why didn't you cc Chris Wilson, the author of that patch?k > > I used the get_maintainer.pl script. Thanks for adding Chris. > P.S. FYI, your e-mail had a very aggressive tone to me, not sure what for. No worries. I think the language I used is also plain and obvious and you are overreading. cheers, Joe