From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [PATCH wireless-next 2/3] ath5k: Introduce _ath5k_printk to reduce code/text Date: Mon, 19 Mar 2012 20:48:01 -0700 Message-ID: <1332215281.7847.54.camel@joe2Laptop> References: <1332134336.23125.60.camel@joe2Laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Jiri Slaby , ath5k-devel-xDcbHBWguxEUs3QNXV6qNA@public.gmane.org, linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "John W. Linville" , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Adrian Chadd Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ath5k-devel-bounces-xDcbHBWguxEUs3QNXV6qNA@public.gmane.org Errors-To: ath5k-devel-bounces-xDcbHBWguxEUs3QNXV6qNA@public.gmane.org List-Id: netdev.vger.kernel.org On Mon, 2012-03-19 at 20:39 -0700, Adrian Chadd wrote: > On 18 March 2012 22:18, Joe Perches wrote: > >> Otherwise compiling in debugging will cause a _lot_ of spurious > >> register reads to occur that are then tossed. This was one of the big > >> reasons for instability and slow performance when AH_DEBUG was > >> enabled. > > That doesn't make any sense in this case. > > > > It's either a call to printk or _ath5_printk > > but it's still a call to a function. > > The FreeBSD HAL used to be like this. I changed it so it didn't > evaluate the arguments before it figured out whether or not to do the > (k)printf(). > > I'm just pointing it out as you're (currently) knee deep in the > debugging code and it may be useful for you to also think about > implementing. I see, thanks for the heads-up. The no_printk function could/does eval args and can cause those sorts of issues. So care does need to be used. cheers, Joe