Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* '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

+8 -59
+3 -3
Documentation/lockdep-design.txt
··· 54 The bit position indicates STATE, STATE-read, for each of the states listed 55 above, and the character displayed in each indicates: 56 57 - '.' acquired while irqs disabled 58 - '+' acquired in irq context 59 - '-' acquired with irqs enabled 60 '?' acquired in irq context with irqs enabled. 61 62 Unused mutexes cannot be part of the cause of an error.
··· 54 The bit position indicates STATE, STATE-read, for each of the states listed 55 above, and the character displayed in each indicates: 56 57 + '.' acquired while irqs disabled and not in irq context 58 + '-' acquired in irq context 59 + '+' acquired with irqs enabled 60 '?' acquired in irq context with irqs enabled. 61 62 Unused mutexes cannot be part of the cause of an error.
+4 -4
kernel/posix-cpu-timers.c
··· 1420 * timer call will interfere. 1421 */ 1422 list_for_each_entry_safe(timer, next, &firing, it.cpu.entry) { 1423 - int firing; 1424 spin_lock(&timer->it_lock); 1425 list_del_init(&timer->it.cpu.entry); 1426 - firing = timer->it.cpu.firing; 1427 timer->it.cpu.firing = 0; 1428 /* 1429 * The firing flag is -1 if we collided with a reset 1430 * of the timer, which already reported this 1431 * almost-firing as an overrun. So don't generate an event. 1432 */ 1433 - if (likely(firing >= 0)) { 1434 cpu_timer_fire(timer); 1435 - } 1436 spin_unlock(&timer->it_lock); 1437 } 1438 }
··· 1420 * timer call will interfere. 1421 */ 1422 list_for_each_entry_safe(timer, next, &firing, it.cpu.entry) { 1423 + int cpu_firing; 1424 + 1425 spin_lock(&timer->it_lock); 1426 list_del_init(&timer->it.cpu.entry); 1427 + cpu_firing = timer->it.cpu.firing; 1428 timer->it.cpu.firing = 0; 1429 /* 1430 * The firing flag is -1 if we collided with a reset 1431 * of the timer, which already reported this 1432 * almost-firing as an overrun. So don't generate an event. 1433 */ 1434 + if (likely(cpu_firing >= 0)) 1435 cpu_timer_fire(timer); 1436 spin_unlock(&timer->it_lock); 1437 } 1438 }
+1 -52
lib/dma-debug.c
··· 400 return -ENOMEM; 401 } 402 403 - static int device_dma_allocations(struct device *dev) 404 - { 405 - struct dma_debug_entry *entry; 406 - unsigned long flags; 407 - int count = 0, i; 408 - 409 - for (i = 0; i < HASH_SIZE; ++i) { 410 - spin_lock_irqsave(&dma_entry_hash[i].lock, flags); 411 - list_for_each_entry(entry, &dma_entry_hash[i].list, list) { 412 - if (entry->dev == dev) 413 - count += 1; 414 - } 415 - spin_unlock_irqrestore(&dma_entry_hash[i].lock, flags); 416 - } 417 - 418 - return count; 419 - } 420 - 421 - static int dma_debug_device_change(struct notifier_block *nb, 422 - unsigned long action, void *data) 423 - { 424 - struct device *dev = data; 425 - int count; 426 - 427 - 428 - switch (action) { 429 - case BUS_NOTIFY_UNBIND_DRIVER: 430 - count = device_dma_allocations(dev); 431 - if (count == 0) 432 - break; 433 - err_printk(dev, NULL, "DMA-API: device driver has pending " 434 - "DMA allocations while released from device " 435 - "[count=%d]\n", count); 436 - break; 437 - default: 438 - break; 439 - } 440 - 441 - return 0; 442 - } 443 - 444 void dma_debug_add_bus(struct bus_type *bus) 445 { 446 - struct notifier_block *nb; 447 - 448 - nb = kzalloc(sizeof(struct notifier_block), GFP_KERNEL); 449 - if (nb == NULL) { 450 - printk(KERN_ERR "dma_debug_add_bus: out of memory\n"); 451 - return; 452 - } 453 - 454 - nb->notifier_call = dma_debug_device_change; 455 - 456 - bus_register_notifier(bus, nb); 457 } 458 459 /*
··· 400 return -ENOMEM; 401 } 402 403 void dma_debug_add_bus(struct bus_type *bus) 404 { 405 + /* FIXME: register notifier */ 406 } 407 408 /*