From: Joe Perches <joe@perches.com>
To: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Cc: "John W . Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, wil6210@qca.qualcomm.com
Subject: Re: [PATCH 2/9] wil6210: add handling of RX HTRSH interrupt
Date: Mon, 01 Dec 2014 19:44:10 -0800 [thread overview]
Message-ID: <1417491850.4894.10.camel@perches.com> (raw)
In-Reply-To: <1417440803-26883-3-git-send-email-qca_vkondrat@qca.qualcomm.com>
On Mon, 2014-12-01 at 15:33 +0200, Vladimir Kondratiev wrote:
> In addition there's a rate limitted warning message.
limited.
I think this _ratelimited bit should be a separate patch.
(and a suggestion / comment below too)
> diff --git a/drivers/net/wireless/ath/wil6210/debug.c b/drivers/net/wireless/ath/wil6210/debug.c
[]
> +void wil_err_ratelimited(struct wil6210_priv *wil, const char *fmt, ...)
> +{
> + if (net_ratelimit()) {
> + struct net_device *ndev = wil_to_ndev(wil);
> + struct va_format vaf = {
> + .fmt = fmt,
> + };
> + va_list args;
> +
> + va_start(args, fmt);
> + vaf.va = &args;
> + netdev_err(ndev, "%pV", &vaf);
> + trace_wil6210_log_err(&vaf);
> + va_end(args);
> + }
> +}
[]
> diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
[]
> @@ -475,6 +476,8 @@ void wil_dbg_trace(struct wil6210_priv *wil, const char *fmt, ...);
> __printf(2, 3)
> void wil_err(struct wil6210_priv *wil, const char *fmt, ...);
> __printf(2, 3)
> +void wil_err_ratelimited(struct wil6210_priv *wil, const char *fmt, ...);
> +__printf(2, 3)
> void wil_info(struct wil6210_priv *wil, const char *fmt, ...);
> #define wil_dbg(wil, fmt, arg...) do { \
> netdev_dbg(wil_to_ndev(wil), fmt, ##arg); \
I think it'd be simpler and smaller to use a macro:
#define wil_err_ratelimited(wil, fmt, ...) \
do { \
if (net_ratelimit()) \
wil_err(wil, fmt, ##__VA_ARGS__); \
} while (0)
next prev parent reply other threads:[~2014-12-02 3:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 13:33 [PATCH 0/9] wil6210 fixes Vladimir Kondratiev
2014-12-01 13:33 ` [PATCH 1/9] wil6210: propagate disconnect reason Vladimir Kondratiev
2014-12-01 13:33 ` [PATCH 2/9] wil6210: add handling of RX HTRSH interrupt Vladimir Kondratiev
2014-12-02 3:44 ` Joe Perches [this message]
2014-12-02 10:54 ` Vladimir Kondratiev
2014-12-01 13:33 ` [PATCH 3/9] wil6210: fix recovery after scan timeout Vladimir Kondratiev
2014-12-01 13:33 ` [PATCH 4/9] wil6210: remove wil_to_pcie_dev() Vladimir Kondratiev
2014-12-02 9:46 ` [PATCH v2 00/10] wil6210 fixes, reroll Vladimir Kondratiev
2014-12-02 9:46 ` [PATCH v2 01/10] wil6210: propagate disconnect reason Vladimir Kondratiev
2014-12-02 9:46 ` [PATCH v2 02/10] wil6210: introduce wil_err_ratelimited() Vladimir Kondratiev
2014-12-02 15:07 ` Joe Perches
2014-12-02 16:07 ` Vladimir Kondratiev
2014-12-02 16:20 ` Joe Perches
2014-12-02 9:46 ` [PATCH v2 03/10] wil6210: add handling of RX HTRSH interrupt Vladimir Kondratiev
2014-12-02 9:46 ` [PATCH v2 04/10] wil6210: fix recovery after scan timeout Vladimir Kondratiev
2014-12-02 9:50 ` [PATCH v2 05/10] wil6210: remove wil_to_pcie_dev() Vladimir Kondratiev
2014-12-02 9:50 ` [PATCH v2 06/10] wil6210: configurable vring sizes Vladimir Kondratiev
2014-12-02 9:51 ` [PATCH v2 07/10] wil6210: fix warning in pointer arithmetic Vladimir Kondratiev
2014-12-02 9:52 ` [PATCH v2 08/10] wil6210: Rate limit "ring full" error message Vladimir Kondratiev
2014-12-02 9:52 ` [PATCH v2 09/10] wil6210: reset flow update Vladimir Kondratiev
2014-12-02 9:53 ` [PATCH v2 10/10] wil6210: remove TODO wrt buffer alignment Vladimir Kondratiev
2014-12-02 19:45 ` [PATCH v2 00/10] wil6210 fixes, reroll John W. Linville
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=1417491850.4894.10.camel@perches.com \
--to=joe@perches.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=qca_vkondrat@qca.qualcomm.com \
--cc=wil6210@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).