Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1256229

[PATCH] Staging: wilc1000: Fix warning prefer eth_broadcast_addr over memset()

From Punit Vara <punitvara@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] Staging: wilc1000: Fix warning prefer eth_broadcast_addr over memset()
Date 2015-10-26 21:00 +0100
Message-ID <qnW5Y-3Uv-19@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

-Prefer eth_broadcast_addr() over memset()

Signed-off-by: Punit Vara <punitvara@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 09a6c98..87b4eb8 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -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);
 
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] Staging: wilc1000: Fix warning prefer eth_broadcast_addr over memset() Punit Vara <punitvara@gmail.com> - 2015-10-26 21:00 +0100
  Re: [PATCH] Staging: wilc1000: Fix warning prefer eth_broadcast_addr  over memset() Greg KH <gregkh@linuxfoundation.org> - 2015-10-27 06:40 +0100

csiph-web