Message-ID: <50BF844C.8060006@broadcom.com>
Date: Wed, 05 Dec 2012 18:28:44 +0100
From: Arend van Spriel <arend@broadcom.com>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121028 Thunderbird/16.0.2
MIME-Version: 1.0
To: Joe Perches <joe@perches.com>
CC: "John W. Linville" <linville@tuxdriver.com>, 
 Linux Wireless List <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 05/11] brcmfmac: error messages should not be suppressed
References: <1354717564-7183-1-git-send-email-arend@broadcom.com> <1354717564-7183-6-git-send-email-arend@broadcom.com> <1354718489.8320.1.camel@joe-AO722>
In-Reply-To: <1354718489.8320.1.camel@joe-AO722>
X-Enigmail-Version: 1.4.5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On 12/05/2012 03:41 PM, Joe Perches wrote:
> On Wed, 2012-12-05 at 15:25 +0100, Arend van Spriel wrote:
>> The call to brcmf_dbg(ERROR, ...) only resulted in a log message
>> when compiled with -DDEBUG. Error messages are valuable for resolving
>> issues so this patch replaces it with brcmf_err(...) so they always
>> end up in the log.
> 
> Seems like a good idea but you also
> removed the net_ratelimit() which doesn't.

Thanks, Joe

I did as it was nagging us when debugging. How about using
net_ratelimit() if DEBUG is not defined so:

#if !defined(DEBUG)
#define brcmf_err(fmt, ...) \
	do { \
		if (netrate_limit()) \
			pr_err("%s: " fmt, __func__, ##__VA_ARGS__); \
	while (0)
#else
#define brcmf_err(fmt, ...) pr_err("%s: " fmt, __func__, ##__VA_ARGS__)
 :
#endif

Gr. AvS
