linux-kernel-test/drivers
Julia Lawall 1dd7def0b5 Staging: meilhaus: convert nested spin_lock_irqsave to spin_lock
If spin_lock_irqsave is called twice in a row with the same second
argument, the interrupt state at the point of the second call overwrites
the value saved by the first call.  Indeed, the second call does not need
to save the interrupt state, so it is changed to a simple spin_lock.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression lock1,lock2;
expression flags;
@@

*spin_lock_irqsave(lock1,flags)
... when != flags
*spin_lock_irqsave(lock2,flags)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: David Kiliani <mail@davidkiliani.de>
Cc: Meilhaus Support <support@meilhaus.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:05 -07:00
..
accessibility
acpi Merge branch 'x86-txt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-15 09:19:20 -07:00
amba
ata
atm
auxdisplay
base PM: Reset transition_started at dpm_resume_noirq 2009-09-14 20:27:00 +02:00
block Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
bluetooth
cdrom
char Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
clocksource
connector
cpufreq Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-09-15 09:39:44 -07:00
cpuidle
crypto
dca
dio
dma at_hdmac: Rework suspend_late()/resume_early() 2009-09-14 20:27:00 +02:00
edac EDAC, AMD: decode FR MCEs 2009-09-14 19:01:37 +02:00
eisa
firewire Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2009-09-14 10:37:28 -07:00
firmware
gpio
gpu
hid Merge branches 'upstream', 'upstream-fixes' and 'debugfs' into for-linus 2009-09-13 20:09:41 +02:00
hwmon
i2c
ide Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6 2009-09-15 10:01:16 -07:00
idle
ieee1394
ieee802154
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2009-09-14 10:37:28 -07:00
input Nicolas Pitre has a new email address 2009-09-15 09:37:12 -07:00
isdn
leds
lguest
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
mca
md Merge branch 'for-2.6.32' of git://git.kernel.dk/linux-2.6-block 2009-09-14 17:55:15 -07:00
media Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2009-09-15 09:22:18 -07:00
memstick
message Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-09-14 17:53:36 -07:00
mfd
misc Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-09-14 17:53:36 -07:00
mmc
mtd Nicolas Pitre has a new email address 2009-09-15 09:37:12 -07:00
net Nicolas Pitre has a new email address 2009-09-15 09:37:12 -07:00
nubus
of
oprofile
parisc
parport
pci Merge branch 'x86-txt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-09-15 09:19:20 -07:00
pcmcia
platform hp-wmi: Switch driver to dev_pm_ops 2009-09-14 20:26:59 +02:00
pnp
power
pps
ps3
rapidio
regulator
rtc Nicolas Pitre has a new email address 2009-09-15 09:37:12 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2009-09-14 17:53:36 -07:00
sbus
scsi Merge branch 'for-2.6.32' of git://git.kernel.dk/linux-2.6-block 2009-09-14 17:55:15 -07:00
serial
sh
sn
spi
ssb
staging Staging: meilhaus: convert nested spin_lock_irqsave to spin_lock 2009-09-15 12:02:05 -07:00
tc
telephony
thermal
uio
usb Merge branch 'master' into for-linus 2009-09-14 20:26:05 +02:00
uwb
video Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2009-09-15 09:51:09 -07:00
virtio
vlynq
w1
watchdog
xen Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-09-15 09:39:44 -07:00
zorro
Kconfig
Makefile