]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 May 2009 19:08:20 +0000 (12:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 May 2009 19:08:20 +0000 (12:08 -0700)
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  kernel/posix-cpu-timers.c: fix sparse warning
  dma-debug: remove broken dma memory leak detection for 2.6.30
  locking: Documentation: lockdep-design.txt, fix note of state bits

Documentation/lockdep-design.txt
kernel/posix-cpu-timers.c
lib/dma-debug.c

index 938ea22f2cc096f6838a678217e463bf9ec0cd4d..e20d913d5914a29261d12f5fa4585164ed170c82 100644 (file)
@@ -54,9 +54,9 @@ locking error messages, inside curlies. A contrived example:
 The bit position indicates STATE, STATE-read, for each of the states listed
 above, and the character displayed in each indicates:
 
-   '.'  acquired while irqs disabled
-   '+'  acquired in irq context
-   '-'  acquired with irqs enabled
+   '.'  acquired while irqs disabled and not in irq context
+   '-'  acquired in irq context
+   '+'  acquired with irqs enabled
    '?'  acquired in irq context with irqs enabled.
 
 Unused mutexes cannot be part of the cause of an error.
index c9dcf98b44633398217e3a7829ace3bf7791403d..bece7c0b67b29d42c3c425d053bd76087b7684f3 100644 (file)
@@ -1420,19 +1420,19 @@ void run_posix_cpu_timers(struct task_struct *tsk)
         * timer call will interfere.
         */
        list_for_each_entry_safe(timer, next, &firing, it.cpu.entry) {
-               int firing;
+               int cpu_firing;
+
                spin_lock(&timer->it_lock);
                list_del_init(&timer->it.cpu.entry);
-               firing = timer->it.cpu.firing;
+               cpu_firing = timer->it.cpu.firing;
                timer->it.cpu.firing = 0;
                /*
                 * The firing flag is -1 if we collided with a reset
                 * of the timer, which already reported this
                 * almost-firing as an overrun.  So don't generate an event.
                 */
-               if (likely(firing >= 0)) {
+               if (likely(cpu_firing >= 0))
                        cpu_timer_fire(timer);
-               }
                spin_unlock(&timer->it_lock);
        }
 }
index d3da7edc034f7c60496056332850458b849a4f61..69da09a085a1943ea6a70f4871fd2df1683110fb 100644 (file)
@@ -400,60 +400,9 @@ out_err:
        return -ENOMEM;
 }
 
-static int device_dma_allocations(struct device *dev)
-{
-       struct dma_debug_entry *entry;
-       unsigned long flags;
-       int count = 0, i;
-
-       for (i = 0; i < HASH_SIZE; ++i) {
-               spin_lock_irqsave(&dma_entry_hash[i].lock, flags);
-               list_for_each_entry(entry, &dma_entry_hash[i].list, list) {
-                       if (entry->dev == dev)
-                               count += 1;
-               }
-               spin_unlock_irqrestore(&dma_entry_hash[i].lock, flags);
-       }
-
-       return count;
-}
-
-static int dma_debug_device_change(struct notifier_block *nb,
-                                   unsigned long action, void *data)
-{
-       struct device *dev = data;
-       int count;
-
-
-       switch (action) {
-       case BUS_NOTIFY_UNBIND_DRIVER:
-               count = device_dma_allocations(dev);
-               if (count == 0)
-                       break;
-               err_printk(dev, NULL, "DMA-API: device driver has pending "
-                               "DMA allocations while released from device "
-                               "[count=%d]\n", count);
-               break;
-       default:
-               break;
-       }
-
-       return 0;
-}
-
 void dma_debug_add_bus(struct bus_type *bus)
 {
-       struct notifier_block *nb;
-
-       nb = kzalloc(sizeof(struct notifier_block), GFP_KERNEL);
-       if (nb == NULL) {
-               printk(KERN_ERR "dma_debug_add_bus: out of memory\n");
-               return;
-       }
-
-       nb->notifier_call = dma_debug_device_change;
-
-       bus_register_notifier(bus, nb);
+       /* FIXME: register notifier */
 }
 
 /*