Re: [PATCH] staging/wlan-ng: use ether_addr_equal_unaligned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2014-06-01 at 09:22 +0200, Denis Pithon wrote:
> This patch get rid of all memcmp() on ethernet addresses in wlan-ng.
> Replaced with ether_addr_equal_unaligned().

ether_addr_equal_unaligned is only useful for
code symmetry when some uses are known to be
ether_addr_equal.

At least one of these conversions could/should be
ether_addr_equal.

Have you checked or did you just do a global
s/memcpy/ether_addr_equal_unaligned/ ?

> diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
[]
> @@ -1505,7 +1506,8 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
>  	 */
>  
>  	for (i = 0; i < hw->authlist.cnt; i++)
> -		if (memcmp(rec.sta_addr, hw->authlist.addr[i], ETH_ALEN) == 0)
> +		if (ether_addr_equal_unaligned(rec.sta_addr,
> +					       hw->authlist.addr[i]))

I looked at this one, both are __aligned(2)
I didn't look at any others.


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux