Skip to contentSkip to conversation

Staging: wilc1000: Fix warning prefer eth_broadcast_addr over memset()

PATCH Superseded Punit Vara 2 participants 2 messages Oct 26, 2015 – Oct 27, 2015 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Punit Vara

author
#0 lore raw

PATCH 1/1 Staging: wilc1000: Fix warning prefer eth_broadcast_addr over memset()

This patch is to the host_interface.c that fixes up following warning by checkpatch.pl:

-Prefer eth_broadcast_addr() over memset()

---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.c +1 -1
index 09a6c98..87b4eb8 100644
@@ -4688,7 +4688,7 @@ s32 host_int_del_station(struct host_if_drv *hif_drv, const u8 *pu8MacAddr)
 	msg.drv = hif_drv;
 
 	if (pu8MacAddr == NULL)
-		memset(pstrDelStationMsg->mac_addr, 255, ETH_ALEN);
+		eth_broadcast_addr(pstrDelStationMsg->mac_addr);
 	else
 		memcpy(pstrDelStationMsg->mac_addr, pu8MacAddr, ETH_ALEN);
 
Signature · 1 line
2.5.3
maintainer
#1 lore raw
Quoted 15 lines · Punit Vara

This patch is to the host_interface.c that fixes up following warning by checkpatch.pl:

-Prefer eth_broadcast_addr() over memset()

---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.c +0 -0
index 09a6c98..87b4eb8 100644

drivers/staging/wilc1000/host_interface.c s32 host_int_del_station(struct host_if_drv *hif_drv, const u8 *pu8MacAddr) · line 4694

Quoted 8 lines
drivers/staging/wilc1000/host_interface.c +1 -1
@@ -4688,7 +4688,7 @@ s32 host_int_del_station(struct host_if_drv *hif_drv, const u8 *pu8MacAddr)
 	msg.drv = hif_drv;
 
 	if (pu8MacAddr == NULL)
-		memset(pstrDelStationMsg->mac_addr, 255, ETH_ALEN);
+		eth_broadcast_addr(pstrDelStationMsg->mac_addr);
 	else
 		memcpy(pstrDelStationMsg->mac_addr, pu8MacAddr, ETH_ALEN);
 

Doesn't apply to my staging.git tree at all :(