WSL2-Linux-Kernel/arch
Julia Lawall f25c80a4b2 arch/um/drivers: remove duplicate structure field initialization
There are two initializations of ndo_set_mac_address, one to a local
function that is not used otherwise and one to a function that is defined
elsewhere.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier I, s, fld;
position p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@s@
identifier I, s, r.fld;
position r.p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@script:python@
p0 << r.p0;
fld << r.fld;
ps << s.p;
pr << r.p;
@@

if int(ps[0].line)<int(pr[0].line) or int(ps[0].column)<int(pr[0].column):
  cocci.print_main(fld,p0)
// </smpl>

akpm:

- Use the standard eth_mac_addr() in uml_net_set_mac()

- Remove unneeded and racy local set_ether_mac()

- Remove duplicated (and incorrect)
  uml_netdev_ops.ndo_set_mac_address initializer.

Fixes 8bb95b39a1 ("uml: convert network
device to netdevice ops").

[akpm@linux-foundation.org: rework as above]
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-21 11:16:09 -07:00
..
alpha asm-generic: remove ARCH_HAS_SG_CHAIN in scatterlist.h 2010-05-27 09:12:54 -07:00
arm Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 2010-05-30 09:13:08 -07:00
avr32 avr32: use asm-generic/scatterlist.h 2010-05-27 09:12:54 -07:00
blackfin blackfin: use use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
cris cris: use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
frv FRV: ARCH_KMALLOC_MINALIGN was already defined 2010-05-28 10:17:21 -07:00
h8300 h8300: use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
ia64 ia64: revert __node_random addition 2010-05-30 10:08:03 -07:00
m32r m32r: use use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
m68k Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2010-05-27 10:19:19 -07:00
m68knommu arch/m68knommu/platform/68360/commproc.c: Checkpatch cleanup 2010-05-24 14:44:25 +10:00
microblaze net: NET_SKB_PAD should depend on L1_CACHE_BYTES 2010-06-15 18:16:43 -07:00
mips mips: use use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
mn10300 mn10300: use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
parisc Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6 2010-05-30 09:02:02 -07:00
powerpc net: NET_SKB_PAD should depend on L1_CACHE_BYTES 2010-06-15 18:16:43 -07:00
s390 net: fix 64 bit counters on 32 bit arches 2010-07-07 14:58:56 -07:00
score asm-generic: remove ISA_DMA_THRESHOLD in scatterlist.h 2010-05-27 09:12:54 -07:00
sh asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len() 2010-05-27 09:12:54 -07:00
sparc Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-27 15:23:47 -07:00
um arch/um/drivers: remove duplicate structure field initialization 2010-07-21 11:16:09 -07:00
x86 x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN 2010-07-01 22:45:54 -07:00
xtensa xtensa: use use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
.gitignore
Kconfig hw-breakpoints: Separate constraint space for data and instruction breakpoints 2010-05-01 04:32:11 +02:00