[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <50364AE9.7070600@lwfinger.net>
Date: Thu, 23 Aug 2012 10:23:21 -0500
From: Larry Finger <Larry.Finger@...inger.net>
To: Wei Yongjun <weiyj.lk@...il.com>
CC: florian.c.schilhabel@...glemail.com, gregkh@...uxfoundation.org,
yongjun_wei@...ndmicro.com.cn, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl871x_mlme.c: use is_zero_ether_addr() instead
of memcmp()
On 08/23/2012 02:20 AM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
>
> Using is_zero_ether_addr() instead of directly use
> memcmp() to determine if the ethernet address is
> all zeros.
>
> spatch with a semantic match is used to found this problem.
> (http://coccinelle.lip6.fr/)
>
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
> ---
> drivers/staging/rtl8712/rtl871x_mlme.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
The content of this patch is OK, but the subject line needs to be "staging:
r8712u: rtl871x_mlme.c" use ....". Without that "r8712u" addition, searching the
git log for all changes to r8712u is a lot harder.
With that change: ACKED-by: Larry Finger <Larry.Finger@...inger.net>
> diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
> index dc7adc1..c51ad9e 100644
> --- a/drivers/staging/rtl8712/rtl871x_mlme.c
> +++ b/drivers/staging/rtl8712/rtl871x_mlme.c
> @@ -28,6 +28,8 @@
>
> #define _RTL871X_MLME_C_
>
> +#include <linux/etherdevice.h>
> +
> #include "osdep_service.h"
> #include "drv_types.h"
> #include "recv_osdep.h"
> @@ -146,9 +148,8 @@ static struct wlan_network *_r8712_find_network(struct __queue *scanned_queue,
> unsigned long irqL;
> struct list_head *phead, *plist;
> struct wlan_network *pnetwork = NULL;
> - u8 zero_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
>
> - if (!memcmp(zero_addr, addr, ETH_ALEN))
> + if (is_zero_ether_addr(addr))
> return NULL;
> spin_lock_irqsave(&scanned_queue->lock, irqL);
> phead = get_list_head(scanned_queue);
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists