]> git.baikalelectronics.ru Git - kernel.git/commit
[media] pctv452e: Replace memset with eth_zero_addr
authorVaishali Thakkar <vthakkar1994@gmail.com>
Fri, 26 Jun 2015 04:34:37 +0000 (01:34 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 11 Aug 2015 15:57:01 +0000 (12:57 -0300)
commit7c1e7d1a31904919162a4599633585d3e7cc5837
treeb3e1b83bb37b7e5e8a65990847597897dd9b4b60
parent5c25e27eb3929b6a794f7c824d61b78f099d85ae
[media] pctv452e: Replace memset with eth_zero_addr

Use eth_zero_addr to assign the zero address to the given address
array instead of memset when second argument is address of zero.
Note that the 6 in the third argument of memset appears to represent
an ethernet address size (ETH_ALEN).

The Coccinelle semantic patch that makes this change is as follows:

// <smpl>
@eth_zero_addr@
expression e;
@@

-memset(e,0x00,6);
+eth_zero_addr(e);
// </smpl>

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/dvb-usb/pctv452e.c