summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2018-06-17 17:40:53 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-19 18:51:43 -0400
commit4e8439aa34802deab11cee68b0ecb18f887fb153 (patch)
tree23ec682c9cc6e6313be28806294a6c1766ee24a1
parent3256d29fc7aecdf99feb1cb9475ed2252769a8a7 (diff)
net: hamradio: use eth_broadcast_addr
The array bpq_eth_addr is only used to get the size of an address, whereas the bcast_addr is used to set the broadcast address. This leads to a warning when using clang: drivers/net/hamradio/bpqether.c:94:13: warning: variable 'bpq_eth_addr' is not needed and will not be emitted [-Wunneeded-internal-declaration] static char bpq_eth_addr[6]; ^ Remove both variables and use the common eth_broadcast_addr to set the broadcast address. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/hamradio/bpqether.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index f347fd9c5b28..777fa59f5e0c 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -89,10 +89,6 @@
89static const char banner[] __initconst = KERN_INFO \ 89static const char banner[] __initconst = KERN_INFO \
90 "AX.25: bpqether driver version 004\n"; 90 "AX.25: bpqether driver version 004\n";
91 91
92static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
93
94static char bpq_eth_addr[6];
95
96static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); 92static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
97static int bpq_device_event(struct notifier_block *, unsigned long, void *); 93static int bpq_device_event(struct notifier_block *, unsigned long, void *);
98 94
@@ -501,8 +497,8 @@ static int bpq_new_device(struct net_device *edev)
501 bpq->ethdev = edev; 497 bpq->ethdev = edev;
502 bpq->axdev = ndev; 498 bpq->axdev = ndev;
503 499
504 memcpy(bpq->dest_addr, bcast_addr, sizeof(bpq_eth_addr)); 500 eth_broadcast_addr(bpq->dest_addr);
505 memcpy(bpq->acpt_addr, bcast_addr, sizeof(bpq_eth_addr)); 501 eth_broadcast_addr(bpq->acpt_addr);
506 502
507 err = register_netdevice(ndev); 503 err = register_netdevice(ndev);
508 if (err) 504 if (err)