linux-stable/arch/mips
Julia Lawall b265158399 MIPS: SMTC: Remove duplicate structure field initialization
The definition of the irq_ipi structure has two initializations of the
flags field.  This combines them.

[Ralf: The issue was originally introduced by commit
be4894196d79455f420dd7bb78be7dc73bec115c (linux-mips.org) rsp.
033890b084 (kernel.org).  The original
intention of the code was to initialize .flags with both flags ored together.
The broken C code as actually implemented will be compiled by an equally
broken gcc to use only the last initialization, that is IRQF_PERCPU
which means this turned into an SMTC bug for 2.6.23 and newer.]

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>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-30 21:46:59 +02:00
..
alchemy cpumask: remove dangerous CPU_MASK_ALL_PTR, &CPU_MASK_ALL.: mips 2009-09-24 09:34:36 +09:30
ar7 MIPS: AR7: Make board code register ar7_wdt as a platform device 2009-09-17 20:07:48 +02:00
basler/excite platform driver: fix incorrect use of 'platform_bus_type' with 'struct device_driver' 2009-03-24 16:38:25 -07:00
bcm47xx MIPS: WGT634U: Add reset button support 2008-10-15 12:46:51 +01:00
bcm63xx MIPS: BCM63xx: Remove duplicated #include 2009-09-30 21:46:58 +02:00
boot MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
cavium-octeon MIPS: Octeon: Move some platform device registration to its own file. 2009-09-17 20:07:52 +02:00
cobalt Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
configs MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
dec Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-18 09:15:24 -07:00
emma MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
fw MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
gt64120/wrppmc Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
include/asm cpumask: use mm_cpumask() wrapper: mips 2009-09-24 09:34:51 +09:30
jazz MIPS: Jazz: Fix read buffer overflow 2009-08-03 17:52:47 +01:00
kernel MIPS: SMTC: Remove duplicate structure field initialization 2009-09-30 21:46:59 +02:00
lasat sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
lib MIPS: Fix __ndelay build error and add 'ull' suffix for 32-bit kernel 2009-06-17 11:06:24 +01:00
loongson loongson: fix cut-and-paste mis-merge 2009-09-20 15:57:28 -07:00
math-emu MIPS: Switch FPU emulator trap to BREAK instruction. 2008-10-30 14:44:34 +00:00
mipssim cpumask: arch_send_call_function_ipi_mask: mips 2009-09-24 09:34:45 +09:30
mm cpumask: use mm_cpumask() wrapper: mips 2009-09-24 09:34:51 +09:30
mti-malta cpumask: arch_send_call_function_ipi_mask: mips 2009-09-24 09:34:45 +09:30
nxp MIPS: Remove useless zero initializations. 2009-09-17 20:07:51 +02:00
oprofile MIPS: Loongson: Add oprofile support 2009-09-17 20:07:47 +02:00
pci MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
pmc-sierra cpumask: arch_send_call_function_ipi_mask: mips 2009-09-24 09:34:45 +09:30
power MIPS: Use PAGE_SIZE in assembly instead of _PAGE_SIZE. 2009-09-17 20:07:48 +02:00
rb532 MIPS: RB532: Check irq number when handling GPIO interrupts 2009-06-17 11:06:27 +01:00
sgi-ip22 MIPS: IP22, IP28: Build with -Werror 2009-09-17 20:07:44 +02:00
sgi-ip27 cpumask: arch_send_call_function_ipi_mask: mips 2009-09-24 09:34:45 +09:30
sgi-ip32 MIPS: IP32: Remove unnecessary if not even harmful volatile keywords. 2009-05-22 13:52:06 +01:00
sibyte cpumask: arch_send_call_function_ipi_mask: mips 2009-09-24 09:34:45 +09:30
sni timekeeping: Increase granularity of read_persistent_clock() 2009-08-15 10:55:46 +02:00
txx9 MIPS: TXx9: Fix error handling. 2009-09-17 20:07:43 +02:00
vr41xx Update Yoichi Yuasa's e-mail address 2009-07-03 15:45:29 +01:00
Kconfig MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
Kconfig.debug MIPS: Kconfig: Fix the arch-specific header path 2008-12-12 18:12:23 +00:00
Makefile arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 2009-09-20 12:28:22 +02:00