mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: [PATCH 05/12] net: atm: Use ether_broadcast_addr
Date: Sat, 31 Mar 2018 00:05:20 -0700	[thread overview]
Message-ID: <bb4b0a9c7649ea3db2d78673b092de5daed3a930.1522479607.git.joe@perches.com> (raw)
In-Reply-To: <cover.1522479607.git.joe@perches.com>

Use the new global instead of a local static to reduce object code size
a tiny bit.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/atm/lec.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/net/atm/lec.c b/net/atm/lec.c
index 01d5d20a6eb1..ec47b45bd836 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -116,8 +116,6 @@ static struct lane2_ops lane2_ops = {
 	.associate_indicator = NULL             /* spec 3.1.5 */
 };
 
-static unsigned char bus_mac[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-
 /* Device structures */
 static struct net_device *dev_lec[MAX_LEC_ITF];
 
@@ -1726,7 +1724,7 @@ static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv,
 		case 1:
 			return priv->mcast_vcc;
 		case 2:	/* LANE2 wants arp for multicast addresses */
-			if (ether_addr_equal(mac_to_find, bus_mac))
+			if (ether_addr_equal(mac_to_find, ether_broadcast_addr))
 				return priv->mcast_vcc;
 			break;
 		default:
@@ -1954,7 +1952,7 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data,
 	if (ioc_data->receive == 2) {
 		pr_debug("LEC_ARP: Attaching mcast forward\n");
 #if 0
-		entry = lec_arp_find(priv, bus_mac);
+		entry = lec_arp_find(priv, ether_broadcast_addr);
 		if (!entry) {
 			pr_info("LEC_ARP: Multicast entry not found!\n");
 			goto out;
@@ -1963,7 +1961,7 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data,
 		entry->recv_vcc = vcc;
 		entry->old_recv_push = old_push;
 #endif
-		entry = make_entry(priv, bus_mac);
+		entry = make_entry(priv, ether_broadcast_addr);
 		if (entry == NULL)
 			goto out;
 		del_timer(&entry->timer);
@@ -1988,7 +1986,7 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data,
 			 ioc_data->atm_addr[14], ioc_data->atm_addr[15],
 			 ioc_data->atm_addr[16], ioc_data->atm_addr[17],
 			 ioc_data->atm_addr[18], ioc_data->atm_addr[19]);
-		entry = make_entry(priv, bus_mac);
+		entry = make_entry(priv, ether_broadcast_addr);
 		if (entry == NULL)
 			goto out;
 		memcpy(entry->atm_addr, ioc_data->atm_addr, ATM_ESA_LEN);
@@ -2071,7 +2069,7 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data,
 	 * Not found, snatch address from first data packet that arrives
 	 * from this vcc
 	 */
-	entry = make_entry(priv, bus_mac);
+	entry = make_entry(priv, ether_broadcast_addr);
 	if (!entry)
 		goto out;
 	entry->vcc = vcc;
-- 
2.15.0

  parent reply	other threads:[~2018-03-31  7:08 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-31  7:05 [PATCH 00/12] Ethernet: Add and use ether_<type>_addr globals Joe Perches
2018-03-31  7:05 ` [PATCH 01/12] ethernet: Add generic ether_<foo>_addr addresses Joe Perches
2018-03-31  7:05 ` [PATCH 02/12] treewide/net: Rename eth_stp_addr to ether_stp_addr Joe Perches
2018-03-31 17:36   ` Andrew Lunn
2018-03-31 18:01     ` Joe Perches
2018-03-31 18:34     ` [PATCH V2] " Joe Perches
2018-04-01 18:07       ` David Miller
2018-04-01  0:18   ` [PATCH 02/12] " kbuild test robot
2018-03-31  7:05 ` [PATCH 03/12] net: mac80211: Use global ether_broadcast_addr Joe Perches
2018-03-31  7:05 ` [PATCH 04/12] bridge: netfilter: Use the new global ether_<foo>_addr arrays Joe Perches
2018-03-31 18:28   ` Pablo Neira Ayuso
2018-03-31 18:40     ` Joe Perches
2018-03-31  7:05 ` Joe Perches [this message]
2018-03-31  7:05 ` [PATCH 06/12] wireless: Convert simple uses of a static const Ethernet broadcast address Joe Perches
2018-03-31 14:01   ` Pkshih
2018-03-31 14:33     ` Joe Perches
2018-04-05 12:39   ` Kalle Valo
2018-04-05 12:48     ` Kalle Valo
2018-03-31  7:05 ` [PATCH 07/12] brcmfmac: Convert ALLFFMAC to ether_broadcast_addr Joe Perches
2018-04-05 19:00   ` Arend van Spriel
2018-03-31  7:05 ` [PATCH 08/12] iwlegacy: Remove EXPORT_SYMBOL(il_bcast_addr) and use ether_broadcast_addr Joe Perches
2018-03-31  7:05 ` [PATCH 09/12] iwlwifi: Remove local iwl_bcast_addr " Joe Perches
2018-07-07  7:40   ` Luciano Coelho
2018-09-07 10:46     ` Luciano Coelho
2018-03-31  7:05 ` [PATCH 10/12] mvpp2: Use ether_broadcast_addr instead of a local array Joe Perches
2018-03-31  7:05 ` [PATCH 11/12] qlogic: Convert local bcast_addr to global ether_broadcast_addr Joe Perches
2018-03-31  7:05 ` [PATCH 12/12] ethernet: Use ether_zero_addr instead of local statics Joe Perches
2018-04-05 13:27 ` [PATCH 00/12] Ethernet: Add and use ether_<type>_addr globals Felix Fietkau
2018-04-05 13:51   ` Joe Perches
2018-04-05 14:05     ` Felix Fietkau

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=bb4b0a9c7649ea3db2d78673b092de5daed3a930.1522479607.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®