From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752335Ab2DMO5i (ORCPT ); Fri, 13 Apr 2012 10:57:38 -0400 Received: from bar.sig21.net ([80.81.252.164]:38339 "EHLO bar.sig21.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952Ab2DMO5g (ORCPT ); Fri, 13 Apr 2012 10:57:36 -0400 Date: Fri, 13 Apr 2012 16:57:28 +0200 From: Johannes Stezenbach To: Alan Stern Cc: Jason Baron , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: ehci dynamic debug problem Message-ID: <20120413145728.GA22240@sig21.net> References: <20120413085607.GA18024@sig21.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-21-Score: -2.9 (--) X-Spam-21-Report: No, score=-2.9 required=8.0 tests=ALL_TRUSTED=-1,BAYES_00=-1.9 autolearn=ham Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 13, 2012 at 10:35:59AM -0400, Alan Stern wrote: > On Fri, 13 Apr 2012, Johannes Stezenbach wrote: > > > > Does dynamic debug offer an "is the message two lines below enabled" test? > > Simply changing the "#ifdef DEBUG" for dbg_port_buf() > > to "#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)" > > is probably not acceptable due to the overhead of dbg_port_buf()? > > I don't understand your question. Doesn't dbg_port_buf need to be > defined whenever dynamic debugging is enabled? > > Alternatively, the definition of dbg_port_buf (and related routines) in > the !defined(DEBUG) case could be changed; you could add > > buf[0] = 0; > > That way you wouldn't get garbage out, although you wouldn't get > anything useful either. The ideal solution I'm looking for gives useful output when dynamic debugging is enabled for ehci, but does no useless string formatting when CONFIG_DYNAMIC_DEBUG is y but the dynamic debug for ehci is disabled. Thanks, Johannes