Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10882223imu; Thu, 6 Dec 2018 08:12:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/WQG+1sOY5N1Woemf/jDdSoh5sZ0AYoq1lD7aXraXZU/OFQPF9hOHwQ14LgWlX0QZYnf8O5 X-Received: by 2002:a63:ff62:: with SMTP id s34mr24819954pgk.325.1544112760519; Thu, 06 Dec 2018 08:12:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544112760; cv=none; d=google.com; s=arc-20160816; b=l7qU3oHCDJYrFHvECUeBIjqN141QtAK0y8szs3/LvSWt/kppRaUofMSjPMz+RHsMFS hrq8GJZhwqcsj+dwMGaZY4S/pNeHnnYBe3IbyP+/suas6XboY8AAB1QeNH14UHVEDcxp 8LRsGI3vt24j34aofa1VWt+CgYiJizDYby02nv5vqTa2q9GubPsyL6pp5IZBPREmON4/ scazQfisKaptWc1Nw/op6Z0qQEJcAESIho2L2C2zWqgEQp5ejDCiCLiyb/6OXA+xk+pp TJAJdDO6O4g5cNP2A60u9xlZppeKkKCEuzHukJwARekk/h0N/0D3pNW7h7DS4RPmyU95 gvwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=P+N3XANXwak6co/c8fNynu7T4eKz/PqGFkBBi9bwGo0=; b=Gfu8R/j+1FwvJgYDqALX1Ft3vkFqjHmKKnz7JWvhwStJEbbD0ORLrsym12VZwYZHv3 Hy0ijViipcjQj+DF3bIhSfyRcJzLQuAJX/F4XpNiiF1KzAAQUU/zBOsIsYL+bHoUdt2y GSHr0QYc5o/vQ6US8j0dviRpxlFRovHeUFZCxZGTmWYrWkIcj11HKfXiZzKMsqHfkOCm MfORAKFMSaS9fklXjQIO3O7BHy5sdjrYIaM710XispbhS2ydN4Gn+OsHLtpKm+K5EBE6 VwFcWIKhH7qUzQjwO6u6hjX/A8S5W6gne6jb8Icq3BheCWRZ9455VkbaqjmgjlG01Zgq j+Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Aae6PN5o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si531762pgy.174.2018.12.06.08.12.18; Thu, 06 Dec 2018 08:12:40 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Aae6PN5o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726269AbeLFQKS (ORCPT + 99 others); Thu, 6 Dec 2018 11:10:18 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:50530 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbeLFQKS (ORCPT ); Thu, 6 Dec 2018 11:10:18 -0500 Received: by mail-wm1-f65.google.com with SMTP id n190so1561878wmd.0 for ; Thu, 06 Dec 2018 08:10:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=P+N3XANXwak6co/c8fNynu7T4eKz/PqGFkBBi9bwGo0=; b=Aae6PN5ofQ+YD5XUJttSLSD5PL4v7+t1MIacgdrz5XL3WMK1a9X4rjSHrtSXa+a6NS GyLd+FHWdmQ/SBCBBSBRpu9wr9TUpx51tsnfBPyd2yQz8E+UyiV/LjPJbPH8htQ3Q5OF KWFOcDDVxPZ8OtmtgZ9nMNSO3SZMcrOJ0rZhI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=P+N3XANXwak6co/c8fNynu7T4eKz/PqGFkBBi9bwGo0=; b=Lmb6Wc510OBmvAyhvUZoYsbR0izifm6E/siGjnRjdMAMelqKbGBLQ/V3/71iWl+neW 7JAY94U3V7KAfH5UCY6YVJhlKgbC9GUHGs/OGsjPpRr57t50YGbAI5t4/Ehta3dGLmq9 964aw/gpcIsXihoBpTX1uyT9tlCo2Ees/Sobp4AbnGz25Lam++Kh9QPBlypjjhUpo9A5 3+itw82USwcOhC+vQgdjO1vlF4H7+1YWWcmdGPuz1cNgnKXGQLtB4Q4kHQti9vwxGX5P aEw1PuNYK1+ItblNwqjog2mhcPms6DUdd/uxinV1tPdpNBhPF7UmcvLBfvYiA7vklYNp Xcng== X-Gm-Message-State: AA+aEWbZ+QJY8lx3qcRv79C9+utzZf3IAvHCJR2jty+2nIAEibi9Dua7 JvMcwQusPkZQ4LO7mmb9mRV90g== X-Received: by 2002:a1c:5f8a:: with SMTP id t132mr20911623wmb.40.1544112615447; Thu, 06 Dec 2018 08:10:15 -0800 (PST) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id g129sm1384898wmf.39.2018.12.06.08.10.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Dec 2018 08:10:14 -0800 (PST) Date: Thu, 6 Dec 2018 16:10:11 +0000 From: Daniel Thompson To: Michel =?utf-8?Q?D=C3=A4nzer?= Cc: Joe Perches , "Zhang, Jerry(Junwei)" , Christian Koenig , Huang Rui , Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Chris Wilson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 1/2] drm: Only #define DEBUG if CONFIG_DYNAMIC_DEBUG is disabled Message-ID: <20181206161011.hkjjzdtfzd2hthos@holly.lan> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <747d6c1b-8c0a-8168-bd1e-e969839ff5be@daenzer.net> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Daniel.