From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
Cc: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] etherdevice: introduce eth_broadcast_addr
Date: Wed, 11 Jul 2012 09:27:34 +0200 [thread overview]
Message-ID: <1341991654.4480.5.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CAP=VYLqNyAF1gSsKTd3YojeJXK_-pEzXAKyVQbQfwhtwOyMmwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> (sfid-20120711_021016_338821_DEFABE8B)
On Tue, 2012-07-10 at 20:09 -0400, Paul Gortmaker wrote:
> On Tue, Jul 10, 2012 at 12:18 PM, Johannes Berg
> <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> wrote:
> > From: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> >
> > A lot of code has either the memset or an inefficient copy
> > from a static array that contains the all-ones broadcast
>
> Shouldn't we see all that "lot of code" here in this same
> commit, now using this new shortcut? If we apply this, we
> have a new function, but with no users. If you have done
> the audit, and found the inefficient cases, why isn't it here?
I'm planning to fix the wireless uses (at least the ones I'm responsible
for), but I'm just going to stick them into my mac80211-next tree after
this patch percolates down there, I don't see a need to send around a
ton of patches for it.
> I would think it better to just fix those people who have a
> pointless static array of all-ones to use the memset. If it was a
> multi line thing to achieve the eth_broadcast_addr() then it
> might make sense to exist. But as a one line alias, it does
> seem somewhat pointless to me.
At least in my code I'm going to prefer this over the memset for
documentation purposes. I'll agree that memset(..., 0xff, ETH_ALEN) is
pretty obvious already, but eth_broadcast_addr(...) is even easier to
read IMHO.
johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-07-11 7:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 10:16 [PATCH] etherdevice: introduce broadcast_ether_addr Johannes Berg
2012-07-03 15:13 ` Joe Perches
2012-07-03 15:16 ` Johannes Berg
[not found] ` <1341310587.5131.2.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2012-07-09 6:58 ` David Miller
2012-07-10 16:18 ` [PATCH] etherdevice: introduce eth_broadcast_addr Johannes Berg
2012-07-11 0:09 ` Paul Gortmaker
2012-07-11 0:41 ` David Miller
[not found] ` <20120710.174142.995966539991957646.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-07-11 1:09 ` Joe Perches
2012-07-13 5:33 ` [PATCH net-next 0/8] etherdevice: Rename random_ether_addr to eth_random_addr Joe Perches
2012-07-13 5:33 ` [PATCH net-next 1/8] " Joe Perches
2012-07-13 5:33 ` [PATCH net-next 2/8] ethernet: Use eth_random_addr Joe Perches
2012-07-13 5:33 ` [PATCH net-next 3/8] net: usb: " Joe Perches
2012-07-13 5:33 ` [PATCH net-next 4/8] wireless: " Joe Perches
2012-07-13 5:54 ` Hin-Tak Leung
[not found] ` <93ab9a323e85d1b0d8c7eac4db7ab7835e61efe6.1342157022.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2012-07-13 7:15 ` Gertjan van Wingerde
2012-07-13 5:33 ` [PATCH net-next 5/8] drivers/net: " Joe Perches
[not found] ` <cover.1342157022.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2012-07-16 10:14 ` [PATCH net-next 0/8] etherdevice: Rename random_ether_addr to eth_random_addr Felipe Balbi
2012-07-16 10:29 ` David Miller
2012-07-16 11:12 ` Felipe Balbi
[not found] ` <20120716111218.GA4913-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-07-16 11:17 ` David Miller
2012-07-17 5:39 ` David Miller
[not found] ` <CAP=VYLqNyAF1gSsKTd3YojeJXK_-pEzXAKyVQbQfwhtwOyMmwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-11 7:27 ` Johannes Berg [this message]
2012-07-11 1:07 ` [PATCH] etherdevice: introduce eth_broadcast_addr David Miller
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=1341991654.4480.5.camel@jlt3.sipsolutions.net \
--to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.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).