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 v2 02/10] wil6210: introduce wil_err_ratelimited()
Date: Tue, 02 Dec 2014 08:20:01 -0800 [thread overview]
Message-ID: <1417537201.3365.3.camel@perches.com> (raw)
In-Reply-To: <1745741.h3nTIlTg0C@lx-wigig-72>
On Tue, 2014-12-02 at 18:07 +0200, Vladimir Kondratiev wrote:
> On Tuesday, December 02, 2014 07:07:47 AM Joe Perches wrote:
> > net_<foo>_ratelimited uses the same form.
> >
> > include/linux/net.h:#define net_ratelimited_function(function, ...)
> > include/linux/net.h-do {
> > include/linux/net.h- if (net_ratelimit())
> > include/linux/net.h- function(__VA_ARGS__);
> > include/linux/net.h-} while (0)
> >
> Yes, I see. There are representatives of both "schools". As counter example,
> netdev_<foo> uses "long" way:
These used to be macros.
They were converted to reduce overall code "size".
commit 256df2f3879efdb2e9808bdb1b54b16fbb11fa38
Date: Sun Jun 27 01:02:35 2010 +0000
netdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functions
Reduces an x86 defconfig text and data ~2k.
text is smaller, data is larger.
$ size vmlinux*
text data bss dec hex filename
7198862 720112 1366288 9285262 8dae8e vmlinux
7205273 716016 1366288 9287577 8db799 vmlinux.device_h
Uses %pV and struct va_format
Format arguments are verified before printk
> I agree it is bad practice to have non-trivial arguments in printk-like functions,
true.
It limits the ability to make side-effect
free smaller code when printk is a no-op.
> but it is hard to detect, specifically if one just automatically replace function with its
> "ratelimited" version.
Also true.
It is and remains just a suggestion.
Your code, your choices...
next prev parent reply other threads:[~2014-12-02 16:20 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
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 [this message]
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=1417537201.3365.3.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).