linux/drivers
Julia Lawall 62b0559aad drivers/md: use time_before, time_before_eq, etc
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.

A simplified version of the semantic patch making this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@ change_compare_np @
expression E;
@@

(
- jiffies <= E
+ time_before_eq(jiffies,E)
|
- jiffies >= E
+ time_after_eq(jiffies,E)
|
- jiffies < E
+ time_before(jiffies,E)
|
- jiffies > E
+ time_after(jiffies,E)
)

@ include depends on change_compare_np @
@@

#include <linux/jiffies.h>

@ no_include depends on !include && change_compare_np @
@@

  #include <linux/...>
+ #include <linux/jiffies.h>
// </smpl>

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 08:58:42 -07:00
..
acorn/char
acpi drivers/acpi/thermal.c: fix build with CONFIG_DMI=n 2008-04-28 08:58:30 -07:00
amba
ata pata_bf54x: decrease count first. 2008-04-25 01:26:28 -04:00
atm
auxdisplay
base
block return pfn from direct_access, for XIP 2008-04-28 08:58:23 -07:00
bluetooth
cdrom
char VT notifier extension for accessibility 2008-04-28 08:58:32 -07:00
clocksource
connector
cpufreq
cpuidle
crypto
dca
dio
dma
edac
eisa
firewire
firmware
gpio gpiochip_reserve() 2008-04-28 08:58:34 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2008-04-25 12:38:14 -07:00
hwmon
i2c
ide ide-tape: remove tape->merge_stage 2008-04-27 15:38:34 +02:00
ieee1394 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 2008-04-25 12:24:06 -07:00
infiniband
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2008-04-27 10:10:37 -07:00
isdn isdn: rename CONFIG_AVMB1_COMPAT to not look like a Kconfig variable 2008-04-28 08:58:34 -07:00
leds leds: Add default-on trigger 2008-04-25 00:06:52 +01:00
lguest
macintosh mac-hid: fix build after lockdep annotation 2008-04-25 18:57:09 -07:00
mca
md drivers/md: use time_before, time_before_eq, etc 2008-04-28 08:58:42 -07:00
media mm: remove nopage 2008-04-28 08:58:18 -07:00
memstick
message
mfd mfd: use shorter set_current_state() 2008-04-28 08:58:32 -07:00
misc Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-04-27 11:25:00 -07:00
mmc
mtd [MTD] m25p80: Add Support for ATMEL AT25DF641 64-Megabit SPI Flash 2008-04-25 09:14:23 +01:00
net Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2008-04-27 10:10:14 -07:00
nubus
of
oprofile oprofile: change cpu_buffer from array to per_cpu variable 2008-04-28 08:58:31 -07:00
parisc
parport
pci intel-iommu.c: dma ops fix 2008-04-24 23:15:43 +02:00
pcmcia
pnp
power
ps3
rapidio
rtc rtc: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:17 -07:00
s390 return pfn from direct_access, for XIP 2008-04-28 08:58:23 -07:00
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-04-27 11:25:00 -07:00
serial atmel_serial: remove duplicated macro definition 2008-04-28 08:58:30 -07:00
sh
sn
spi spi: spi_imx updates 2008-04-28 08:58:31 -07:00
ssb
tc
telephony
thermal
uio
usb usb: don't update devnum for wusb devices 2008-04-24 21:16:59 -07:00
video video: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:42 -07:00
virtio
w1
watchdog
xen xen: add balloon driver 2008-04-24 23:57:33 +02:00
zorro
Kconfig xen: add balloon driver 2008-04-24 23:57:33 +02:00
Makefile