Skip to content

Commit 4e8439a

Browse files
agnersdavem330
authored andcommitted
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>
1 parent 3256d29 commit 4e8439a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/net/hamradio/bpqether.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@
8989
static const char banner[] __initconst = KERN_INFO \
9090
"AX.25: bpqether driver version 004\n";
9191

92-
static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
93-
94-
static char bpq_eth_addr[6];
95-
9692
static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
9793
static int bpq_device_event(struct notifier_block *, unsigned long, void *);
9894

@@ -501,8 +497,8 @@ static int bpq_new_device(struct net_device *edev)
501497
bpq->ethdev = edev;
502498
bpq->axdev = ndev;
503499

504-
memcpy(bpq->dest_addr, bcast_addr, sizeof(bpq_eth_addr));
505-
memcpy(bpq->acpt_addr, bcast_addr, sizeof(bpq_eth_addr));
500+
eth_broadcast_addr(bpq->dest_addr);
501+
eth_broadcast_addr(bpq->acpt_addr);
506502

507503
err = register_netdevice(ndev);
508504
if (err)

0 commit comments

Comments
 (0)