id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
0f6f1407e3e4a2cc4f602806d3c174473850f4da
Analyze and fix the following issue in the Linux kernel code: HID: do not try to compile PM code with CONFIG_PM unset
Problem Details: Fixes this build breakage in case when CONFIG_PM is not set drivers/hid/usbhid/hid-core.c: In function 'hid_suspend': drivers/hid/usbhid/hid-core.c:1220: error: 'struct usb_device' has no member named 'auto_pm' drivers/hid/usbhid/hid-core.c:1245: error: 'struct usb_device' has no member named 'auto_pm...
```diff diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 625e7e8eb373..d8799a18a422 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -1210,6 +1210,7 @@ static void hid_cease_io(struct usbhid_device *usbhid) flush_scheduled_work(); } +#ifdef CONFIG_PM...
de18836e447c2dc30120c0919b8db8ddc0401cc4
Analyze and fix the following issue in the Linux kernel code: genirq: fix devres.o build for GENERIC_HARDIRQS=n
Problem Details: kernel/irq/devres.c is built by sparc (32bit) and m68k via the obscure ../../../kernel/irq/devres.o reference in arch/[sparc/m68k]/kernel/Makefile To avoid ifdeffery in devres.c provide request_threaded_irq as an inline for these users. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 7e63b824833f..143192f48bf3 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -123,6 +123,20 @@ extern int __must_check request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, const char *nam...
a9a9adfe2f99ddadfb574a098392a007970a1577
Analyze and fix the following issue in the Linux kernel code: netfilter: fix xt_LED build failure
Problem Details: net/netfilter/xt_LED.c:40: error: field netfilter_led_trigger has incomplete type net/netfilter/xt_LED.c: In function led_timeout_callback: net/netfilter/xt_LED.c:78: warning: unused variable ledinternal net/netfilter/xt_LED.c: In function led_tg_check: net/netfilter/xt_LED.c:102: error: implicit decla...
```diff diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig index 2562d05dbaf5..2c967e4f706c 100644 --- a/net/netfilter/Kconfig +++ b/net/netfilter/Kconfig @@ -374,7 +374,7 @@ config NETFILTER_XT_TARGET_HL config NETFILTER_XT_TARGET_LED tristate '"LED" target support' - depends on LEDS_CLASS + depends on LE...
8d47bae004f062630f69f7f83d098424252e232d
Analyze and fix the following issue in the Linux kernel code: dma: i.MX31 IPU DMA robustness improvements
Problem Details: Add DMA error handling to the ISR, move common code fragments to functions, fix scatter-gather element queuing in the ISR, survive channel freeing and re-allocation in a quick succession. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
```diff diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c index b759ae9315ba..0a525c450f24 100644 --- a/drivers/dma/ipu/ipu_idmac.c +++ b/drivers/dma/ipu/ipu_idmac.c @@ -28,6 +28,9 @@ #define FS_VF_IN_VALID 0x00000002 #define FS_ENC_IN_VALID 0x00000001 +static int ipu_disable_channel(struct idm...
257b17ca030387cb17314cd1851507bdd1b4ddd5
Analyze and fix the following issue in the Linux kernel code: dmaengine: fail device registration if channel registration fails
Problem Details: Atsushi points out: "If alloc_percpu or kzalloc failed, chan_id does not match with its position in device->channels list. And above "continue" looks buggy anyway. Keeping incomplete channels in device->channels list looks very dangerous..." Also, fix up leakage of idr_ref in the idr_pre_get() and c...
```diff diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 280a9d263eb3..49243d14b894 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -602,6 +602,24 @@ void dmaengine_put(void) } EXPORT_SYMBOL(dmaengine_put); +static int get_dma_id(struct dma_device *device) +{ + int rc; + + ...
afeeb7cebbd223ffee303fd8de4ba97458b13581
Analyze and fix the following issue in the Linux kernel code: intel-iommu: Fix address wrap on 32-bit kernel.
Problem Details: The problem is in dma_pte_clear_range and dma_pte_free_pagetable. When intel_unmap_single and intel_unmap_sg call them, the end address may be zero if the 'start_addr + size' rounds up. So no PTE gets cleared. The uncleared PTE fires the BUG_ON when it's used again to create new mappings. After I modi...
```diff diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 0c12d06bade6..002c8b95edf8 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -718,15 +718,17 @@ static void dma_pte_clear_one(struct dmar_domain *domain, u64 addr) static void dma_pte_clear_range(struct dmar_domain...
4cf2e75d0bec15d945972b005056c4a8731b82cf
Analyze and fix the following issue in the Linux kernel code: intel-iommu: Enable DMAR on 32-bit kernel.
Problem Details: If we fix a few highmem-related thinkos and a couple of printk format warnings, the Intel IOMMU driver works fine in a 32-bit kernel. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index bc2fbadff9f9..5ff2252ec475 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1794,7 +1794,7 @@ config PCI_MMCONFIG config DMAR bool "Support for DMA Remapping Devices (EXPERIMENTAL)" - depends on X86_64 && PCI_MSI && ACPI && EXPERIMENTAL + depen...
3199aa6bc8766e17b8f60820c4f78d59c25fce0e
Analyze and fix the following issue in the Linux kernel code: intel-iommu: fix PCI device detach from virtual machine
Problem Details: When assign a device behind conventional PCI bridge or PCIe to PCI/PCI-x bridge to a domain, it must assign its bridge and may also need to assign secondary interface to the same domain. Dependent assignment is already there, but dependent deassignment is missed when detach device from virtual machine...
```diff diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index a0ba568b831c..e541c3bdbf0d 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -2808,6 +2808,33 @@ static int vm_domain_add_dev_info(struct dmar_domain *domain, return 0; } +static void iommu_detach_dependent_dev...
1a81af4d1d9c60d4313309f937a1fc5567205a87
Analyze and fix the following issue in the Linux kernel code: Btrfs: make sure btrfs_update_delayed_ref doesn't increase ref_mod
Problem Details: btrfs_update_delayed_ref is optimized to add and remove different references in one pass through the delayed ref tree. It is a zero sum on the total number of refs on a given extent. But, the code was recording an extra ref in the head node. This never made it down to the disk but was used when deci...
```diff diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index 759fa247ced8..cbf7dc8ae3ec 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c @@ -450,8 +450,12 @@ static noinline int __btrfs_add_delayed_ref(struct btrfs_trans_handle *trans, * the head node stores the sum of all the mods, so ...
9f4f25c86ff2233dd98d4bd6968afb1ca66558a0
Analyze and fix the following issue in the Linux kernel code: x86: early_ioremap_init(), use __fix_to_virt(), because we are sure it's safe
Problem Details: Tetsuo Handa reported this link bug: | arch/x86/mm/built-in.o(.init.text+0x1831): In function `early_ioremap_init': | : undefined reference to `__this_fixmap_does_not_exist' | make: *** [.tmp_vmlinux1] Error 1 Commit:8827247ffcc9e880cbe4705655065cf011265157 used a variable (which would be optim...
```diff diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 83ed74affba9..0dfa09d69e80 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -516,7 +516,7 @@ void __init early_ioremap_init(void) printk(KERN_INFO "early_ioremap_init()\n"); for (i = 0; i < FIX_BTMAPS_SLOTS; i++) - slot_vi...
e63cedb656683739eea2696114bc56888e9bff05
Analyze and fix the following issue in the Linux kernel code: [ARM] collie: fix two minor formatting nits
Problem Details: Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index a911f44aa9fc..bbf2ebcc3066 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c @@ -146,7 +146,8 @@ static struct locomo_driver collie_uart_driver = { .remove = collie_uart_remove, }; -static int __in...
6dfdb0629019f307ab18864b1fd3e5dbb02f383c
Analyze and fix the following issue in the Linux kernel code: sched: Fix indentations in find_busiest_group() using gotos
Problem Details: Impact: cleanup Some indentations in find_busiest_group() can minimized by using early exits with the help of gotos. This improves readability in a couple of cases. Signed-off-by: Gautham R Shenoy <ego@in.ibm.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Suresh Siddha <suresh.b.siddha@in...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 6aec1e7a72a3..f87adbe999e0 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -3403,14 +3403,14 @@ find_busiest_group(struct sched_domain *sd, int this_cpu, * capacity but still has some space to pick up some load * from other group and save more power...
278aefc51bdbc7f1a3d39c9bd5313c78335b7828
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] Fix io.h & uaccess.h includes.
Problem Details: Fix following includes: * #include <asm/io.h> should be #include <linux/io.h> * #include <asm/uaccess.h> should be #include <linux/uaccess.h> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 0c14586f58d4..41070e4771a0 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c @@ -28,10 +28,9 @@ #include <linux/io.h> #include <linux/of.h> #include <linux/of_device.h> +#include <linux/uaccess.h> #include <asm/irq.h> -#...
d5c26a597782d4109869abbcc36983969f964864
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] struct file_operations should be const
Problem Details: Fix following warnings: WARNING: struct file_operations should normally be const Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
```diff diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index dad4fe6e20fc..7cf32ad96fd1 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -602,7 +602,7 @@ static long hpwdt_ioctl(struct file *file, unsigned int cmd, /* * Kernel interfaces */ -static struct file_operations hp...
9e058d4f57751daa008b764735f97fdfccfeab6c
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] orion5x_wdt: fix compile issue by providing tclk as platform data
Problem Details: The orion5x-wdt driver is now registered as a platform device and receives the tclk value as platform data. This fixes a compile issue cause by a previously removed define "ORION5X_TCLK". Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at> Acked-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Kr...
```diff diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 8a0e49d84256..1a1df24f419e 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c @@ -31,6 +31,7 @@ #include <plat/ehci-orion.h> #include <plat/mv_xor.h> #include <plat/orion_nand.h> +#include <plat/o...
7834cd5ae145c9a74d284cef073b96ee5f7f2295
Analyze and fix the following issue in the Linux kernel code: qeth: fix wait_event_timeout handling
Problem Details: wait_event_timeout just takes the numnber of jiffies to wait as an argument. That value does not include jiffies itself. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 1b7b08e791a1..6fec3cfcf978 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -1676,7 +1676,7 @@ int qeth_send_control_data(struct qeth_card *card, int len, int rc; unsigned long f...
23d12e2bdd4f73d90c8c29674c531aa45eecf27f
Analyze and fix the following issue in the Linux kernel code: rndis_wlan: Fix build with netdev_ops compat disabled.
Problem Details: Instead of storing a private ->set_multicast_list, just have a private netdev ops. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 82af21eeb592..db91db776508 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c @@ -2524,6 +2524,17 @@ static int bcm4320_early_init(struct usbnet *usbdev) return 0; } +/* same as rndi...
0706f1c48ca8a7ab478090b4e38f2e578ae2bfe0
Analyze and fix the following issue in the Linux kernel code: tracing: adding function timings to function profiler
Problem Details: If the function graph trace is enabled, the function profiler will use it to take the timing of the functions. cat /debug/tracing/trace_stat/functions Function Hit Time -------- --- ---- mwait_idle 12...
```diff diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 24dac448cdc9..a9ccd71fc922 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -33,7 +33,7 @@ #include <asm/ftrace.h> -#include "trace.h" +#include "trace_output.h" #include "trace_stat.h" #define FTRACE_WARN_ON(cond) \ @@...
b2f5e7cd3dee2ed721bf0675e1a1ddebb849aee6
Analyze and fix the following issue in the Linux kernel code: ipv6: Fix conflict resolutions during ipv6 binding
Problem Details: The ipv6 version of bind_conflict code calls ipv6_rcv_saddr_equal() which at times wrongly identified intersections between addresses. It particularly broke down under a few instances and caused erroneous bind conflicts. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. ...
```diff diff --git a/include/net/addrconf.h b/include/net/addrconf.h index c216de528b08..7b55ab215a64 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -88,8 +88,8 @@ extern int ipv6_dev_get_saddr(struct net *net, extern int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr, ...
000b344f4ca7828ee43940255c8bbb32e2c7dbec
Analyze and fix the following issue in the Linux kernel code: sata_mv: fix LED blinking for SoC+NCQ
Problem Details: For Marvell SoC chips, the HDD LED does not blink when there is disk I/O if NCQ is enabled. Add a quirk that enables blink mode for the LED while NCQ is enabled on any port of a SoC host controller. Normal LED function is restored when NCQ is not enabled on any port. The code to enable the blink mode ...
```diff diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 47184567248d..8a751054c8a1 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -251,6 +251,11 @@ enum { HC_IRQ_COAL_IO_THRESHOLD_OFS = 0x000c, HC_IRQ_COAL_TIME_THRESHOLD_OFS = 0x0010, + SOC_LED_CTRL_OFS = 0x2c, + SOC_LED_CTRL_B...
9223d01b2fdf638a73888ad73a1784fca3454c1e
Analyze and fix the following issue in the Linux kernel code: pata-rb532-cf: platform_get_irq() fix ignored failure
Problem Details: platform_get_irq() can return -ENXIO, but since 'irq' is an unsigned int, it does not show when the IRQ resource wasn't found. Make irq an int so that we can use a single variable to test the platform_get_irq() return value. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Phil Sutter <...
```diff diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index 2f3b49cc4970..8e3cdef8a25f 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c @@ -104,7 +104,7 @@ static void rb532_pata_setup_ports(struct ata_host *ah) static __devinit int rb532_pata_driver_probe(struct pl...
b2a034cf16a1642e647497c70c1cd9c09bf39412
Analyze and fix the following issue in the Linux kernel code: pata_efar: fix *dma_mask
Problem Details: According to Alan: >and yes the EFAR does UDMA66. mwdma: >Yep - wrong comment. The EFAR is a sort of clone of the PIIX and I >copied the comment while EFAR don't appear to have copied the >limitation Signed-off-by: Erik Inge Bolsø <knan-lkml@anduin.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index bd498cc3920e..2085e0a3a05a 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c @@ -252,8 +252,8 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) static const struct ata_port_info info = { ...
aef37d8d80d8c027f03d362a97afe3f6a42bfbb4
Analyze and fix the following issue in the Linux kernel code: pata_radisys: fix mwdma_mask to exclude mwdma0
Problem Details: As noted by Alan: >Your suspicions are correct here btw - the device can only do MWDMA1 and >MWDMA2 (much like some PIIX devices) Signed-off-by: Erik Inge Bolsø <knan-lkml@anduin.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c index 1956d5c03a7f..4401b332eaab 100644 --- a/drivers/ata/pata_radisys.c +++ b/drivers/ata/pata_radisys.c @@ -217,7 +217,7 @@ static int radisys_init_one (struct pci_dev *pdev, const struct pci_device_id *e static const struct ata_port_info ...
32cd11a61007511ddb38783deec8bb1aa6735789
Analyze and fix the following issue in the Linux kernel code: sata_mv: mv_fill_sg fixes v2
Problem Details: Fix mv_fill_sg() to zero out the reserved word (required for ATAPI), and to include a memory barrier. This may also help with problems reported by Jens on the PPC platform. Signed-off-by: Mark Lord <mlord@pobox.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 181f02127410..9c8ea2c1116d 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -1364,12 +1364,13 @@ static void mv_fill_sg(struct ata_queued_cmd *qc) u32 offset = addr & 0xffff; u32 len = sg_len; - if ((offset + sg_len > ...
e6e66b02e11563abdb7f69dcb7a2efbd8d577e77
Analyze and fix the following issue in the Linux kernel code: Dynamic debug: fix pr_fmt() build error
Problem Details: When CONFIG_DYNAMIC_DEBUG is enabled, allow callers of pr_debug() to provide their own definition of pr_fmt() even if that definition uses tricks like #define pr_fmt(fmt) "%s:" fmt, __func__ Signed-off-by: Greg Banks <gnb@sgi.com> Cc: Jason Baron <jbaron@redhat.com> Acked-by: Geert Uytterhoeven <Geer...
```diff diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 07781aaa1164..baabf33be244 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -57,7 +57,7 @@ extern int ddebug_remove_module(char *mod_name); { KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH, \...
9898abb3d23311fa227a7f46bf4e40fd2954057f
Analyze and fix the following issue in the Linux kernel code: Dynamic debug: allow simple quoting of words
Problem Details: Allow simple quoting of words in the dynamic debug control language. This allows more natural specification when using the control language to match against printk formats, e.g #echo -n 'format "Setting node for non-present cpu" +p' > /mnt/debugfs/dynamic_debug/control instead of #echo -n 'format ...
```diff diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt index 68394825e86b..674c5663d346 100644 --- a/Documentation/dynamic-debug-howto.txt +++ b/Documentation/dynamic-debug-howto.txt @@ -49,10 +49,10 @@ via: nullarbor:~ # cat <debugfs>/dynamic_debug/control # filename:lin...
86151fdf38b3795f292b39defbff39d2684b9c8c
Analyze and fix the following issue in the Linux kernel code: dynamic debug: update docs
Problem Details: updates the documentation for 'dynamic debug' feature. Signed-off-by: Greg Banks <gnb@sgi.com> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt new file mode 100644 index 000000000000..68394825e86b --- /dev/null +++ b/Documentation/dynamic-debug-howto.txt @@ -0,0 +1,232 @@ + +Introduction +============ + +This document describes how to use the dynamic debug (ddeb...
095160aee954688a9bad225952c4bee546541e19
Analyze and fix the following issue in the Linux kernel code: sysfs: fix some bin_vm_ops errors
Problem Details: Commit 86c9508eb1c0ce5aa07b5cf1d36b60c54efc3d7a "sysfs: don't block indefinitely for unmapped files" in linux-next crashes the PowerMac G5 when X starts up. It's caught out by the way powerpc's pci_mmap of legacy_mem uses shmem_zero_setup(), substituting a new vma->vm_file whose private_data no longer...
```diff diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c index 96cc2bf6a84e..07703d3ff4a1 100644 --- a/fs/sysfs/bin.c +++ b/fs/sysfs/bin.c @@ -241,9 +241,12 @@ static int bin_page_mkwrite(struct vm_area_struct *vma, struct page *page) struct sysfs_dirent *attr_sd = file->f_path.dentry->d_fsdata; int ret; - if (!bb->v...
669420644c79c207f83fdf9105ae782867e2991f
Analyze and fix the following issue in the Linux kernel code: sysfs: only allow one scheduled removal callback per kobj
Problem Details: The only way for a sysfs attribute to remove itself (without deadlock) is to use the sysfs_schedule_callback() interface. Vegard Nossum discovered that a poorly written sysfs ->store callback can repeatedly schedule remove callbacks on the same device over and over, e.g. $ while true ; do echo 1 > /...
```diff diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index 918e6fce2573..b91c1719b075 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c @@ -104,8 +104,9 @@ ccwgroup_ungroup_store(struct device *dev, struct device_attribute *attr, const rc = device_schedule_callback(d...
ffa6a7054d172a2f57248dff2de600ca795c5656
Analyze and fix the following issue in the Linux kernel code: Driver core: Fix device_move() vs. dpm list ordering, v2
Problem Details: dpm_list currently relies on the fact that child devices will be registered after their parents to get a correct suspend order. Using device_move() however destroys this assumption, as an already registered device may be moved under a newly registered one. This patch adds a new argument to device_move...
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index 95c67ffd71da..e73c92d13a23 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1561,8 +1561,10 @@ out: * device_move - moves a device to a new parent * @dev: the pointer to the struct device to be moved * @new_parent: the new parent o...
ce21c7bcd796fc4f45d48781b7e85f493cc55ee5
Analyze and fix the following issue in the Linux kernel code: driver core: fix passing platform_data
Problem Details: We will remove platform_data field from struct device until all platform devices pass its specific data from platfom_device and all platform drivers use platform specific data passed by platform_device->platform_data. This kind of conversion will need a long time, for thousands of files is affected. T...
```diff diff --git a/drivers/base/platform.c b/drivers/base/platform.c index c5ac81d22303..d2198f64ad4e 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -247,7 +247,20 @@ int platform_device_add(struct platform_device *pdev) else dev_set_name(&pdev->dev, pdev->name); - pdev->platform_data = ...
f48f3febb2cbfd0f2ecee7690835ba745c1034a4
Analyze and fix the following issue in the Linux kernel code: driver-core: do not register a driver with bus_type not registered
Problem Details: If the bus_type is not registerd, driver_register to that bus will cause oops. I found this bug when test built-in usb serial drivers (ie. aircable driver) with 'nousb' cmdline params. In this patch: 1. set the bus->p=NULL when bus_register failed and unregisterd. 2. if bus->p is NULL, driver_registe...
```diff diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 8547b780bb5a..11463c00451e 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -932,6 +932,7 @@ bus_uevent_fail: kset_unregister(&bus->p->subsys); kfree(bus->p); out: + bus->p = NULL; return retval; } EXPORT_SYMBOL_GPL(bus_register); @@...
e5779a583ddb9916b37cfbb916dc53ec2eaf0b9b
Analyze and fix the following issue in the Linux kernel code: scsi/m68k: Kill NCR_700_detect() warnings
Problem Details: The patch from Ming Lei <tom.leiming@gmail.com> entitled: platform driver: fix incorrect use of 'platform_bus_type' with 'struct devic introduced the following warnings on m68k, as `dev' is now a `struct platform_device *' instead of a `struct device *': | drivers/scsi/a4000t.c:64: warning: passin...
```diff diff --git a/drivers/scsi/a4000t.c b/drivers/scsi/a4000t.c index 6d25aca7b412..61af3d91ac8a 100644 --- a/drivers/scsi/a4000t.c +++ b/drivers/scsi/a4000t.c @@ -61,7 +61,8 @@ static int __devinit a4000t_probe(struct platform_device *dev) hostdata->dcntl_extra = EA_710; /* and register the chip */ - host = N...
6866ac9db02ac1ec71f2aa720a1019581f69a725
Analyze and fix the following issue in the Linux kernel code: USB: FHCI: use dev_name() in place of bus_id.
Problem Details: Replace references to bus_id with dev_name() to fix fhci driver build break. drivers/usb/host/fhci-hcd.c:586: error: struct device has no member named bus_id drivers/usb/host/fhci-hcd.c:653: error: struct device has no member named bus_id drivers/usb/host/fhci-dbg.c:111: error: struct device has no me...
```diff diff --git a/drivers/usb/host/fhci-dbg.c b/drivers/usb/host/fhci-dbg.c index 34e14edf390b..ea8a4255c5da 100644 --- a/drivers/usb/host/fhci-dbg.c +++ b/drivers/usb/host/fhci-dbg.c @@ -108,7 +108,7 @@ void fhci_dfs_create(struct fhci_hcd *fhci) { struct device *dev = fhci_to_hcd(fhci)->self.controller; - fhc...
54ca5412b5576fdb0a4ea4fedf6565bd6f34150c
Analyze and fix the following issue in the Linux kernel code: PS3: replace bus_id usage
Problem Details: These simple debug statments should be using dev_dbg() instead of accessing bus_id directly (or they should use device_name). As bus_id is going away, this patch is necessary. Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman...
```diff diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index 58311a867851..a705fffbb498 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c @@ -376,7 +376,7 @@ static int ps3_system_bus_probe(struct device *_dev) struct ps3...
de7927457a2e12d89f37b744fb258d2ae68cdb56
Analyze and fix the following issue in the Linux kernel code: macb: fix warning "warning: unused variable `dev' "
Problem Details: Removed unused variable dev Signed-off-by: vibi sreenivasan <vibi_sreenivasan@cms.com> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 872c1bdf42bd..f50501013b1c 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -513,7 +513,6 @@ static int macb_rx(struct macb *bp, int budget) static int macb_poll(struct napi_struct *napi, int budget) { struct macb *bp = container_of(napi,...
4c24b6d045a9d355c95ca4e6beb10ce2fd263390
Analyze and fix the following issue in the Linux kernel code: USB: pxa27x_udc: typo fixes and code cleanups
Problem Details: This patch is a merge of patches : - fix function doc and debug - cleanup loop count - optimize code to remove local variable and extra check - init 'req' before use - add missing iounmap call [dbrownell@users.sourceforge.net: capitalize IN/OUT directions in doc] Signed-off-by: Vernon Sauder <vs...
```diff diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 91ba1e939475..8cc676ecbb23 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -748,13 +748,13 @@ static void req_done(struct pxa_ep *ep, struct pxa27x_request *req, int status) } /** - * e...
e1e609be49c9d345e8b67a122a7cdae48ad27c7e
Analyze and fix the following issue in the Linux kernel code: USB: r8a66597-hcd: suspend/resume support
Problem Details: Fix the problem that system cannot suspend. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index 713f4cf0b0dd..f1626e58c141 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -1013,6 +1013,9 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port, r8a66597_write(r8a66...
d2ad67b3fa61eed52b22491210c668a94c7bf17e
Analyze and fix the following issue in the Linux kernel code: USB: Fix cp2101 USB serial device driver termios functions for console use
Problem Details: This is really a follow up to the modifications Alan Cox made for commit 95da310e66ee8090119596c70ca8432e57f9a97f to pass a tty_struct to various interface functions, which broke the serial configuration (termios) functions when the device is being used as a console. These changes restore the configura...
```diff diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 292f0163b92c..e8d5133ce9c8 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -38,17 +38,21 @@ static int cp2101_open(struct tty_struct *, struct usb_serial_port *, static void cp2101_cleanup(struct usb_seri...
a9f8ec4db1d308643e13ec7638ccb5ace4d34982
Analyze and fix the following issue in the Linux kernel code: USB: host: fix sparse warning: Using plain integer as NULL pointer
Problem Details: Fix this sparse warning:  drivers/usb/host/oxu210hp-hcd.c:2687:42: warning: Using plain integer as NULL pointer Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index 2947c69b3476..5ac489ee3dab 100644 --- a/drivers/usb/host/oxu210hp-hcd.c +++ b/drivers/usb/host/oxu210hp-hcd.c @@ -2684,7 +2684,7 @@ static int oxu_reset(struct usb_hcd *hcd) oxu->urb_len = 0; /* FIMXE */ - hcd->self.contr...
2dfa319a649b9de029777994b6af201c1fe81d53
Analyze and fix the following issue in the Linux kernel code: USB: ohci-s3c2410: fix name of bus clock
Problem Details: The USB bus clock is usb-bus-host, so print the correct name in the dev_err() statement if we cannot find it. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Acked-by: David Brownell <dbrownell@users.sourceforge.net>
```diff diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index 0e62d2044f7e..a7ddd5d14a51 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c @@ -371,7 +371,7 @@ static int usb_hcd_s3c2410_probe (const struct hc_driver *driver, usb_clk = clk_get(&dev->dev...
1ded7ea47b8829a06068c3bb5e3ebe471076617a
Analyze and fix the following issue in the Linux kernel code: USB: ch341 serial: fix port number changed after resume
Problem Details: This patch fixes the following bug: .plug ch341 usb serial port into a hub port; .ch341 driver bound to the device and /dev/ttyUSB0 comes .open /dev/ttyUSB0 by minicom and we can use the serial successfully .suspend the ch341 usb serial device(such as: echo suspend > power/level) .resume the ch341...
```diff diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index d5ea679e1698..ab4cc277aa65 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c @@ -529,12 +529,34 @@ static int ch341_tiocmget(struct tty_struct *tty, struct file *file) return result; } + +static int ch341_rese...
322337168f22e8245aae7f38e84c5711cd4c1265
Analyze and fix the following issue in the Linux kernel code: USB: musb: fix init oops crash with static FIFO config
Problem Details: Correct musb_read_fifosize() and musb_configure_ep0() functions for the #ifndef BLACKFIN branch when the silicon uses static FIFO configuration. (Most current silicon configures this controller to use dynamic FIFO configuration; some parts from ST don't, like the STM STA2062.) Signed-off-by: Giuseppe...
```diff diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index adf1806007ff..efb39b5e55b5 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -478,10 +478,11 @@ static inline void musb_configure_ep0(struct musb *musb) static inline int musb_read_fifosize(struct musb ...
1e0320f0d46022d12ddc84516cbdb8865e8cd744
Analyze and fix the following issue in the Linux kernel code: USB: musb: NAK timeout scheme on bulk RX endpoint
Problem Details: Fixes endpoint starvation issue when more than one bulk QH is multiplexed on the reserved bulk RX endpoint, which is normal for cases like serial and ethernet adapters. This patch sets the NAK timeout interval for such QHs, and when a timeout triggers the next QH will be scheduled. (This resembles th...
```diff diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 9489c8598686..499c431a6d62 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -64,11 +64,8 @@ * * - DMA (Mentor/OMAP) ...has at least toggle update problems * - * - Still no traffic scheduling code ...
5d67a851bca63d30cde0474bfc4fc4f03db1a1b8
Analyze and fix the following issue in the Linux kernel code: USB: musb: rewrite host periodic endpoint allocation
Problem Details: The current MUSB host code doesn't make use of all the available FIFOs in for periodic transfers since it wrongly assumes the RX and TX sides of any given hw_ep always share one FIFO. Change: use 'in_qh' and 'out_qh' fields of the 'struct musb_hw_ep' to check the endpoint's business; get rid of the n...
```diff diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index 630946a2d9fc..adf1806007ff 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h @@ -331,7 +331,6 @@ struct musb { struct list_head control; /* of musb_qh */ struct list_head in_bulk; /* of musb_qh */ str...
b2bdf3a789162aa6ff9c6f139bee9cc7954bc5b4
Analyze and fix the following issue in the Linux kernel code: USB: composite: avoid inconsistent lock state
Problem Details: Avoid the following INFO from lock debugging: [ 369.126112] ================================= [ 369.132063] [ INFO: inconsistent lock state ] [ 369.136457] 2.6.28-maemo1 #1 [ 369.139387] --------------------------------- [ 369.143782] inconsistent {hardirq-on-W} -> {in-hardirq-W} usage. [ 369.14...
```diff diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 5d11c291f1ad..40f1da77a006 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -149,16 +149,17 @@ done: int usb_function_deactivate(struct usb_function *function) { struct usb_composite_dev *cd...
e4abe6658aa17a5d7e7321dfda807d287255511b
Analyze and fix the following issue in the Linux kernel code: usb-serial: fix usb_serial_register bug when boot with nousb param
Problem Details: With "nousb" cmdline booting, built-in serial drivers (ie. airecable) will trigger kernel oops. Indeed, if nousb, usb_serial_init will failed, and the usb serial bus type will not be registerd, then usb_serial_register call driver_register which try to register the driver to a not registered bus. Her...
```diff diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 73172898ccb3..742a5bc44be8 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -1241,6 +1241,9 @@ int usb_serial_register(struct usb_serial_driver *driver) /* must be called with BKL held */ ...
d0626808f7a6181c1c750d261da9a7a845c29e13
Analyze and fix the following issue in the Linux kernel code: USB: fix ehci printk formats
Problem Details: Fix ehci printk formats: drivers/usb/host/ehci-q.c:351: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' drivers/usb/host/ehci-q.c:351: warning: format '%d' expects type 'int', but argument 5 has type 'size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-b...
```diff diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c index 01132ac74eb8..1976b1b3778c 100644 --- a/drivers/usb/host/ehci-q.c +++ b/drivers/usb/host/ehci-q.c @@ -349,7 +349,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) --qh->xacterrs > 0 && !urb->unlinked) { eh...
1f4159c1620f74377e26d8a569d10ca5907ef475
Analyze and fix the following issue in the Linux kernel code: USB: fix USB_STORAGE_CYPRESS_ATACB
Problem Details: commit 64a87b24: [SCSI] Let scsi_cmnd->cmnd use request->cmd buffer changed the scsi_eh_prep_cmnd logic by making it clear the ->cmnd buffer. But the sat to cypress atacb translation supposed the ->cmnd buffer wasn't modified. This patch makes it set the ->cmnd buffer after scsi_eh_prep_cmnd call. The...
```diff diff --git a/drivers/usb/storage/cypress_atacb.c b/drivers/usb/storage/cypress_atacb.c index 898e67d30e56..9466a99baab6 100644 --- a/drivers/usb/storage/cypress_atacb.c +++ b/drivers/usb/storage/cypress_atacb.c @@ -133,19 +133,18 @@ void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) ...
d55c0ae6b243bb8e247259089b3a2e47ebfabdf6
Analyze and fix the following issue in the Linux kernel code: USB: serial generic resume function fix
Problem Details: This removes an unnecessary check for autoresume from the generic resume method. The check has been obsoleted by the now delayed increase of the usage counter which makes the error this check prevented impossible. This change allows drivers which only use the bulk read URB the use of the generic method...
```diff diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 814909f1ee63..c4a47abfee68 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -177,14 +177,6 @@ int usb_serial_generic_resume(struct usb_serial *serial) struct usb_serial_port *port; int i, c = 0, r; ...
6e14bda1b18b2e3c16258427fc43ceb43e1bc1d5
Analyze and fix the following issue in the Linux kernel code: USB: count reaches -1, tested 0
Problem Details: With a postfix decrement count will reach -1 rather than 0, so the warning will not be issued. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 75b69847918e..033c2846ce59 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -234,7 +234,7 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev) */ hcc_params = readl(base + EHCI...
b633d28e2c5fbe1c8d163892644f57df04aa1421
Analyze and fix the following issue in the Linux kernel code: USB: imx_udc: Fix IMX UDC gadget general irq handling
Problem Details: Workaround of hw bug in IMX UDC. This bug causes wrong handling of CFG_CHG interrupt. Workaround is documented inline source code. Signed-off-by: Darius Augulis <augulis.darius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index e590464c3a50..8d3c6a960988 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c @@ -28,6 +28,7 @@ #include <linux/dma-mapping.h> #include <linux/clk.h> #include <linux/delay.h> +#include <linux/timer.h> ...
d24921a36df31332c32e1bb539671284d9e36bfa
Analyze and fix the following issue in the Linux kernel code: USB: imx_udc: Fix IMX UDC gadget ep0 irq handling
Problem Details: Fix ep0 interrupt handling in IMX UDC Gadget. Signed-off-by: Darius Augulis <augulis.darius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index 3ee5bd8bea70..e590464c3a50 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c @@ -1133,6 +1133,7 @@ end_irq: static irqreturn_t imx_udc_ctrl_irq(int irq, void *dev) { struct imx_udc_struct *imx_usb = dev...
593bef6c75e11d2edb5396bd9775cf49a4cda659
Analyze and fix the following issue in the Linux kernel code: USB: imx_udc: Fix IMX UDC gadget code style
Problem Details: Fix code style errors in IMX UDC Gadget. Signed-off-by: Darius Augulis <augulis.darius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index 9e3fe306301d..3ee5bd8bea70 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c @@ -1,7 +1,7 @@ /* * driver/usb/gadget/imx_udc.c * - * Copyright (C) 2005 Mike Lee(eemike@gmail.com) + * Copyright (C) 2005 ...
8f182e5ddc84a30d7014a753ae359d85b1238e7f
Analyze and fix the following issue in the Linux kernel code: USB: imx_udc: Fix IMX UDC gadget bugs
Problem Details: Fix small bugs and add some omptimization in IMX UDC Gadget. Signed-off-by: Darius Augulis <augulis.darius@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/usb/gadget/imx_udc.c b/drivers/usb/gadget/imx_udc.c index 77c5d0a8a06e..9e3fe306301d 100644 --- a/drivers/usb/gadget/imx_udc.c +++ b/drivers/usb/gadget/imx_udc.c @@ -283,7 +283,7 @@ void imx_ep_stall(struct imx_ep_struct *imx_ep) imx_flush(imx_ep); /* Special care for ep0 */ - if (EP_...
00185a60c37549531b9eee562d3eba19020875d5
Analyze and fix the following issue in the Linux kernel code: USB: Remove redundant test in pxa27x_udc and ftdi_sio
Problem Details: priv is checked not to be NULL near the beginning of the function and not changed subsequently, making the test redundant. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; p...
```diff diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index e50419d08996..91ba1e939475 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -279,7 +279,7 @@ static void pxa_init_debugfs(struct pxa_udc *udc) goto err_queues; eps = debugfs_create_file...
eb50702539f9be3765127d927d3e9ccfeb65f26e
Analyze and fix the following issue in the Linux kernel code: USB: pxa27x_udc: factor pullup code to prepare otg transceiver
Problem Details: Prepare pxa27x_udc to handle usb D+ pullup properly : it should connect the pullup resistor and disconnect it only if no external transceiver is handling it. [ dbrownell@users.sourceforge.net: kerneldoc and gpio fixes ] Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: David Brown...
```diff diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 990f40f988d4..f8145590944f 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -30,6 +30,7 @@ #include <linux/proc_fs.h> #include <linux/clk.h> #include <linux/irq.h> +#include <linux/gpio.h...
dd44be6b17ac52238aa6c7f46b906d9fb76e7052
Analyze and fix the following issue in the Linux kernel code: usblp: continuously poll for status
Problem Details: The usblp in 2.6.18 polled for status regardless if we actually needed it. At some point I dropped it, to save the batteries if nothing else. As it turned out, printers exist (e.g. Canon BJC-3000) that need prodding this way or else they stop. This patch restores the old behaviour. If you want to save ...
```diff diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c index 3f3ee1351930..d2747a49b974 100644 --- a/drivers/usb/class/usblp.c +++ b/drivers/usb/class/usblp.c @@ -880,16 +880,19 @@ static int usblp_wwait(struct usblp *usblp, int nonblock) if (rc <= 0) break; - if (usblp->flags & LP_ABORT) ...
5c16034d73da2c1b663aa25dedadbc533b3d811c
Analyze and fix the following issue in the Linux kernel code: USB: usb-storage: increase max_sectors for tape drives
Problem Details: This patch (as1203) increases the max_sector limit for USB tape drives. By default usb-storage sets max_sectors to 240 (i.e., 120 KB) for all devices. But tape drives need a higher limit, since tapes can and do have very large block sizes. Without the ability to transfer an entire large block in a s...
```diff diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 727c506417cc..ed710bcdaab2 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -135,6 +135,12 @@ static int slave_configure(struct scsi_device *sdev) if (sdev->request_queue->max_sectors > max_s...
090b90118207e786d2990310d063fda5d52cce6e
Analyze and fix the following issue in the Linux kernel code: USB: gadget: fix rndis regression
Problem Details: Restore some code that was wrongly dropped from the RNDIS driver, and caused interop problems observed with OpenMoko. The issue is with hardware which needs help conforming to part of the USB 2.0 spec (section 8.5.3.2); some can automagically send a ZLP in response to an unexpected IN, but not all chi...
```diff diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 3a8bb53fc473..fd7b356f902d 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c @@ -437,7 +437,7 @@ invalid: DBG(cdev, "rndis req%02x.%02x v%04x i%04x l%d\n", ctrl->bRequestType, ctrl->bRequest, w_v...
803c78e4da28d7d7cb0642caf643b9289ae7838a
Analyze and fix the following issue in the Linux kernel code: [ARM] twl4030 - leak fix
Problem Details: Trivial error path leak fix. Problem found by Daniel Marjamäki using cppcheck Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c index 437f52073f6e..e1dadf7344a1 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.c +++ b/arch/arm/mach-omap2/mmc-twl4030.c @@ -397,6 +397,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) break; defaul...
b23c7a427e4b3764ad686a46de89ab652811c50a
Analyze and fix the following issue in the Linux kernel code: [ARM] fix leak in iop13xx/pci
Problem Details: Another leak found by Daniel Marjamäki Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 673b0db22034..4873f26a42e1 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c @@ -1026,8 +1026,10 @@ int iop13xx_pci_setup(int nr, struct pci_sys_data *sys) which_atu = 0; } - if (!which_atu) + if (!which...
ecbf61e7357d5c7047c813edd6983902d158688c
Analyze and fix the following issue in the Linux kernel code: [ARM] cumana: Fix a long standing bogon
Problem Details: Should be using strncmp as the data from user space may be unterminated (Bug #8004) Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c index 68a64123af8f..ed502b7412d6 100644 --- a/drivers/scsi/arm/cumana_2.c +++ b/drivers/scsi/arm/cumana_2.c @@ -318,7 +318,7 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length) { int ret = length; - if (lengt...
b9d2fceecb6afd9dead4fd2488a543b302a3272e
Analyze and fix the following issue in the Linux kernel code: claw: fix minor findings from code analysis tool
Problem Details: This patch fixes two problems in the claw driver identified by static code analysis: o Change in case differentiation of received sense codes o Use correct data length in claw hard_start_xmit routine Signed-off-by: Andrew H. Richter <richtera@us.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ib...
```diff diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index a4524ecd9dc4..30a43cc79e76 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c @@ -1033,7 +1033,7 @@ static int pages_to_order_of_mag(int num_of_pages) { int order_of_mag=1; /* assume 2 pages */ - int nump=2; + int nump; ...
e2fc8cb4fedf57a63c05cd1e0f6e4f0e0238614a
Analyze and fix the following issue in the Linux kernel code: ctcm: fix minor findings from code analysis tool
Problem Details: From: Ursula Braun <ursula.braun@de.ibm.com> This patch fixes problems in the ctcm driver identified by static code analysis: o remove an unnecessary always true condition in ctcm_unpack_skb o remove duplicate assignment in ctc_mpc_alloc_channel o remove an unnecessary always true condition in ctcmpc_...
```diff diff --git a/drivers/s390/net/ctcm_main.c b/drivers/s390/net/ctcm_main.c index a7a25383db76..77f4033a0f4f 100644 --- a/drivers/s390/net/ctcm_main.c +++ b/drivers/s390/net/ctcm_main.c @@ -168,11 +168,9 @@ void ctcm_unpack_skb(struct channel *ch, struct sk_buff *pskb) if (len > 0) { skb_pull(pskb, header->...
2f40c9b0b65b5635e2e13dfa068bd56fe7a8ff98
Analyze and fix the following issue in the Linux kernel code: ide: fix kmalloc() failure handling in ide_driveid_update()
Problem Details: * Doing kmalloc() in the middle of command execution is not only ugly but leaves drive waiting to send data on kmalloc() failure. Fix it. While at it: * Unify error code paths. * Fixup error message to be more useful and add missing KERN_ERR level. * Rename 'stat' variable to 's'. Signed-off-by...
```diff diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index e0cfa2d2acc7..a955483d2404 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -293,7 +293,12 @@ int ide_driveid_update(ide_drive_t *drive) const struct ide_tp_ops *tp_ops = hwif->tp_ops; u16 *id; unsigned long flags; - u8 ...
2ed0ef543ae3f3ea4f8bd0433fb1fed22625a309
Analyze and fix the following issue in the Linux kernel code: ide: fix ->init_chipset method to return 'int' value
Problem Details: * Return 0 instead of dev->irq in ->init_chipset implementations. * Fix ->init_chipset method to return 'int' value instead of 'unsigned int' one. This fixes ->init_chipset handling for host drivers (cs5530, hpt366 and pdc202xx_new) for which it is possible for this method to fail. Signed-off-by: ...
```diff diff --git a/drivers/ide/aec62xx.c b/drivers/ide/aec62xx.c index 4485b9c6f0e6..878f8ec6dbe1 100644 --- a/drivers/ide/aec62xx.c +++ b/drivers/ide/aec62xx.c @@ -139,7 +139,7 @@ static void aec_set_pio_mode(ide_drive_t *drive, const u8 pio) drive->hwif->port_ops->set_dma_mode(drive, pio + XFER_PIO_0); } -stat...
973d9e743979d4d3f06d8071c22187b2bdc0ef24
Analyze and fix the following issue in the Linux kernel code: ns87415: use pci_get_legacy_ide_irq()
Problem Details: Fix ->init_hwif to use pci_get_legacy_ide_irq() instead of __ide_default_irq(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ns87415.c b/drivers/ide/ns87415.c index 83643ed9a426..56042a36d635 100644 --- a/drivers/ide/ns87415.c +++ b/drivers/ide/ns87415.c @@ -286,7 +286,7 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) } if (!using_inta) - hwif->irq = __ide_default_irq(hwif->io_ports.data_...
213e4b0a3483b8cc99c4578923b9899e84e086e0
Analyze and fix the following issue in the Linux kernel code: amd74xx: use ide_pci_is_in_compatibility_mode()
Problem Details: Fix ->init_hwif to check if IDE PCI controller is in compatibility mode instead of checking for hwif->irq == 0. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/amd74xx.c b/drivers/ide/amd74xx.c index 77267c859965..0caecad1998b 100644 --- a/drivers/ide/amd74xx.c +++ b/drivers/ide/amd74xx.c @@ -187,7 +187,7 @@ static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif) { struct pci_dev *dev = to_pci_dev(hwif->dev); - if (hwif->irq == 0) /* 0 ...
122f06f8bce406169d61242a3eb667027e27cca7
Analyze and fix the following issue in the Linux kernel code: ide: checkpatch.pl fixes for ide-iops.c
Problem Details: Fix following checkpatch.pl warnings/errors: - WARNING: space prohibited between function name and open parenthesis '(' - WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable - WARNING: line over 80 characters - ERROR: trailing whitespace - ERROR: space required before the open ...
```diff diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 73ff16bf9f1c..cf6c3036ae7f 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -27,7 +27,7 @@ #include <asm/uaccess.h> #include <asm/io.h> -void SELECT_DRIVE (ide_drive_t *drive) +void SELECT_DRIVE(ide_drive_t *drive) { id...
ee1b1cc974816b59af2ba0be1912e1c2a200ae11
Analyze and fix the following issue in the Linux kernel code: ide: fix comments in ide_config_drive_speed()
Problem Details: Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index aad0d52ff1e7..73ff16bf9f1c 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -369,18 +369,15 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed) * but for some reason these don't work at * this point (lost interru...
4d7bb471ce0283f586817abea81254b67598aae6
Analyze and fix the following issue in the Linux kernel code: ide: fix printk() levels in [atapi_]reset_pollfunc()
Problem Details: Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 91a49b543bd5..aad0d52ff1e7 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -549,7 +549,7 @@ static ide_startstop_t atapi_reset_pollfunc (ide_drive_t *drive) stat = hwif->tp_ops->read_status(hwif); if (OK_STAT(stat, 0, A...
1f5892a5d21c905b1614cbd6bd8c5ad2cfbc106f
Analyze and fix the following issue in the Linux kernel code: ide-acpi: cleanup do_drive_set_taskfiles()
Problem Details: * ide_noacpi is already checked by ide_acpi_exec_tfs() which is the only user of do_drive_set_taskfiles(). * ide_acpi_exec_tfs() prints sufficient debug info about the device so no need to do it again. * do_drive_get_GTF() + ide_acpi_exec_tfs() make sure that this function will never be called ...
```diff diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index 6b3123612f1c..ce5b213e2bc2 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c @@ -334,32 +334,14 @@ static int do_drive_set_taskfiles(ide_drive_t *drive, unsigned int gtf_length, unsigned long gtf_address) { - int ...
2f0d0fd2a605666d38e290c5c0d2907484352dc4
Analyze and fix the following issue in the Linux kernel code: ide-acpi: cleanup do_drive_get_GTF()
Problem Details: * ide_noacpi is already checked by ide_acpi_exec_tfs() which is the only user of do_drive_get_GTF(). * ide_acpi_exec_tfs() prints sufficient debug info about the device so no need to have excessive data about port/host. * It is sufficient to check for drive->acpidata->obj_handle as it will be N...
```diff diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index ba5932d7b1bb..6b3123612f1c 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c @@ -219,39 +219,12 @@ static int do_drive_get_GTF(ide_drive_t *drive, acpi_status status; struct acpi_buffer output; union acpi_object *out_ob...
7610c4f5efc495d8e15ef608c4a66932f895379a
Analyze and fix the following issue in the Linux kernel code: ide: fix IDE_DFLAG_NO_IO_32BIT handling
Problem Details: * IDE_DFLAG_NO_IO_32BIT may be set by cmd640's ->init_dev method so don't clear it in ide_port_tune_devices() (+ no need to do it). * Move IDE_DFLAG_NO_IO_32BIT handling to ide_port_init_devices(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index ee8e3e7cad51..97ea5328c8e9 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -848,13 +848,6 @@ static void ide_port_tune_devices(ide_hwif_t *hwif) ide_set_dma(drive); } } - - ide_port_for_each_dev(i, drive, hwif) ...
67aa0f767af488a7f1e41cccb4f7a4893f24a1ab
Analyze and fix the following issue in the Linux kernel code: sched: remove unused fields from struct rq
Problem Details: Impact: cleanup, new schedstat ABI Since they are used on in statistics and are always set to zero, the following fields from struct rq have been removed: yld_exp_empty, yld_act_empty and yld_both_empty. Both Sched Debug and SCHEDSTAT_VERSION versions has also been incremented since ABIs have been ch...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index d2dfe4c1a225..7b389c74f8ff 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -638,9 +638,6 @@ struct rq { /* could above be rq->cfs_rq.exec_clock + rq->rt_rq.rt_runtime ? */ /* sys_sched_yield() stats */ - unsigned int yld_exp_empty; - unsigned int yld_...
0a5d649018b151cb9331c213a843ac4a3e7e44ab
Analyze and fix the following issue in the Linux kernel code: tracing: Documentation / sample code fixes for tracepoints
Problem Details: Fix the tracepoint documentation to refer to "tracepoint-sample" instead of "tracepoint-example" to match what actually exists; fix the directory, and clarify how to compile. Change every instance of "example" in the sample tracepoint code to "sample" for consistency. Signed-off-by: Jody McIntyre <sc...
```diff diff --git a/Documentation/tracepoints.txt b/Documentation/tracepoints.txt index 4ff43c6de299..c0e1ceed75a4 100644 --- a/Documentation/tracepoints.txt +++ b/Documentation/tracepoints.txt @@ -103,13 +103,14 @@ used to export the defined tracepoints. * Probe / tracepoint example -See the example provided in ...
fa74c9073370e57fa28e02aff13f4d7b1806505c
Analyze and fix the following issue in the Linux kernel code: x86: fix set_extra_move_desc calling
Problem Details: Impact: fix bug with irq-descriptor moving when logical flat Rusty observed: > The effect of setting desc->affinity (ie. from userspace via sysfs) has varied > over time. In 2.6.27, the 32-bit code anded the value with cpu_online_map, > and both 32 and 64-bit did that anding whenever a cpu was unplu...
```diff diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 86827d85488a..1ed6c0600cde 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -592,8 +592,9 @@ set_desc_affinity(struct irq_desc *desc, const struct cpumask *mask) if (assign_irq_vector(irq, cfg...
8dd1d0471bcf634f2cd6a6cf4b6531bb61f0af47
Analyze and fix the following issue in the Linux kernel code: netfilter: trivial Kconfig spelling fixes
Problem Details: Supplements commit 67c0d57930ff9a24c6c34abee1b01f7716a9b0e2. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/netfilter/Kconfig b/net/ipv6/netfilter/Kconfig index 625353a5fe18..29d643bcafa4 100644 --- a/net/ipv6/netfilter/Kconfig +++ b/net/ipv6/netfilter/Kconfig @@ -101,7 +101,7 @@ config IP6_NF_MATCH_HL ---help--- This is a backwards-compat option for the user's convenience (e.g. when runni...
32ab83a56fdf42f543b86c349143c2a86ead9707
Analyze and fix the following issue in the Linux kernel code: atmel-mci: fix sdc_reg typo
Problem Details: This fixes a bug when setting the sdc_reg for 4-bit bus width transactions. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index e94e92001e7c..cf6a100bb38f 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -812,7 +812,7 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) slot->sdc_reg |= MCI_SDCBUS_1BIT; ...
4240ff0a02cb52f7d10dc1df6d82ba9c27dba07b
Analyze and fix the following issue in the Linux kernel code: sdhci: Add get_{max,timeout}_clock callbacks
Problem Details: Some controllers do not provide clock information in their capabilities (in the Samsung case, it is because there are multiple clock sources available to the controller). Add hooks to allow the system to supply clock information. p.s. In the original Ben's patch there was a bug that makes sdhci_add_ho...
```diff diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index c814220d214e..34ab77bd12ae 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1674,19 +1674,27 @@ int sdhci_add_host(struct sdhci_host *host) host->max_clk = (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHI...
f3e2f1dd3bbe9352654eec8223495d35e1f52af2
Analyze and fix the following issue in the Linux kernel code: omap_hsmmc: Fix MMC3 dma
Problem Details: Data transfers on third OMAP3 MMC controller don't work because DMA line numbers are only defined for MMC1 and MMC2. Fix that and store line numbers in mmc_omap_host structure to reduce code size. Tested on OMAP3 pandora board. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Pierre...
```diff diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 283265154944..61883093e25b 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -100,6 +100,7 @@ */ #define OMAP_MMC1_DEVID 0 #define OMAP_MMC2_DEVID 1 +#define OMAP_MMC3_DEVID 2 #define MMC_T...
e68fdabc0d27f25428d53d43caae8bc79ed63d32
Analyze and fix the following issue in the Linux kernel code: omap_hsmmc: Do not prefix slot name
Problem Details: Allow slot_name to be the same as the other OMAP driver, by removing the redundant "slot:" prefix. Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index f3e4e0fd6655..7a9ca4f22405 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -216,7 +216,7 @@ mmc_omap_show_slot_name(struct device *dev, struct device_attribute *attr, struct mmc_omap_host *host =...
4a694dc915c9a223044ce21fc0d99e63facd1d64
Analyze and fix the following issue in the Linux kernel code: omap_hsmmc: Fix response type for busy after response
Problem Details: Some MMC commands result in the card becoming busy after the response is received. This needs to be specified for the omap_hsmmc host controller, which is what this patch does. However, the effect is that some commands with no data will cause a Transfer Complete (TC) interrupt in addition to the Comm...
```diff diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 5ff2ca22beea..1f84bd4a3b27 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -150,6 +150,7 @@ struct mmc_omap_host { int initstr; int slot_id; int dbclk_enabled; + int response_busy; ...
4cb32906e47987fee3fbfd79145d2348a2e8c5f3
Analyze and fix the following issue in the Linux kernel code: MMC: tmio_mmc.h: fix build problem
Problem Details: drivers/mmc/host/tmio_mmc.h: In function 'tmio_mmc_kmap_atomic': drivers/mmc/host/tmio_mmc.h:147: error: implicit declaration of function 'kmap_atomic' drivers/mmc/host/tmio_mmc.h:147: error: 'KM_BIO_SRC_IRQ' undeclared (first use in this function) drivers/mmc/host/tmio_mmc.h: In function 'tmio_mmc_kun...
```diff diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index ba2b4240a86a..9c831ab2ece6 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h @@ -8,6 +8,9 @@ * published by the Free Software Foundation. * */ + +#include <linux/highmem.h> + #define CNF_CMD 0x04 #d...
bedcc45c2e5d72b1c4b087b725c391441a93eee6
Analyze and fix the following issue in the Linux kernel code: tmio_mmc: Fix use after free in remove()
Problem Details: Update the tmio_mmc code to call mmc_free_host() when done using the private data. Without this fix the driver frees memory and then keeps on using it as private data. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Pierre Ossman <drzeus@drzeus....
```diff diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index 4f3e265d0203..63fbd5b7d312 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -650,10 +650,10 @@ static int __devexit tmio_mmc_remove(struct platform_device *dev) if (mmc) { struct tmio_mmc_host *host = ...
bc6772a023ceab8df404b18b31c27f764dcf5b3f
Analyze and fix the following issue in the Linux kernel code: tmio_mmc: Fix one off, use resource_size() in probe()
Problem Details: Update the tmio_mmc code to use resource_size(). With this patch applied the correct resource size is passed to ioremap(). Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
```diff diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index 6a7a61904833..4f3e265d0203 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -568,11 +568,11 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev) host->mmc = mmc; platform_set_drvdata(dev,...
1b331e69a2313f6e857890c7c2c40e3e2a74367a
Analyze and fix the following issue in the Linux kernel code: omap_hsmmc: Initialize hsmmc controller registers when resuming
Problem Details: Most registers lose its state when the processor wakes up from sleep state. Thus registers should be initialized, when the processor wakes up. However the current hsmmc 'resume' function doesn't consider this issue and finally makes deadlock. So this patch fixes this problem. Signed-off-by: Kim Kyuwon...
```diff diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 303a7970806d..576bfa7216b3 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -56,6 +56,7 @@ #define SDVS18 (0x5 << 9) #define SDVS30 (0x6 << 9) #define SDVS33 (0x7 << 9) +#define SDVS_MASK ...
12fcfd22fe5bf4fe74710232098bc101af497995
Analyze and fix the following issue in the Linux kernel code: Btrfs: tree logging unlink/rename fixes
Problem Details: The tree logging code allows individual files or directories to be logged without including operations on other files and directories in the FS. It tries to commit the minimal set of changes to disk in order to fsync the single file or directory that was sent to fsync or O_SYNC. The tree logging code ...
```diff diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h index 72677ce2b74f..3af4cfb5654c 100644 --- a/fs/btrfs/btrfs_inode.h +++ b/fs/btrfs/btrfs_inode.h @@ -86,12 +86,6 @@ struct btrfs_inode { */ u64 logged_trans; - /* - * trans that last made a change that should be fully fsync'd. This - * gets...
b7ec40d7845bffca8bb3af2ea3f192d6257bbe21
Analyze and fix the following issue in the Linux kernel code: Btrfs: reduce stalls during transaction commit
Problem Details: To avoid deadlocks and reduce latencies during some critical operations, some transaction writers are allowed to jump into the running transaction and make it run a little longer, while others sit around and wait for the commit to finish. This is a bit unfair, especially when the callers that jump in ...
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 3b8b6c212701..a421c32c6cfe 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3797,7 +3797,8 @@ int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root break; if (wret < 0) ret = wret; - if (tran...
40cf65d149053889c8876c6c2b4ce204fde55baa
Analyze and fix the following issue in the Linux kernel code: DVB: firedtv: fix printk format mismatch
Problem Details: Eliminate drivers/media/dvb/firewire/firedtv-avc.c: In function 'debug_fcp': drivers/media/dvb/firewire/firedtv-avc.c:156: warning: format '%d' expects type 'int', but argument 5 has type 'size_t' Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berli...
```diff diff --git a/drivers/media/dvb/firewire/firedtv-avc.c b/drivers/media/dvb/firewire/firedtv-avc.c index b55d9ccaf33e..1a300f00e0f5 100644 --- a/drivers/media/dvb/firewire/firedtv-avc.c +++ b/drivers/media/dvb/firewire/firedtv-avc.c @@ -115,7 +115,7 @@ static const char *debug_fcp_ctype(unsigned int ctype) } ...
207fbefb18de9bc6f871e4008da29879c90cb67e
Analyze and fix the following issue in the Linux kernel code: firewire: cdev: fix race of ioctl_send_request with bus reset
Problem Details: The bus reset handler concurrently frees client->device->node. Use device->node_id instead. This is equivalent to device->node->node_id while device->generation is current. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index 160cb27e120c..c54e019c9586 100644 --- a/drivers/firewire/fw-cdev.c +++ b/drivers/firewire/fw-cdev.c @@ -585,7 +585,7 @@ static int ioctl_send_request(struct client *client, void *buffer) return -EINVAL; } - return init_request(cli...
5d9cb7d276a9c465fef5a771792eac2cf1929f2b
Analyze and fix the following issue in the Linux kernel code: firewire: cdev: add ioctls for iso resource management, amendment
Problem Details: Some fixes: - Remove stale documentation. - Fix a != vs. == thinko that got in the way of channel management. - Try bandwidth deallocation even if channel deallocation failed. A simplification: - fw_cdev_allocate_iso_resource.channels is now ordered like libdc1394's dc1394_iso_allocate_cha...
```diff diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index b93ad9c0a0d0..257b0c709a8b 100644 --- a/drivers/firewire/fw-cdev.c +++ b/drivers/firewire/fw-cdev.c @@ -1082,7 +1082,7 @@ static void iso_resource_work(struct work_struct *work) spin_unlock_irq(&client->lock); if (todo == ISO_RES_A...
b769bd17656f991c5588c676376e5ec77d25997a
Analyze and fix the following issue in the Linux kernel code: firewire: core: topology header fix
Problem Details: Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-topology.h b/drivers/firewire/fw-topology.h index 7e930f80beb3..3c497bb4fae4 100644 --- a/drivers/firewire/fw-topology.h +++ b/drivers/firewire/fw-topology.h @@ -19,6 +19,11 @@ #ifndef __fw_topology_h #define __fw_topology_h +#include <linux/list.h> +#include <linux/slab.h> ...
fb4430367b0bbee2420132faf16c7c762a39c0bb
Analyze and fix the following issue in the Linux kernel code: firewire: cdev: reference-count client instances
Problem Details: The lifetime of struct client instances must be longer than the lifetime of any client resource. This fixes a possible race between fw_device_op_release and transaction completions. It also prepares for new ioctls for isochronous resource management which will involve delayed processing of client res...
```diff diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index ead5c7b06ec1..81362c14ef44 100644 --- a/drivers/firewire/fw-cdev.c +++ b/drivers/firewire/fw-cdev.c @@ -20,6 +20,7 @@ #include <linux/module.h> #include <linux/kernel.h> +#include <linux/kref.h> #include <linux/wait.h> #include <li...
632321ecd99bf85c982a75f8329b4ecbb95b3a8f
Analyze and fix the following issue in the Linux kernel code: firewire: cdev: fix documentation of FW_CDEV_IOC_GET_INFO
Problem Details: The FW_CDEV_IOC_GET_INFO ioctl looks at client->device->config_rom, not at the local node's config ROM. We could fix the implementation or the documentation. I believe the way how it is currently implemented is more useful than the way how it is currently documented. In fact, libdc1394 uses the ABI ...
```diff diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 899ef279f5be..86c8ff5326f9 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h @@ -201,7 +201,7 @@ union fw_cdev_event { * case, @rom_length is updated with the actual length of the * configuration ...
45ee3199eb3e4233b755a9bb353a0527a4c58b5f
Analyze and fix the following issue in the Linux kernel code: firewire: cdev: use an idr rather than a linked list for resources
Problem Details: The current code uses a linked list and a counter for storing resources and the corresponding handle numbers. By changing to an idr we can be safe from counter wrap-around giving two resources the same handle. Furthermore, the deallocation ioctls now check whether the resource to be freed is of the i...
```diff diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index 4dd66c1a36da..094aee5c8bcf 100644 --- a/drivers/firewire/fw-cdev.c +++ b/drivers/firewire/fw-cdev.c @@ -41,10 +41,12 @@ #include "fw-device.h" struct client; +struct client_resource; +typedef void (*client_resource_release_fn_t)(stru...
97811e347310766030a648fdf0e407b2c91a39c1
Analyze and fix the following issue in the Linux kernel code: firewire: cdev: fix race of fw_device_op_release with bus reset
Problem Details: Unlink the client from the fw_device earlier in order to prevent bus reset events being added to client->event_list during shutdown. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c index a320ab48edd6..4dd66c1a36da 100644 --- a/drivers/firewire/fw-cdev.c +++ b/drivers/firewire/fw-cdev.c @@ -1009,6 +1009,10 @@ static int fw_device_op_release(struct inode *inode, struct file *file) struct event *e, *next_e; struct clien...
bb4f92b3a33bfc31f55098da85be44702bea2d16
Analyze and fix the following issue in the Linux kernel code: ucc_geth: Fix build breakage caused by a merge
Problem Details: This patch fixes following build error: CC ucc_geth.o ucc_geth.c: In function 'ucc_geth_probe': ucc_geth.c:3644: error: implicit declaration of function 'uec_mdio_bus_name' make[2]: *** [ucc_geth.o] Error 1 Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Mille...
```diff diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 5f866e276dd1..0b675127e83b 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -3641,7 +3641,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma if (err) return -1; - uec_mdio_bus_name(...
cc59c9e8d0165c632fd056c4a23e36f917507fb4
Analyze and fix the following issue in the Linux kernel code: ftrace: show virtual PID
Problem Details: Impact: fix PID output under namespaces When current namespace is not the global namespace, pid read from set_ftrace_pid is no correct. # ~/newpid_namespace_run bash # echo $$ 1 # echo 1 > set_ftrace_pid # cat set_ftrace_pid 3756 Since we write virtual PID to set_ftrace_pid, we need get virtua...
```diff diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 02d2de9d08ba..bb377112b1bb 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -2264,7 +2264,7 @@ ftrace_pid_read(struct file *file, char __user *ubuf, if (ftrace_pid_trace == ftrace_swapper_pid) r = sprintf(buf, "swapper tasks\...