Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10459691imu; Thu, 6 Dec 2018 01:14:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/URGkG+GEsfZjLVN7r9rYGDSIQjuOIiNOwevcWfp7Xcjr3vnXQ8O8RiC6jSPaDHMmFL1x6l X-Received: by 2002:a63:6b05:: with SMTP id g5mr6695450pgc.15.1544087646997; Thu, 06 Dec 2018 01:14:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544087646; cv=none; d=google.com; s=arc-20160816; b=rMeoQisjnkMADQsxbTbtch+Rkv7Y6Gv2+e8ZdlSF3fTmxBWtAAZ4uezc+8rUmmk49M lUJi05GsFwsrN+tNHJmYYAywLIVOdbCe2hrF0tEDmDVS+VV3nv7iA9cwYxTDIL035mt1 2SJo26GIhKIdFgxkj5kjpQAAz0hsuWK82bbLbDUWuldJsrzUjUbiQ3wPU5ijBVK83TOm 4jQtwGXpV8Ub2Y+imW52k8qtBbhNE6GVHKosYQL2V3f2fS1ynFkg5Tg5FAEVJP4nRmRx 8W32v9Rwc87Pfrjx/8GS7GvgR1ewuuesVQLcfRAVfjH2jn8d1Ez5AE9BvMREwdqjBxt/ YHXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version; bh=3YoCFUmUoyFNiwHpEMJckOqU0jN+jEbjHCwt8TqcadQ=; b=Cf9uyaYXoTLmV31PvfNOLuGOcP2FJjuf4hW74xrWsR7lWLGWDVkZ/XKVN7E0xa2xjo L0BISocI/R3M1R3nsSp3A+vlynUPsF/VqXxkf/qnoEboHj7LxUWfP8dHH++ko0NN8/It TmWMQlfiPMtp5a0dXl89S7G1i/pABKHoezZsVJdJhcbqIIprENqRmbpKOFEFkOoQEzHE /JPmr5ldO7ayPspBcKCxsOE5iZJ2SSIoGjsfvSMaXujUogKFR/zZ0N1hIjMF+BDZ5V0p uxxoUMDwWvAU6d2NB6smfUUa+n3KUVyO/p5hqesPBIVS99SBwC3TnQDn61pLMZ9vHzvf jL4Q== 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 i6si19509742pgq.207.2018.12.06.01.13.50; Thu, 06 Dec 2018 01:14: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 S1729238AbeLFJNI convert rfc822-to-8bit (ORCPT + 99 others); Thu, 6 Dec 2018 04:13:08 -0500 Received: from mail.fireflyinternet.com ([109.228.58.192]:51724 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727575AbeLFJNI (ORCPT ); Thu, 6 Dec 2018 04:13:08 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 14796524-1500050 for multiple; Thu, 06 Dec 2018 09:13:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT To: "Zhang, Jerry\(Junwei\)" , =?utf-8?q?Michel_D=C3=A4nzer?= , Christian Koenig , David Airlie , Huang Rui , Maarten Lankhorst , Maxime Ripard , Sean Paul From: Chris Wilson In-Reply-To: <10fca21a-5d7c-fe9e-07f0-6200e9de538e@amd.com> Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20181205165621.5805-1-michel@daenzer.net> <10fca21a-5d7c-fe9e-07f0-6200e9de538e@amd.com> Message-ID: <154408757908.3572.9138595858555797029@skylake-alporthouse-com> User-Agent: alot/0.6 Subject: Re: [PATCH 1/2] drm: Only #define DEBUG if CONFIG_DYNAMIC_DEBUG is disabled Date: Thu, 06 Dec 2018 09:12:59 +0000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Zhang, Jerry(Junwei) (2018-12-06 02:40:42) > 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") > > Signed-off-by: Michel Dänzer > Reviewed-by: Junwei Zhang At the cost of 1a? Nah. -Chris