Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10471258imu; Thu, 6 Dec 2018 01:29:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/XhmdLg9iE/Q+gQhUfsR6j179MS25/PLe7tU8vQ20DpTDOPjm40/lfw9jLPKl9qLjXHYusO X-Received: by 2002:a63:d10:: with SMTP id c16mr23620622pgl.382.1544088583851; Thu, 06 Dec 2018 01:29:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544088583; cv=none; d=google.com; s=arc-20160816; b=yqfy9jdsdqO+aB3XI7jPFL7ziR67Ty6mz8MhlCB7vYXf7V/TcKUuJHHED3XuO9Ijfu 5Vz+XkxuxnqrC8msfqfJvVlJFgCtsxRjQABme0d75qSHRlNycV6sIttwDJO6/sBpKvaR homQR8sxE0kLi7q//8zHopaozbv1uVpn5k0THjJCsw1+kppX4eHSosGH3IEeZU+WSwuv N/m7RIR6Tq4cWNtntjuBAQR2JgRNomam0pIaWoHDTPdqYFhwfyTVL8uvmLFNx6jjithy 3TVn5+6MuMpz/RA0Lji5VGHEYFD+8BiGFqPreCWi/FWoJgwgfH4DHwxrgr+igN7Rww3M ryRw== 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=Cx+j2HGR3M3zEfRBkXx+uo8wRhJj9eeW7kdhJ0X/HDM=; b=JXZToezJLEwrwv/5fHHkPiBxdGYi366ajTZS71ISYd28h7vQjKMv7JOKd2aWsQ2gNG ZdlYnyzGJ89nicGzL1cFCKcqeAfERyVwE4XBtqdODECqBqBWJ/k86Q9Bexi7yHVmZgHU iBf9mm91H1IbuFZS6I2ZkVqCFCchZ7uFTURS4I4zj9ucR7DiRu24/kOO8RAq+kY1sP88 Jr5a25xM5YbGZ3rv0vspOtlR7nByFR9+RxsGcgZ87c/mafkkesiyzMchCc73qmdMhG2Z 8mF7FLsBy+zsXQP1FHXllaTh2vmtE0tFIEIis7gT2RnhrSP37lyUfMAlfyHO1Myej7X0 oLmg== 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 o85si22444390pfa.162.2018.12.06.01.29.26; Thu, 06 Dec 2018 01:29:43 -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 S1729198AbeLFJ2m convert rfc822-to-8bit (ORCPT + 99 others); Thu, 6 Dec 2018 04:28:42 -0500 Received: from mail.fireflyinternet.com ([109.228.58.192]:52081 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727763AbeLFJ2l (ORCPT ); Thu, 6 Dec 2018 04:28:41 -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 14796737-1500050 for multiple; Thu, 06 Dec 2018 09:28:37 +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: 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> <154408757908.3572.9138595858555797029@skylake-alporthouse-com> Message-ID: <154408851245.18057.9814330902486356341@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:28:32 +0000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Michel Dänzer (2018-12-06 09:21:40) > On 2018-12-06 10:12 a.m., Chris Wilson wrote: > > 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. > > We still #define DEBUG if CONFIG_DYNAMIC_DEBUG isn't defined, so it's > still 1b), not 1a). I completely fluffed my reading of ifndef. #if !IS_ENABLED(CONFIG_DYNAMIC_DEBUG) -Chris