Skip to contentSkip to conversation

staging: rtl8188eu: core: rtw_ap: Replace memcmp with ether_addr_equal

PATCH In review Anchal Jain 2 participants 2 messages Sep 30, 2016 – Oct 2, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 staging: rtl8188eu: core: rtw_ap: Replace memcmp with ether_addr_equal

Replace memcmp() with ether_addr_equal()
issue detect by checkpatch.pl

---
 drivers/staging/rtl8188eu/core/rtw_ap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8188eu/core/rtw_ap.c +2 -2
index fbe9941..6a3dc5e 100644
@@ -1163,7 +1163,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
 		paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
 		plist = plist->next;
 
-		if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
+		if (!ether_addr_equal(paclnode->addr, addr, ETH_ALEN)) {
 			if (paclnode->valid) {
 				added = true;
 				DBG_88E("%s, sta has been added\n", __func__);
@@ -1223,7 +1223,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
 		paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
 		plist = plist->next;
 
-		if (!memcmp(paclnode->addr, addr, ETH_ALEN)) {
+		if (!ether_addr_equal(paclnode->addr, addr, ETH_ALEN)) {
 			if (paclnode->valid) {
 				paclnode->valid = false;
 
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 7 lines · Anchal Jain

Replace memcmp() with ether_addr_equal()
issue detect by checkpatch.pl

---
 drivers/staging/rtl8188eu/core/rtw_ap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

You didn't build test this patch, which isn't very nice :(

Please always test your patches by at least building them, otherwise you will end up with grumpy maintainers...

greg k-h