linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Joe Perches <joe@perches.com>
Cc: linux-wireless@vger.kernel.org, ath9k-devel@venema.h4ckr.net
Subject: Re: [PATCH] ath9k:  Gather and report bus-timeout errors.
Date: Tue, 03 Apr 2012 14:17:30 -0700	[thread overview]
Message-ID: <4F7B68EA.4060905@candelatech.com> (raw)
In-Reply-To: <1333486979.2695.8.camel@joe2Laptop>

On 04/03/2012 02:02 PM, Joe Perches wrote:
> On Tue, 2012-04-03 at 13:22 -0700, greearb@candelatech.com wrote:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> Seems like a useful stat to report (when debugfs
>> is enabled).
> []
>> diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
> []
>> @@ -385,57 +385,61 @@ 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;
>> -	char buf[512];
>> +	char buf[800];
>
> 800 seems excessive.
> Maybe it's better to kmalloc this.

Ok.

>>   	unsigned int len = 0;
>>
>>   	if (sc->sc_ah->caps.hw_caps&  ATH9K_HW_CAP_EDMA) {
>>   		len += snprintf(buf + len, sizeof(buf) - len,
>> -			"%8s: %10u\n", "RXLP", sc->debug.stats.istats.rxlp);
>> +			"%11s: %10u\n", "RXLP", sc->debug.stats.istats.rxlp);
>
> why change the size from 8 to 11?

To make the columns line up properly.

>> +#define ATH_INCR_IRQ_STAT_COMMON(c, s)					\
>> +	do {								\
>> +		struct ath_softc *sc = (struct ath_softc *) (c)->priv;	\
>
> Isn't priv void *?
> I think you don't need the cast.

Dunno..just copied existing code.  I'll see if it compiles w/out
the explicit cast.

>
>> +		sc->debug.stats.istats.s++;				\
>> +	} while (0);
>
> sb: "while (0)" without the ;

Ok.

Thanks,
Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

      reply	other threads:[~2012-04-03 21:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-03 20:22 [PATCH] ath9k: Gather and report bus-timeout errors greearb
2012-04-03 21:02 ` Joe Perches
2012-04-03 21:17   ` Ben Greear [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=4F7B68EA.4060905@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath9k-devel@venema.h4ckr.net \
    --cc=joe@perches.com \
    --cc=linux-wireless@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).