Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10886096imu; Thu, 6 Dec 2018 08:15:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/UcW17KHuZpAlklUGyr/UusCcFZSUGYvl145owPu/bjpDUPevKN1eJ0P5IIf+bYfn+ateFk X-Received: by 2002:a63:ee0e:: with SMTP id e14mr24062285pgi.8.1544112945894; Thu, 06 Dec 2018 08:15:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544112945; cv=none; d=google.com; s=arc-20160816; b=KHAax//aEOlf7rTtrAAurvpSSvBAGlndHpiOaH3KSIh6MUN5OgVVlvlQmfoqCL6o4f Ow/5BvBNoWOOVC6ki3ZbvKsFgIXPrUAMQudddT9Yqqc6qrkQOHgItoN/6qvDhjIYGiaH YYHEgejFPrUJ5N+AxEL/rR9Ndb5KI+OvIq+ZsE/3PWgi9+ILGW+8WA3xqDRBVfuJ9RKh xrWglP1VdCwGSbGvvRSOwroXUzF9ldqWH//RKC/6j7MGO3E8aWaz4sQSNEJqlytytsR8 i6Ny3MoEKiqsq8H7s6nFAgJ8Qx/q6Mrvkoi4HzrHocuQf9wPPjpgXwV3WUSWepvdPQtc bqGQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=T+jj329TMPHxrZVJCKOCJSsL+yHjfA7htgI+++bVdTY=; b=rI5wiHcDL/8YmeJO7HFlPnXWKN95tS60M47pTURE1ukTrPkpXOpt8wAeuZWtXHEZtL ABBSv03YntPFxDyBwH1GHydruzhvb2oXHTayfhxZJP1T2rhs48vXUG5qiU3Xs/n9RDwT STG0xygMAIvAtE4fW0NPh0Lx8dP/+bR7ewIbaHhx0Ii+9dy1nGeVyKicJ/xGSv+Ioun4 5bfC377DzSO+AViQm/YsNQa6X5EMYpBUk3bZ4Jkzrr04I+AmzL4IlbDSVxBC4DsHsYO6 elmlsTBiizRxwtB+YciAF+w/TuImuQtozj+eQx652kqSVFY8x1pEbLUvMXSAmRntgtjg 8gQQ== 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 z6si576143pgl.109.2018.12.06.08.15.17; Thu, 06 Dec 2018 08:15:45 -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 S1726180AbeLFQOO (ORCPT + 99 others); Thu, 6 Dec 2018 11:14:14 -0500 Received: from mail.netline.ch ([148.251.143.178]:34320 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725896AbeLFQON (ORCPT ); Thu, 6 Dec 2018 11:14:13 -0500 Received: from localhost (localhost [127.0.0.1]) by netline-mail3.netline.ch (Postfix) with ESMTP id 4D3AA2A604C; Thu, 6 Dec 2018 17:14:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at netline-mail3.netline.ch Received: from netline-mail3.netline.ch ([127.0.0.1]) by localhost (netline-mail3.netline.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id y_p9IVZEyrvC; Thu, 6 Dec 2018 17:14:05 +0100 (CET) Received: from thor (39.1.199.178.dynamic.wline.res.cust.swisscom.ch [178.199.1.39]) by netline-mail3.netline.ch (Postfix) with ESMTPSA id 74A0A2A604B; Thu, 6 Dec 2018 17:14:05 +0100 (CET) Received: from localhost ([::1]) by thor with esmtp (Exim 4.91) (envelope-from ) id 1gUwHs-0007Hh-Ux; Thu, 06 Dec 2018 17:14:04 +0100 Subject: Re: [PATCH 1/2] drm: Only #define DEBUG if CONFIG_DYNAMIC_DEBUG is disabled To: Daniel Thompson Cc: Maxime Ripard , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Zhang, Jerry(Junwei)" , Huang Rui , Joe Perches , Sean Paul , Christian Koenig 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> <61385d4cb6c9d990427349849d0af28faa3b67af.camel@perches.com> <747d6c1b-8c0a-8168-bd1e-e969839ff5be@daenzer.net> <20181206161011.hkjjzdtfzd2hthos@holly.lan> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Openpgp: preference=signencrypt Autocrypt: addr=michel@daenzer.net; prefer-encrypt=mutual; keydata= mQGiBDsehS8RBACbsIQEX31aYSIuEKxEnEX82ezMR8z3LG8ktv1KjyNErUX9Pt7AUC7W3W0b LUhu8Le8S2va6hi7GfSAifl0ih3k6Bv1Itzgnd+7ZmSrvCN8yGJaHNQfAevAuEboIb+MaVHo 9EMJj4ikOcRZCmQWw7evu/D9uQdtkCnRY9iJiAGxbwCguBHtpoGMxDOINCr5UU6qt+m4O+UD /355ohBBzzyh49lTj0kTFKr0Ozd20G2FbcqHgfFL1dc1MPyigej2gLga2osu2QY0ObvAGkOu WBi3LTY8Zs8uqFGDC4ZAwMPoFy3yzu3ne6T7d/68rJil0QcdQjzzHi6ekqHuhst4a+/+D23h Za8MJBEcdOhRhsaDVGAJSFEQB1qLBACOs0xN+XblejO35gsDSVVk8s+FUUw3TSWJBfZa3Imp V2U2tBO4qck+wqbHNfdnU/crrsHahjzBjvk8Up7VoY8oT+z03sal2vXEonS279xN2B92Tttr AgwosujguFO/7tvzymWC76rDEwue8TsADE11ErjwaBTs8ZXfnN/uAANgPLQjTWljaGVsIERh ZW56ZXIgPG1pY2hlbEBkYWVuemVyLm5ldD6IXgQTEQIAHgUCQFXxJgIbAwYLCQgHAwIDFQID AxYCAQIeAQIXgAAKCRBaga+OatuyAIrPAJ9ykonXI3oQcX83N2qzCEStLNW47gCeLWm/QiPY jqtGUnnSbyuTQfIySkK5AQ0EOx6FRRAEAJZkcvklPwJCgNiw37p0GShKmFGGqf/a3xZZEpjI qNxzshFRFneZze4f5LhzbX1/vIm5+ZXsEWympJfZzyCmYPw86QcFxyZflkAxHx9LeD+89Elx bw6wT0CcLvSv8ROfU1m8YhGbV6g2zWyLD0/naQGVb8e4FhVKGNY2EEbHgFBrAAMGA/0VktFO CxFBdzLQ17RCTwCJ3xpyP4qsLJH0yCoA26rH2zE2RzByhrTFTYZzbFEid3ddGiHOBEL+bO+2 GNtfiYKmbTkj1tMZJ8L6huKONaVrASFzLvZa2dlc2zja9ZSksKmge5BOTKWgbyepEc5qxSju YsYrX5xfLgTZC5abhhztpYhGBBgRAgAGBQI7HoVFAAoJEFqBr45q27IAlscAn2Ufk2d6/3p4 Cuyz/NX7KpL2dQ8WAJ9UD5JEakhfofed8PSqOM7jOO3LCA== Message-ID: <7fb7dbd9-96ff-03c7-cbab-3c5af9c00d4e@daenzer.net> Date: Thu, 6 Dec 2018 17:14:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20181206161011.hkjjzdtfzd2hthos@holly.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-12-06 5:10 p.m., Daniel Thompson wrote: > On Thu, Dec 06, 2018 at 03:41:16PM +0100, Michel Dänzer wrote: >> On 2018-12-06 1:23 p.m., Joe Perches wrote: >>> On Thu, 2018-12-06 at 12:52 +0100, Michel Dänzer wrote: >>>> In contrast to the 2b case, the pr_debug output isn't visible by default >>>> with 1b, so the latter doesn't fit "always produce output" either. >>> >>> I think you are mistaken here. >> >> Still puzzled as to what you're hoping to achieve with that kind of >> language. None of the confusion about this patch has been on my part. :) >> >> >>> Adding #define DEBUG as Chris did enables pr_debug output >>> and is your 1b. >>> >>> Perhaps your default console logging level is set to a >>> non-default value. >> >> I have CONFIG_DYNAMIC_DEBUG enabled in my kernels. The problem addressed >> by this patch is that messages from drm_debug_printer are visible by >> default (case 2b), whereas they shouldn't be (case 2a, like 1b). > > When enabled (either dynamically or statically) pr_debug() will emit > output at KERN_DEBUG level regardless of whether CONFIG_DYNAMIC_DEBUG > is defined or not. > > Thus unless you change additional settings (either dynamically or > statically) then debug messages should not be shown on the console > because the default settings filter KERN_DEBUG messages. However they > are available via dmesg and system loggers (syslogd, journal, etc). > > The patch proposed will change the behaviour of the debug messages > w.r.t. system loggers based on whether the user has enabled > CONFIG_DYNAMIC_DEBUG or not, violating the principle of least surprise. Ah, that makes sense now, thanks. I'm withdrawing this patch. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer