From: Patrick McHardy <kaber@trash.net>
To: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>,
johannes@sipsolutions.net, harvey.harrison@gmail.com,
netdev@vger.kernel.org
Subject: Re: New sparse warning in net/mac80211/debugfs_sta.c
Date: Wed, 09 Apr 2008 00:32:37 +0200 [thread overview]
Message-ID: <47FBF285.4090201@trash.net> (raw)
In-Reply-To: <1207692573.1020.134.camel@localhost>
Joe Perches wrote:
> On Tue, 2008-04-08 at 23:19 +0200, Patrick McHardy wrote:
>> This might work (codiff should be able to tell). But I
>> just see that Dave also favours to use MAC_FMT directly,
>> so please just do this.
>
> Precisely what are you objecting to Patrick?
>
> Are you objecting to the existence of an additional
> function call in a printk or the unnecessary call to
> print_mac in functions like pr_debug that the compiler
> can not optimize away?
>
> Your long list seems to be mostly a list of functions
> that are converted from direct use of MAC_FMT with
> 6 arguments on stack to a call to print_mac.
>
> I think the only things that should be changed are those
> functions that add a useless call to print_mac because
> pr_debug is optimized away.
>
> I do _not_ think that merely because print_mac is used
> as a printk argument it should be reverted.
No, those cases probably don't matter, if there was a printk
before it can't matter that much. What should be removed is
cases like virtio_net:
static int start_xmit(struct sk_buff *skb, struct net_device *dev)
{
...
pr_debug("%s: xmit %p %s\n", dev->name, skb, print_mac(mac, dest));
which adds a unconditional and useless function call in a
performance critical path.
You could probably generate a better starting point than
my codiff somehow, I just redefined print_mac to
"00:00:00:00:00:00", which means it doesn't care whether
its in a printk or a pr_debug() call. Might be quicker
to go through the list manually though.
next prev parent reply other threads:[~2008-04-08 22:32 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 9:34 New sparse warning in net/mac80211/debugfs_sta.c Harvey Harrison
2008-02-21 9:54 ` Johannes Berg
2008-02-21 10:03 ` David Miller
2008-02-21 10:08 ` Harvey Harrison
2008-02-21 10:12 ` David Miller
2008-02-21 10:16 ` Harvey Harrison
2008-02-21 10:22 ` [PATCH] mac80211: fix debugfs_sta print_mac() warning Johannes Berg
2008-02-21 10:22 ` Johannes Berg
[not found] ` <20080221.015743.222059206.davem@davemloft.net>
2008-02-21 10:01 ` New sparse warning in net/mac80211/debugfs_sta.c Harvey Harrison
2008-02-21 10:05 ` David Miller
2008-02-21 10:14 ` Harvey Harrison
2008-02-21 10:17 ` Johannes Berg
2008-02-21 17:54 ` Joe Perches
2008-02-21 18:00 ` Patrick McHardy
2008-02-21 18:15 ` Patrick McHardy
2008-02-24 4:02 ` David Miller
2008-02-25 9:53 ` Johannes Berg
2008-02-25 16:53 ` Joe Perches
2008-02-25 17:29 ` Johannes Berg
2008-02-25 17:23 ` Johannes Berg
2008-02-25 19:52 ` David Miller
2008-02-25 19:56 ` Johannes Berg
2008-02-25 20:05 ` Johannes Berg
2008-02-25 20:14 ` David Miller
2008-02-25 20:12 ` David Miller
2008-02-25 11:47 ` Patrick McHardy
2008-02-25 19:58 ` Joe Perches
2008-04-08 20:18 ` Patrick McHardy
2008-04-08 21:02 ` Joe Perches
2008-04-08 21:16 ` David Miller
2008-04-08 21:19 ` Patrick McHardy
2008-04-08 22:09 ` Joe Perches
2008-04-08 22:30 ` David Miller
2008-04-08 22:41 ` Joe Perches
2008-04-08 22:32 ` Patrick McHardy [this message]
2008-02-21 17:17 ` Joe Perches
2008-02-21 17:45 ` Patrick McHardy
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=47FBF285.4090201@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=harvey.harrison@gmail.com \
--cc=joe@perches.com \
--cc=johannes@sipsolutions.net \
--cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.