From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
To: Adrian Chadd <adrian-h+KGxgPPiopAfugRpC6u6w@public.gmane.org>
Cc: Jiri Slaby <jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
ath5k-devel-xDcbHBWguxEUs3QNXV6qNA@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"John W. Linville"
<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH wireless-next 2/3] ath5k: Introduce _ath5k_printk to reduce code/text
Date: Mon, 19 Mar 2012 20:48:01 -0700 [thread overview]
Message-ID: <1332215281.7847.54.camel@joe2Laptop> (raw)
In-Reply-To: <CAJ-Vmom4n7Sk5P=HMb+Z-FNyfyk87Xbf5Q1kPA4i2eXwQ72kXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Mon, 2012-03-19 at 20:39 -0700, Adrian Chadd wrote:
> On 18 March 2012 22:18, Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org> 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
next prev parent reply other threads:[~2012-03-20 3:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 0:30 [PATCH wireless-next 0/3] ath: printk cleanups and code reduction Joe Perches
2012-03-19 0:30 ` [PATCH wireless-next 1/3] ath: Add and use pr_fmt, convert printks to pr_<level> Joe Perches
2012-03-19 0:30 ` [PATCH wireless-next 2/3] ath5k: Introduce _ath5k_printk to reduce code/text Joe Perches
2012-03-19 4:36 ` Adrian Chadd
2012-03-19 5:18 ` Joe Perches
2012-03-20 3:39 ` Adrian Chadd
[not found] ` <CAJ-Vmom4n7Sk5P=HMb+Z-FNyfyk87Xbf5Q1kPA4i2eXwQ72kXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-20 3:48 ` Joe Perches [this message]
2012-03-19 0:30 ` [PATCH wireless-next 3/3] ath6kl: Add __printf verification to ath6kl_printk Joe Perches
2012-03-20 10:06 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1332215281.7847.54.camel@joe2Laptop \
--to=joe-6d6dil74uinbdgjk7y7tuq@public.gmane.org \
--cc=adrian-h+KGxgPPiopAfugRpC6u6w@public.gmane.org \
--cc=ath5k-devel-xDcbHBWguxEUs3QNXV6qNA@public.gmane.org \
--cc=jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).