All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: David Miller <davem@davemloft.net>
Cc: paul.gortmaker@windriver.com, johannes@sipsolutions.net,
	netdev@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] etherdevice: introduce eth_broadcast_addr
Date: Tue, 10 Jul 2012 18:09:27 -0700	[thread overview]
Message-ID: <1341968967.13724.23.camel@joe2Laptop> (raw)
In-Reply-To: <20120710.174142.995966539991957646.davem@davemloft.net>

On Tue, 2012-07-10 at 17:41 -0700, David Miller wrote:
> From: Paul Gortmaker <paul.gortmaker@windriver.com>
> Date: Tue, 10 Jul 2012 20:09:44 -0400
> 
> > On Tue, Jul 10, 2012 at 12:18 PM, Johannes Berg
> > <johannes@sipsolutions.net> wrote:
> >> From: Johannes Berg <johannes.berg@intel.com>
> >>
> >> 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 I grepped properly, there are 42 instances of static arrays for
for broadcast ethernet addresses in drivers/net and drivers/staging
so it'd save some smallish amount of code by using a combination of
is_broadcast_ether_addr and this new func.

I think there are 53 instances of the memset(foo, 0xff, 6|ETH_ALEN).

> I disagree and I intend to apply Johannes's patch as-is to net-next.

Sounds fine to me.

For some additional style symmetry, how about a conversion of
random_ether_address to eth_random_addr too via

o Rename random_ether_addr to eth_random_addr and add a
  #define random_ether_addr eth_random_addr
o sed 's/\brandom_ether_addr\b/eth_random_addr/g' files_that_use_REA
o remove the #define after awhile



WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org,
	johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] etherdevice: introduce eth_broadcast_addr
Date: Tue, 10 Jul 2012 18:09:27 -0700	[thread overview]
Message-ID: <1341968967.13724.23.camel@joe2Laptop> (raw)
In-Reply-To: <20120710.174142.995966539991957646.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>

On Tue, 2012-07-10 at 17:41 -0700, David Miller wrote:
> From: Paul Gortmaker <paul.gortmaker-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
> Date: Tue, 10 Jul 2012 20:09:44 -0400
> 
> > 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 I grepped properly, there are 42 instances of static arrays for
for broadcast ethernet addresses in drivers/net and drivers/staging
so it'd save some smallish amount of code by using a combination of
is_broadcast_ether_addr and this new func.

I think there are 53 instances of the memset(foo, 0xff, 6|ETH_ALEN).

> I disagree and I intend to apply Johannes's patch as-is to net-next.

Sounds fine to me.

For some additional style symmetry, how about a conversion of
random_ether_address to eth_random_addr too via

o Rename random_ether_addr to eth_random_addr and add a
  #define random_ether_addr eth_random_addr
o sed 's/\brandom_ether_addr\b/eth_random_addr/g' files_that_use_REA
o remove the #define after awhile


--
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

  reply	other threads:[~2012-07-11  1:09 UTC|newest]

Thread overview: 39+ 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
2012-07-09  6:58 ` David Miller
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
2012-07-11  1:09         ` Joe Perches [this message]
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               ` 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
2012-07-13  7:15               ` Gertjan van Wingerde
2012-07-13  7:15                 ` Gertjan van Wingerde
2012-07-13  5:33             ` [PATCH net-next 5/8] drivers/net: " Joe Perches
2012-07-13  5:33             ` [PATCH net-next 6/8] s390: " Joe Perches
2012-07-13  5:33             ` [PATCH net-next 7/8] usb: " Joe Perches
2012-07-16 11:15               ` Felipe Balbi
2012-07-13  5:33             ` [PATCH net-next 8/8] arch: " Joe Perches
2012-07-15 21:51               ` Mike Frysinger
2012-07-16 12:56               ` Mark Salter
2012-07-16 14:20               ` Ralf Baechle
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:14               ` Felipe Balbi
2012-07-16 10:29               ` David Miller
2012-07-16 10:29                 ` David Miller
2012-07-16 11:12                 ` Felipe Balbi
2012-07-16 11:17                   ` David Miller
2012-07-16 11:17                     ` David Miller
2012-07-17  5:39             ` David Miller
2012-07-17  5:39               ` David Miller
2012-07-11  7:27       ` [PATCH] etherdevice: introduce eth_broadcast_addr Johannes Berg
2012-07-11  7:27         ` Johannes Berg
2012-07-11  1:07     ` 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=1341968967.13724.23.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul.gortmaker@windriver.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 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.