From: Joe Perches <joe@perches.com>
To: Adrian Chadd <adrian@freebsd.org>
Cc: Jiri Slaby <jirislaby@gmail.com>,
Nick Kossifidis <mickflemm@gmail.com>,
"Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>,
Bob Copeland <me@bobcopeland.com>,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, ath5k-devel@lists.ath5k.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.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@mail.gmail.com>
On Mon, 2012-03-19 at 20:39 -0700, Adrian Chadd wrote:
> On 18 March 2012 22:18, Joe Perches <joe@perches.com> 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
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@perches.com \
--cc=adrian@freebsd.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@qca.qualcomm.com \
--cc=me@bobcopeland.com \
--cc=mickflemm@gmail.com \
--cc=netdev@vger.kernel.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).