linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Ben Greear <greearb@candelatech.com>
Cc: linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net,
	"Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>,
	ath9k-devel@lists.ath9k.org
Subject: Re: [PATCH v2] ath9k:  Gather and report IRQ sync_cause errors.
Date: Wed, 04 Apr 2012 11:51:23 -0700	[thread overview]
Message-ID: <1333565483.16978.26.camel@joe2Laptop> (raw)
In-Reply-To: <4F7C922F.7060201@candelatech.com>

(added Luis R and the current ath9k-devel list to cc's)

On Wed, 2012-04-04 at 11:25 -0700, Ben Greear wrote:
> On 04/04/2012 09:16 AM, Joe Perches wrote:
> > On Tue, 2012-04-03 at 21:20 -0700, greearb@candelatech.com wrote:
> >> From: Ben Greear<greearb@candelatech.com>
> >>
> >> Report all defined sync_cause errors in debugfs
> >> to aid with debugging.
> >
> > just trivia:
> >
> >> diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
> > []
> >> @@ -385,63 +385,130 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
> >>   				   size_t count, loff_t *ppos)
> >>   {
> >>   	struct ath_softc *sc = file->private_data;
> > []
> >>   	if (sc->sc_ah->caps.hw_caps&  ATH9K_HW_CAP_EDMA) {
> > []
> >> +		len += snprintf(buf + len, mxlen - len,
> >> +			"%21s: %10u\n", "RXLP", sc->debug.stats.istats.rxlp);
> >
> > Alignment is overrated.
> >
> > I wouldn't change any of the original block
> > though perhaps changing the sc pointer to an
> > istats pointer so these dereferences become
> > similar to istats->rxlp;
> 
> Other files in this driver are aligned, so it seems
> nice to continue the tradition.  debugfs files are
> for human consumption, so making them readable is
> a virtue.

It'd still be readable, it would just be a different block
separated by a new header line.

> If someone wants more efficient access to this data,
> then we can use ethtool stats (I'll add ethtool stats
> support for these counters if/when my first ethtool
> patches make it in...)

That'd be a good idea.

> >> +void ath9k_debug_sync_cause(struct ath_common *common, u32 sync_cause)
> >> +{
> >> +	struct ath_softc *sc = common->priv;
> >> +	if (sync_cause)
> >> +		sc->debug.stats.istats.sync_cause_all++;
> >> +	if (sync_cause&  AR_INTR_SYNC_RTC_IRQ)
> >> +		sc->debug.stats.istats.sync_rtc_irq++;
> >
> > And nicer here to use a pointer to istats too.
> 
> Hopefully the compiler is smart enough that this
> doesn't really matter.

It is, but it's really for reader clarity not
compiler output.

> If the maintainers care, I'll respin the patch, but
> otherwise I'm not sure it's worth the effort.

The patch doesn't apply cleanly against next anyway.
There's a trivial #include mismatch.

cheers, Joe


      reply	other threads:[~2012-04-04 18:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-04  4:20 [PATCH v2] ath9k: Gather and report IRQ sync_cause errors greearb
2012-04-04 16:16 ` Joe Perches
2012-04-04 18:25   ` Ben Greear
2012-04-04 18:51     ` Joe Perches [this message]

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=1333565483.16978.26.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=ath9k-devel@venema.h4ckr.net \
    --cc=greearb@candelatech.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@qca.qualcomm.com \
    /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).