Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1727122pxa; Thu, 20 Aug 2020 20:06:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWqfupLs2E71XivdXX2TiR5qW/fEJhrlYoRt8WXgri9D1scdE3INnkksBZGtv82dAEJBDB X-Received: by 2002:a50:e809:: with SMTP id e9mr862023edn.133.1597979205577; Thu, 20 Aug 2020 20:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597979205; cv=none; d=google.com; s=arc-20160816; b=stkmO8YFSNpkO4CUgJ/CprCo9YqePBx8+RX+MXUYKCfEt25b28c1aPJI/p/rqJeJpq AHZ6pHyU7tiYgIEQAIHZefZsajAMYZMLMOUAwhPi3PW0mU+tD7pnsgEJ5y+bp86cDKRG Y3j0/ngkgrdUf++e8Ho6zaXeZQZ/jWb+uf8Na2d/1MaImVon5ERjhbKyNHviVL+U6wWS Xbe2Bqn+o9FCSiEX1AJri3tevKbSuzWK8DW+tmrFqjWAmrUFmYxON4ZDMAIGBRcoWqBW awUxcz5Co3tfS/phEq9rtKKqp69KuS4XVBqDZUbe20L1Gz+9+k0O2heC4jRHv6dDODSQ BfpQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=kMqj0AMtBfa8qyfiKP2y+AOuxo4ve8BSxvYCPacnNg8=; b=hPJhfFPxpnhuSuitXkFf35WEqf6E7Z6W5+t2PXxNibM5oEYBJ3amsUYVq3PMqzXgu2 +uVd0zWDB2cFAa/gTmLb0XJSPcSWf28grJ6ZdkZSXMHitebkiYz3c6ModBL0hgmaL9LT lEvDC0D14CELE9XymtzUbTMYfA1X9rY/xY7DMUmj84Jc1WNYyFlc8JXEnXEGGhJ1uL9u 36DYIl61M1iNwhHr0X8c6DYLCkv37SOxti/WxQgeblE0FXRg/RfMw7ZWU+te/i+Qh35O mo4LwZXL+xQAWNaepVoznUIWHxO3/XgDviUzasYAFTVew3LPp18/RLlvZwCCodZH4OJX LsyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si319482edy.546.2020.08.20.20.06.21; Thu, 20 Aug 2020 20:06:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727050AbgHUDFE (ORCPT + 99 others); Thu, 20 Aug 2020 23:05:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:37760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbgHUDFD (ORCPT ); Thu, 20 Aug 2020 23:05:03 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2EDEF20732; Fri, 21 Aug 2020 03:05:01 +0000 (UTC) Date: Thu, 20 Aug 2020 23:04:59 -0400 From: Steven Rostedt To: Joe Perches Cc: Nicolas Boichat , Mauro Carvalho Chehab , Greg Kroah-Hartman , Andy Shevchenko , Sakari Ailus , devel@driverdev.osuosl.org, lkml , Linux Media Mailing List , Peter Zijlstra , Thomas Gleixner , Josh Poimboeuf , Douglas Anderson , Guenter Roeck Subject: Re: [PATCH v4 3/3] media: atomisp: Only use trace_printk if allowed Message-ID: <20200820230459.2471c892@oasis.local.home> In-Reply-To: References: <20200820170951.v4.1.Ia54fe801f246a0b0aee36fb1f3bfb0922a8842b0@changeid> <20200820170951.v4.3.I066d89f39023956c47fb0a42edf196b3950ffbf7@changeid> <20200820102347.15d2f610@oasis.local.home> <20200820203601.4f70bf98@oasis.local.home> <20200820215701.667f02b2@oasis.local.home> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Aug 2020 19:49:59 -0700 Joe Perches wrote: > Perhaps make trace_printk dependent on #define DEBUG? This is basically what Nicolas's patch series does in this very patch! And no, I hate it. We are currently discussing ways of not having to modify the config in order to allow trace_printk() to be used. We don't want to burden the developer to take a config, add a bunch of trace_printks() and find that it's compiled out! Thus, this is a NAK. -- Steve > > Something like: > --- > include/linux/kernel.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/include/linux/kernel.h b/include/linux/kernel.h > index 500def620d8f..6ca8f958df73 100644 > --- a/include/linux/kernel.h > +++ b/include/linux/kernel.h > @@ -717,6 +717,7 @@ do { \ > * let gcc optimize the rest. > */ > > +#ifdef DEBUG > #define trace_printk(fmt, ...) \ > do { \ > char _______STR[] = __stringify((__VA_ARGS__)); \ > @@ -725,6 +726,12 @@ do { \ > else \ > trace_puts(fmt); \ > } while (0) > +#else > +#define trace_printk(fmt, ...) \ > +do { \ > + __trace_printk_check_format(fmt, ##args); \ > +} while (0) > +#endif > > #define do_trace_printk(fmt, args...) \ > do { \ >