id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
c24b6b6a8e130f74f792f82484ea504c04e06495
Analyze and fix the following issue in the Linux kernel code: backlight: adp5520: rename common defines and typos
Problem Details: The common adp5520 mfd defines were namespaced to avoid collisions, so update the define used in this driver accordingly. The structs were also renamed to fix a spelling typo. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-...
```diff diff --git a/drivers/video/backlight/adp5520_bl.c b/drivers/video/backlight/adp5520_bl.c index ad05da5ba3c7..4c10edecfb66 100644 --- a/drivers/video/backlight/adp5520_bl.c +++ b/drivers/video/backlight/adp5520_bl.c @@ -15,7 +15,7 @@ struct adp5520_bl { struct device *master; - struct adp5520_backlight_plat...
15e0ff7a0c500c9f55a06c1ebefd43bce94d508b
Analyze and fix the following issue in the Linux kernel code: mfd: Fix 88PM8607 I2C dependency
Problem Details: 88PM8607 depends on I2C and MFD_CORE. Since 88PM8607 is built-in kernel, it also requires that I2C and MFD_CORE are built-in kernel also. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index b0b3e42e7ee6..7df3bcf79490 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -321,7 +321,7 @@ config EZX_PCAP config MFD_88PM8607 bool "Support Marvell 88PM8607" - depends on I2C + depends on I2C=y select MFD_CORE help This su...
956266da703e3885924fe21bfc20f32d8f875474
Analyze and fix the following issue in the Linux kernel code: mfd: Fix ab4500 compilation warnings
Problem Details: When building the driver as a module, module_exit was missing, and subsys_initcall_sync() is not defined. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/ab4500-core.c b/drivers/mfd/ab4500-core.c index 3ad91f7ee22b..1c44c19e073a 100644 --- a/drivers/mfd/ab4500-core.c +++ b/drivers/mfd/ab4500-core.c @@ -200,7 +200,8 @@ static void __exit ab4500_exit(void) spi_unregister_driver(&ab4500_driver); } -subsys_initcall_sync(ab4500_init); +s...
16620e0f1990fa6d896a639449c4b3d678458464
Analyze and fix the following issue in the Linux kernel code: ksym_tracer: Fix bad cast
Problem Details: Fix this warning: kernel/trace/trace_ksym.c: In function 'ksym_trace_filter_read': kernel/trace/trace_ksym.c:239: warning: cast to pointer from integer of different size Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: "K.Prasad" <prasad@linux.vnet.ibm....
```diff diff --git a/kernel/trace/trace_ksym.c b/kernel/trace/trace_ksym.c index 64e7a5bd6692..48f1c6c248c6 100644 --- a/kernel/trace/trace_ksym.c +++ b/kernel/trace/trace_ksym.c @@ -235,7 +235,8 @@ static ssize_t ksym_trace_filter_read(struct file *filp, char __user *ubuf, mutex_lock(&ksym_tracer_mutex); hlist_f...
13f16d209161c95e92aef40e350cc6cf56ac440b
Analyze and fix the following issue in the Linux kernel code: tracing: Use seq file for trace_clock
Problem Details: The buffer for the output is as small as 64 bytes, so it'll overflow if we add more clock type. Use seq file instead. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <4B1DC4FB.5030407@cn.fujitsu.com> Signed-off-by: Frederic Weisbecker <fweis...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index a6c41cc63285..886268e0d8ee 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -3366,21 +3366,18 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, return cnt; } -static ssize_t tracing_clock_read(struct file *filp, c...
c7baab5d1e97437a2fca63b71d467f193dbebb02
Analyze and fix the following issue in the Linux kernel code: ARM: fix clps711x, footbridge, integrator, ixp2000, ixp2300 and s3c build bug
Problem Details: Anders Grafström reports that footbridge fails to build after 1c4a4f4. Fix this by adding the necessary definitions for __pfn_to_bus and __bus_to_pfn. Reported-by: Anders Grafström <anders.grafstrom@netinsight.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h index e522b20bcbc2..f70d52be48a2 100644 --- a/arch/arm/mach-clps711x/include/mach/memory.h +++ b/arch/arm/mach-clps711x/include/mach/memory.h @@ -30,6 +30,8 @@ #define __virt_to_bus(x) ((x) - PAGE_OFFSET)...
0d782dc430d94dc36b47cb11c2e33ecb1bb38234
Analyze and fix the following issue in the Linux kernel code: ARM: VFP: fix vfp thread init bug and document vfp notifier entry conditions
Problem Details: When the VFP notifier is called for flush_thread(), we may be preemptible, meaning we might migrate to another CPU, which means referencing the current CPU number without some form of locking is invalid, and can cause data corruption. For the most cases, this isn't a problem since atomic notifiers are...
```diff diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 2d7423af1197..aed05bc3c2ea 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -38,16 +38,72 @@ union vfp_state *last_VFP_context[NR_CPUS]; */ unsigned int VFP_arch; +/* + * Per-thread VFP initialization. + */ +stati...
002939729c7c8f6448e89e9e86c8c5bf6f0c77d3
Analyze and fix the following issue in the Linux kernel code: ARM: pxa: fix now incorrect reference of skt->irq by using skt->socket.pci_irq
Problem Details: commit 66024db removes all other references of skt->irq by using skt->socket.pci_irq, while leaving these two missed. Get them fixed. Signed-off-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/drivers/pcmcia/pxa2xx_palmtc.c index 3a8993ed5621..459a232d66be 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/drivers/pcmcia/pxa2xx_palmtc.c @@ -67,7 +67,7 @@ static int palmtc_pcmcia_hw_init(struct soc_pcmcia_socket *skt) if (ret) goto err7; - skt->irq =...
1b82e4c32fba96d8805b1e2126ba5382e56fac32
Analyze and fix the following issue in the Linux kernel code: [ARM] pxa/em-x270: fix usb hub power up/reset sequence
Problem Details: Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
```diff diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index 1c0de808b54d..c8a01bc85fde 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c @@ -497,16 +497,15 @@ static int em_x270_usb_hub_init(void) goto err_free_vbus_gpio; /* USB Hub power-on and reset */ - gpio_d...
965346e3b99e2c5f51bd1325ddd0257227000355
Analyze and fix the following issue in the Linux kernel code: spi: fix probe/remove section markings
Problem Details: Probe/remove functions need to be marked as __devinit and __devexit (not __init an __exit) to prevent trying to run code that has been discarded. This patch fixes the spi_imx driver to mark probe and remove correctly. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index e334747ba2d9..1893f1e96dc4 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -484,7 +484,7 @@ static void spi_imx_cleanup(struct spi_device *spi) { } -static int __init spi_imx_probe(struct platform_device *pdev) +static int __...
1d865fb728bd6bbcdfbd6ec1e2b8ade3b4805641
Analyze and fix the following issue in the Linux kernel code: x86: Fix duplicated UV BAU interrupt vector
Problem Details: Interrupt vector 0xec has been doubly defined in irq_vectors.h It seems arbitrary whether LOCAL_PENDING_VECTOR or UV_BAU_MESSAGE is the higher number. As long as they are unique. If they are not unique we'll hit a BUG in alloc_system_vector(). Signed-off-by: Cliff Wickman <cpw@sgi.com> Cc: <stable@k...
```diff diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h index 6a635bd39867..4611f085cd43 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h @@ -113,7 +113,7 @@ */ #define LOCAL_PENDING_VECTOR 0xec -#define UV_BAU_MESSAGE 0xec +#define UV...
663997d417330a59a566452f52cfa04c8ffd190b
Analyze and fix the following issue in the Linux kernel code: sched: Use pr_fmt() and pr_<level>()
Problem Details: - Convert printk(KERN_<level> to pr_<level> (not KERN_DEBUG) - Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - Coalesce long format strings - Add missing \n to "ERROR: !SD_LOAD_BALANCE domain has parent" Signed-off-by: Joe Perches <joe@perches.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 8b3532f262d7..258c73c6a2f3 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -26,6 +26,8 @@ * Thomas Gleixner, Mike Kravetz */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/mm.h> #include <linux/module.h> #include <linux...
7539a3b3d1f892dd97eaf094134d7de55c13befe
Analyze and fix the following issue in the Linux kernel code: sched: Make wakeup side and atomic variants of completion API irq safe
Problem Details: Alan Stern noticed that all the wakeup side (and atomic) variants of the completion APIs should be irq safe, but the newly introduced completion_done() and try_wait_for_completion() aren't. The use of the irq unsafe variants in IRQ contexts can cause crashes/hangs. Fix the problem by making them use s...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index ff39cadf621e..8b3532f262d7 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5908,14 +5908,15 @@ EXPORT_SYMBOL(wait_for_completion_killable); */ bool try_wait_for_completion(struct completion *x) { + unsigned long flags; int ret = 1; - spin_lock_irq(...
b8e8efaa86399c4424becd96402993cf230dab57
Analyze and fix the following issue in the Linux kernel code: powerpc: reserve fixmap entries for early debug
Problem Details: Add a set of entries to the fixmap table to allow usage of known reserved virtual address space by early debug code. The address space reserved is the top 128K of the 32-bit address space. This allows, if required, the use of a BAT to do the mappings. Signed-off-by: Albert Herranz <albert_herranz@yah...
```diff diff --git a/arch/powerpc/include/asm/fixmap.h b/arch/powerpc/include/asm/fixmap.h index f1f4e23a84e9..5c2c0233175e 100644 --- a/arch/powerpc/include/asm/fixmap.h +++ b/arch/powerpc/include/asm/fixmap.h @@ -44,6 +44,9 @@ */ enum fixed_addresses { FIX_HOLE, + /* reserve the top 128K for early debugging purp...
f01eb3640308c005d31b29d0a8bc2b7acb4e3f75
Analyze and fix the following issue in the Linux kernel code: [BKL] add 'might_sleep()' to the outermost lock taker
Problem Details: As shown by the previous patch (6698e3472: "tty: Fix BKL taken under a spinlock bug introduced in the BKL split") the BKL removal is prone to some subtle issues, where removing the BKL in one place may in fact make a previously nested BKL call the new outer call, and then prone to nasty deadlocks with ...
```diff diff --git a/lib/kernel_lock.c b/lib/kernel_lock.c index 4ebfa5a164d7..5526b46aba94 100644 --- a/lib/kernel_lock.c +++ b/lib/kernel_lock.c @@ -122,8 +122,10 @@ void __lockfunc _lock_kernel(const char *func, const char *file, int line) trace_lock_kernel(func, file, line); - if (likely(!depth)) + if (likely...
6698e34720660e18b45e2e3b115ee4584d0c3b5e
Analyze and fix the following issue in the Linux kernel code: tty: Fix BKL taken under a spinlock bug introduced in the BKL split
Problem Details: The fasync path takes the BKL (it probably doesn't need to in fact) while holding the file_list spinlock. You can't do that with the kernel lock: it causes lock inversions and deadlocks. Leave the BKL over that bit for the moment. Identified by AKPM. Signed-off-by: Alan Cox <alan@linux.intel.com> A...
```diff diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 684f0e0b175e..f15df40bc318 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -516,7 +516,6 @@ static void do_tty_hangup(struct work_struct *work) /* inuse_filps is protected by the single kernel lock */ lock_kernel(); check_t...
53ca353594a254e6bd45ccf2d405aa31bcbb7091
Analyze and fix the following issue in the Linux kernel code: [SCSI] 3w-9xxx fix bug in sgl loading
Problem Details: This small patch fixes a bug in the 3w-9xxx driver where it would load an invalid sgl address in the ioctl path even if request length was zero. Signed-off-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index 3bf75924741f..84d3bbaa95e7 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c @@ -76,6 +76,7 @@ Fix bug in twa_get_param() on 4GB+. Use pci_resource_len() for ioremap(). 2.26.02.012 - Add pow...
5543c72e2bbb30e5ba5938b18ec26617b8b3fb04
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfc: remote port gets stuck in restart state without really restarting
Problem Details: We ran into a scenario where a remote port goes into RESTART state, but never gets added to scsi transport. The running vmcore showed the following: a) Port was in RESTART state b) rdata->event was STOP c) no work gets scheduled for the remote work to fc_rport_work After this point, shut/no-shut of th...
```diff diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 35ca0e72df46..02300523b234 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -310,6 +310,7 @@ static void fc_rport_work(struct work_struct *work) restart = 1; else list_del(&rdata->peer...
46e75f66677f5094bb51e91f9473128c4e907c7d
Analyze and fix the following issue in the Linux kernel code: net: fix for utsrelease.h moving to generated
Problem Details: Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 675b7df632fc..27ca859e7453 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h @@ -63,7 +63,7 @@ #ifndef __iwl_core_h__ #define __iwl_core_h__ -#include <linux/...
d9bdcc72ecf055f97ed736a6c0309bd41baf10a7
Analyze and fix the following issue in the Linux kernel code: kbuild: fix make clean after mismerge
Problem Details: Fix typo / thinko in commit bc081dd. Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/Makefile b/Makefile index 391fcb396324..8491b21b5537 100644 --- a/Makefile +++ b/Makefile @@ -1174,7 +1174,7 @@ clean: archclean $(clean-dirs) \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ -o -name '*.symtypes' -o -name 'modul...
d8379ab1dde371f13d7fdddf05346840a82c2b61
Analyze and fix the following issue in the Linux kernel code: unifdef: update to upstream revision 1.190
Problem Details: Fix handling of input files (e.g. with no newline at EOF) that could make unifdef get into an unexpected state and call abort(). The new -B option compresses blank lines around a deleted section so that blank lines around "paragraphs" of code don't get doubled. The evaluator can now handle macros wit...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index d58fa703ec16..94381eddccfa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5407,6 +5407,12 @@ F: drivers/uwb/* F: include/linux/uwb.h F: include/linux/uwb/ +UNIFDEF +M: Tony Finch <dot@dotat.at> +W: http://dotat.at/prog/unifdef +S: Maintained +F: scripts/unifdef.c...
273b281fa22c293963ee3e6eec418f5dda2dbc83
Analyze and fix the following issue in the Linux kernel code: kbuild: move utsrelease.h to include/generated
Problem Details: Fix up all users of utsrelease.h Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/.gitignore b/.gitignore index c6c19ea6ea96..002d5304968b 100644 --- a/.gitignore +++ b/.gitignore @@ -47,7 +47,6 @@ Module.symvers # include/config include/linux/version.h -include/linux/utsrelease.h include/generated # stgit generated dirs diff --git a/Makefile b/Makefile index 3bdd932e3d88...
4a2ff67c88211026afcbdbc190c13f705dae1b59
Analyze and fix the following issue in the Linux kernel code: kbuild: fix bzImage build for x86
Problem Details: As has been discussed previously (and Sam has been CC'ed), the fix is still incorrect. It replaces "echo -ne" with "/bin/echo -ne", but neither of the two are guaranteed to support the necessary arguments and necessary (hexadecimal) escape sequences. What should be used here is printf(1). The trivia...
```diff diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index ffdafb26f539..d9f0cb837400 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -208,7 +208,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \ # Bzip2 and LZMA do not include size in file... so we have to fake that; #...
d0d26c33b63c7ec10c3fdf9c7ce0aa035f0b3200
Analyze and fix the following issue in the Linux kernel code: PCMCIA: fix pxa2xx_lubbock modular build error
Problem Details: ERROR: "pxa2xx_drv_pcmcia_ops" [drivers/pcmcia/pxa2xx_lubbock_cs.ko] undefined! ERROR: "pxa2xx_drv_pcmcia_add_one" [drivers/pcmcia/pxa2xx_lubbock_cs.ko] undefined! We also remove __pxa2xx_drv_pcmcia_probe and its export, since this is no longer required. Signed-off-by: Russell King <rmk+kernel@arm.li...
```diff diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index 84dde7768ad5..bae8e6e2d48c 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c @@ -252,6 +252,7 @@ int pxa2xx_drv_pcmcia_add_one(struct soc_pcmcia_socket *skt) return soc_pcmcia_add_one(skt); } +EXPORT_S...
e9d0a803c127e2e30afb0df780ccb3af4e2adb28
Analyze and fix the following issue in the Linux kernel code: ALSA: opti93x: use dB scale for mixer controls
Problem Details: Add dB scale for mixer controls. Fix dB scale for Master Volume control. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index ea4a67120468..b0ea310c87de 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -547,32 +547,40 @@ __skip_mpu: #ifdef OPTi93X -static const DECLARE_TLV_DB_SCALE(db_scale_6bit, -...
52dc438606d1ef78b96f56cc04dbea9242005730
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Overwrite pin config on intel DG45ID board.
Problem Details: The pin config provided by BIOS have some problems: 0x0221401f: [Jack] HP Out at Ext Front <-- other association and sequence 0x02a19020: [Jack] Mic at Ext Front <-- other association 0x01113014: [Jack] Speaker at Ext Rear <-- line out (not speaker) 0x01114010: [Jack] Speaker at Ext Rear <-- lin...
```diff diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index e66672317e57..3d59f8325848 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -1539,6 +1539,13 @@ static unsigned int alienware_m17x_pin_configs[13] = { 0x904601b0, }; +static unsigned int in...
4e8d340daac46cec8a0f8b3b0f228274fac913ba
Analyze and fix the following issue in the Linux kernel code: Input: i8042 - fix locking in interrupt routine
Problem Details: We need to protect not only i8042 status and data register from concurrent access from IRQ 1 and 12 but the rest of the shared state as well, so let's move release of i8042_lock in i8042_interrupt() a little bit further down. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 1df02d25aca5..634da68f7f35 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -368,6 +368,25 @@ static void i8042_stop(struct serio *serio) port->serio = NULL; } +/* + * i8042_filter() filters out unwant...
010c33cc7907239ffc8f49f09ccb3dc6d84a0369
Analyze and fix the following issue in the Linux kernel code: Input: sa1111ps2 - annotate probe() and remove() methods
Problem Details: Also fix annotation of ps2_test() - it can'be __init since it is called from __devinit code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c index f412c69478a8..d55874e5d1c2 100644 --- a/drivers/input/serio/sa1111ps2.c +++ b/drivers/input/serio/sa1111ps2.c @@ -180,8 +180,8 @@ static void __devinit ps2_clear_input(struct ps2if *ps2if) } } -static inline unsigned int -...
a0ee2037e10d7dce47caabbac19766d00632cccd
Analyze and fix the following issue in the Linux kernel code: Input: gscps2 - fix probe() and remove() annotations
Problem Details: Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index bd0f92d9f40f..06addfa7cc47 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c @@ -6,7 +6,7 @@ * Copyright (c) 2002 Thibaut Varene <varenet@parisc-linux.org> * * Pieces of code based on linux-2.4's hp_m...
e1187b3be72be59625e445b186007e6eae27fef1
Analyze and fix the following issue in the Linux kernel code: be2net: fix error in rx completion processing.
Problem Details: There are certain skews of the NIC which have multiple bits set in adapter->cap. Use & instead of == to process rx completions. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 24c7d9900baa..3a1f7902c16d 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@ -759,7 +759,7 @@ static void be_rx_compl_process(struct be_adapter *adapter, /* vlanf could be wrongly set in some cards. *...
fef45f4ce221fc110f70716a00f40be697c5b254
Analyze and fix the following issue in the Linux kernel code: igb: fix handling of mailbox collisions between PF/VF
Problem Details: This patch changes the handling of collisions between the use of the PF/VF sides of the mailbox. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 16349ba68736..78963a0e128d 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -4608,8 +4608,14 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf) retval = igb_read_mbx(hw, msgbuf, E1000_V...
435bb827499014ab0e57de75e9606861b08fe894
Analyze and fix the following issue in the Linux kernel code: omap3: Fix OMAP35XX_REV macros
Problem Details: In original implementation, the revision passed to these macros contained revision number in lower nibble. But, later the revision bits (OMAP_REVBITS_XX) were defined to use omap_revision[15:08] where revision number is containied in higher nibble. This patch updates the macros; else incorrect revisi...
```diff diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 0da076ddf85c..9a028bdebb06 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h @@ -438,12 +438,12 @@ IS_OMAP_TYPE(3517, 0x3517) #define OMAP3630_REV_ES1_0 0x36300034 #d...
ce13d4716a276f4331d78ba28a5093a63822ab95
Analyze and fix the following issue in the Linux kernel code: omap: serial: fix non-empty uart fifo read abort
Problem Details: OMAP3xxx and OMAP4430 UART IP blocks have a restriction wrt RX FIFO. Empty RX fifo read causes an abort. OMAP3xxx: UART IP revision >= 0x52 have this issue MVR register format is: Bits Field Name Description Type Reset 31:8 RESERVED RO 0x0 7:4 MAJOR Major revision number of ...
```diff diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 6278fe585c05..39b797bc14d6 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -33,6 +33,7 @@ #include "pm.h" #include "prm-regbits-34xx.h" +#define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 #define UA...
8d72c796c9d966b0efc26092dae7005c345b3efa
Analyze and fix the following issue in the Linux kernel code: omap1: LCD_DMA: Use some define rather than a hexadecimal
Problem Details: The patch corrects the issue introduced with one of my earlier patches: OMAP: DMA: Fix omapfb/lcdc on OMAP1510 broken when PM set[1] as pointed out by OMAP subsystem maintainer. Applies on top of my prevoius patch: OMAP: DMA: move LCD DMA related code from plat-omap to mach-omap1[2] Tested on Amst...
```diff diff --git a/arch/arm/mach-omap1/include/mach/lcdc.h b/arch/arm/mach-omap1/include/mach/lcdc.h new file mode 100644 index 000000000000..89bd703adaf6 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/lcdc.h @@ -0,0 +1,57 @@ +/* + * arch/arm/mach-omap1/include/mach/lcdc.h + * + * Extracted from drivers/video/o...
a7c3ae2cb6d144bdf6c582898d2368f5f91a1775
Analyze and fix the following issue in the Linux kernel code: OMAP4: Fix SRAM base and size
Problem Details: This patch fixes the public sram base address and available size on OMAP4430. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index ad2bf07d30b5..d8d5094b37ed 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c @@ -48,8 +48,10 @@ #define OMAP3_SRAM_VA 0xfe400000 #define OMAP3_SRAM_PUB_PA 0x40208000 #define OMAP3_SRAM_PUB_VA (...
b570e0ec25b371c2e01a1a558e852e2618526817
Analyze and fix the following issue in the Linux kernel code: OMAP4: Fix cpu detection
Problem Details: This patch fixes the OMAP4430 cpu detection. The IC rev detection is done with hawkeye and rev. Note that rev does not map directly to defined processor revision numbers as ES1.0 uses value 0.It also fixes the SCM base address to read the correct ID_CODE register. Also the cpu_is_omap44xx() and cpu_is...
```diff diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index f48a4b2654dd..3641ba0c16ef 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -246,6 +246,31 @@ void __init omap3_check_revision(void) } } +void __init omap4_check_revision(void) +{ + u32 idcode; + u16 hawkeye; + u8...
9ef89150ea118fabc1b93f6891ba58417e4260ff
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP4: PM: Fix the PRM and CM base addresses
Problem Details: This patch fixes the PRM and CM base addresses and adds a new CM2 base address for OMAP4 Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Benoit Cousson <b-cousson@ti.com>
```diff diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 610da0515e1f..c638fe0d84e8 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -11,6 +11,7 @@ clock-common = clock.o clock_common_data.o clockdomain.o obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $...
d048ec7ab48254c505e1cee49441345ce12129fd
Analyze and fix the following issue in the Linux kernel code: OMAP: omap_device: fix nsec/usec conversion in latency calculations
Problem Details: Use usecs = nsecs / NSEC_PER_USEC; instead of usecs = nsecs * NSEC_PER_USEC; Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
```diff diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 9a502af14f5b..51c9d560a0cd 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -142,7 +142,7 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat) read_persistent_cl...
726072e5dd459e3831d1dd4308ba469ff3ded419
Analyze and fix the following issue in the Linux kernel code: OMAP3 hwmod: Add automatic OCP_SYSCONFIG AUTOIDLE handling
Problem Details: This patch fills in the OCP_SYSCONFIG.AUTOIDLE handling in the OMAP hwmod code. After this patch, the hwmod code will set the module AUTOIDLE bit (generally <module>.OCP_SYSCONFIG.AUTOIDLE) to 1 by default upon enable. If the hwmod flag HWMOD_NO_OCP_AUTOIDLE is set, AUTOIDLE will be set to 0 upon ena...
```diff diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 65a8e0ae394f..b01da1ed822d 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -210,6 +210,32 @@ static int _set_softreset(struct omap_hwmod *oh, u32 *v) return 0; } +/** + * _set_modu...
6f8b7ff5b01e16a65c3b17865ce047faeca40907
Analyze and fix the following issue in the Linux kernel code: OMAP clock/hwmod: fix off-by-one errors
Problem Details: Fix loop bailout off-by-one bugs reported by Juha Leppänen <juha_motorsportcom@luukku.com>. This second version incorporates comments from Russell King <linux@arm.linux.org.uk>. A new macro, 'omap_test_timeout', has been created, with cleaner code, and existing code has been converted to use it. Sig...
```diff diff --git a/arch/arm/mach-omap2/cm.c b/arch/arm/mach-omap2/cm.c index 8eb2dab8c7db..58e4a1c557d8 100644 --- a/arch/arm/mach-omap2/cm.c +++ b/arch/arm/mach-omap2/cm.c @@ -21,6 +21,8 @@ #include <asm/atomic.h> +#include <plat/common.h> + #include "cm.h" #include "cm-regbits-24xx.h" #include "cm-regbits-3...
3863c74b512c1afd3ce6b2f81d8dea9f1d860968
Analyze and fix the following issue in the Linux kernel code: OMAP3: PM: Fix for MPU power domain MEM BANK position
Problem Details: MPU power domain bank 0 bits are displayed in position of bank 1 in PWRSTS and PREPWRSTS registers. So read them from correct position Signed-off-by: Thara Gopinath <thara@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
```diff diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 47d576883d5c..26b3f3ee82a3 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -983,6 +983,9 @@ int pwrdm_read_mem_pwrst(struct powerdomain *pwrdm, u8 bank) if (pwrdm->banks < (bank +...
33903eb55ae2a7f7cd980da619ae63d93c6530f3
Analyze and fix the following issue in the Linux kernel code: OMAP clockdomain/powerdomain: remove CONFIG_OMAP_DEBUG_{CLOCK,POWER}DOMAIN
Problem Details: Avoid cluttering the Kconfig space with debug options that are rarely used. These can now be enabled and disabled by patching the "#undef DEBUG" in the source files with "#define DEBUG", conforming to the practice for the rest of the linux-omap code. Also, while we're here, some lines in plat-omap/Kc...
```diff diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c index fcd82320a6a3..1a45ed1e8ba1 100644 --- a/arch/arm/mach-omap2/clockdomain.c +++ b/arch/arm/mach-omap2/clockdomain.c @@ -2,7 +2,7 @@ * OMAP2/3 clockdomain framework functions * * Copyright (C) 2008 Texas Instruments, Inc...
cb5228a6949f525dba37d4eb3ee114426fef22c9
Analyze and fix the following issue in the Linux kernel code: Staging: batman: fix debug Kconfig option
Problem Details: The debug batman option needs to depend on the correct config option. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> [ "No means no!" - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/staging/batman-adv/Kconfig b/drivers/staging/batman-adv/Kconfig index b9742e7c7d9e..7632f5760060 100644 --- a/drivers/staging/batman-adv/Kconfig +++ b/drivers/staging/batman-adv/Kconfig @@ -15,7 +15,7 @@ config BATMAN_ADV config BATMAN_DEBUG bool "B.A.T.M.A.N. debugging" - depends on B...
a01c7800420d2c294ca403988488a635d4087a6d
Analyze and fix the following issue in the Linux kernel code: nvram: Fix write beyond end condition; prove to gcc copy is safe
Problem Details: In nvram_write, first of all, correctly handle the case where the file pointer is already beyond the end; we should return EOF in that case. Second, make the logic a bit more explicit so that gcc can statically prove that the copy_from_user() is safe. Once the condition of the beyond-end filepointer ...
```diff diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index 4008e2ce73c1..fdbcc9fd6d31 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c @@ -264,10 +264,16 @@ static ssize_t nvram_write(struct file *file, const char __user *buf, unsigned char contents[NVRAM_BYTES]; unsigned i = *ppos; unsign...
23e707dd9b0b26215d801c59e87feed1c218a0f9
Analyze and fix the following issue in the Linux kernel code: Staging: batman: fix debug Kconfig option
Problem Details: The debug batman option needs to depend on the correct config option. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/batman-adv/Kconfig b/drivers/staging/batman-adv/Kconfig index b9742e7c7d9e..7632f5760060 100644 --- a/drivers/staging/batman-adv/Kconfig +++ b/drivers/staging/batman-adv/Kconfig @@ -15,7 +15,7 @@ config BATMAN_ADV config BATMAN_DEBUG bool "B.A.T.M.A.N. debugging" - depends on B...
b925585039cf39275c2e0e57512e5df27fa73aad
Analyze and fix the following issue in the Linux kernel code: mm: Adjust do_pages_stat() so gcc can see copy_from_user() is safe
Problem Details: Slightly adjust the logic for determining the size of the copy_form_user() in do_pages_stat(); with this change, gcc can see that the copying is safe. Without this, we get a build error for i386 allyesconfig: /home/hpa/kernel/linux-2.6-tip.urgent/arch/x86/include/asm/uaccess_32.h:213: error: call to ...
```diff diff --git a/mm/migrate.c b/mm/migrate.c index 7dbcb22316d2..0bc640fd68fa 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1044,7 +1044,7 @@ static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages, int err; for (i = 0; i < nr_pages; i += chunk_nr) { - if (chunk_nr + i > nr_pages) + if (chu...
eeb89d918c2fa2b809e464136bbafdaec2aacb30
Analyze and fix the following issue in the Linux kernel code: tty: push the BKL down into the handlers a bit
Problem Details: Start trying to untangle the remaining BKL mess Updated to fix missing unlock_kernel noted by Dan Carpenter Signed-off-by: Alan "I must be out of my tree" Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/char/pty.c b/drivers/char/pty.c index d86c0bc05c1c..385c44b3034f 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -659,7 +659,7 @@ static int __ptmx_open(struct inode *inode, struct file *filp) if (!retval) return 0; out1: - tty_release_dev(filp); + tty_release(inode, filp)...
8482bcd58530ad5857d7187854132f2b846db681
Analyze and fix the following issue in the Linux kernel code: tty: moxa: Fix modem op locking
Problem Details: This is overkill and mostly not needed Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index d180aa965a5a..ac06d0131db5 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c @@ -139,7 +139,7 @@ struct moxa_port { int cflag; unsigned long statusflags; - u8 DCDState; + u8 DCDState; /* Protected by the port lock */ u8 lineCtrl; u...
a808ac0c4a2c5d81ba38a2a76d4ddc1de40d1539
Analyze and fix the following issue in the Linux kernel code: tty: moxa: Locking clean up
Problem Details: - The open lock is needed to fix up the case of a board reset occuring during tty open but too early for a sane hangup response. - The lock can however got for other cases - Use the port mutex for get/setserial - Fix up the confused lack of locking on the THROTTLE and other bits in the private flag...
```diff diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 474d936d3b31..7ab720f1f30c 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c @@ -151,10 +151,10 @@ struct mon_str { }; /* statusflags */ -#define TXSTOPPED 0x1 -#define LOWWAIT 0x2 -#define EMPTYWAIT 0x4 -#define THROTTLE 0x8 +#define TX...
2493c0c166565e36831196446af594eb07892daf
Analyze and fix the following issue in the Linux kernel code: tty: isicom: fix deadlock on shutdown
Problem Details: Alexander Strakh <strakh@ispras.ru> reported KERNEL_VERSION: 2.6.31 DESCRIBE: Driver drivers/char/isicom.c might sleep in atomic context, because it calls tty_port_xmit_buf under spin_lock. ./drivers/char/isicom.c: 1307 static void isicom_hangup(struct tty_struct *tty) 1308 { ... 1315 spi...
```diff diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 1e91c302ee42..300d5bd6cd06 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -887,7 +887,6 @@ static void isicom_shutdown_port(struct isi_port *port) { struct isi_board *card = port->card; - tty_port_free_xmit_buf(&port->port)...
07f86c03fec711692121bf7f5316e0b3426acc05
Analyze and fix the following issue in the Linux kernel code: tty: mxser: Use the new locking rules to fix setserial properly
Problem Details: Propogate the init/shutdown mutex through the setserial logic. Use the proper locks for the various bits still using the BKL. Kill the BKL in this driver. Updated to fix the bug noted by Dan Carpenter Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 9dac516df006..3d923065d9a2 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -23,7 +23,6 @@ #include <linux/errno.h> #include <linux/signal.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/timer.h> #include...
6769140d304731f0a3b177470a2adb4bacd9036b
Analyze and fix the following issue in the Linux kernel code: tty: mxser: use the tty_port_open method
Problem Details: At first this looks a fairly trivial conversion but we can't quite push everything into the right format yet. The open side is easy but care is needed over the setserial methods. Fix up the locking now that we've adopted the port->mutex locking rule for the initialization. Signed-off-by: Alan Cox <ala...
```diff diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 5e28d39b9e81..9dac516df006 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -856,9 +856,9 @@ static void mxser_check_modem_status(struct tty_struct *tty, } } -static int mxser_startup(struct tty_struct *tty) +static int mxser_act...
1f100b323d19469b06a63ccd6130ed71760145cc
Analyze and fix the following issue in the Linux kernel code: tty: sdio_uart: Fix the locking on "func" for new code
Problem Details: The new dtr_rts function didn't take the port->func lock as it should so add use of the lock there. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 2a13db54ffc4..f53755533e7e 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -603,10 +603,14 @@ static void uart_dtr_rts(struct tty_port *tport, int onoff) { struct sdio_uart_port *port = containe...
c271cf37ba17631e371c97e2e8c8c353a83793e2
Analyze and fix the following issue in the Linux kernel code: tty: sdio_uart: Style fixes
Problem Details: Running the current code through checkpatch shows a few bits of noise mostly but not entirely from before the changes. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 210439742134..b999972eaf28 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -465,7 +465,8 @@ static void sdio_uart_transmit_chars(struct sdio_uart_port *port) tty = tty_port_tty_get(&port->port); ...
6238e712aff51ae74177cee5b2a63c0e37044e8f
Analyze and fix the following issue in the Linux kernel code: tty: sdio_uart: Fix termios handling
Problem Details: Switching between two non standard baud rates fails because of the cflag test. Do as we did elsewhere and just kill the "optimisation". Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 95027b03c646..210439742134 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -902,12 +902,6 @@ static void sdio_uart_set_termios(struct tty_struct *tty, struct ktermios *old_t struct sdio_uart_port *po...
584abc3775e76c1a2abe725355915851ed23ed6c
Analyze and fix the following issue in the Linux kernel code: tty: sdio_uart: Switch to the open/close helpers
Problem Details: Gets us proper tty semantics, removes some code and fixes up a few corner case races (hangup during open etc) Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 31f70233133d..95027b03c646 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -77,7 +77,6 @@ struct sdio_uart_port { struct kref kref; struct tty_struct *tty; unsigned int index; - unsigned int o...
0395b48c78ed822f251ab15d0fbc3ce06f41ffb1
Analyze and fix the following issue in the Linux kernel code: sdio_uart: Fix oops caused by the previous changeset
Problem Details: Now... testing reveals that the very first patch "sdio_uart: use tty_port" causes a segmentation fault in sdio_uart_open(): Unable to handle kernel NULL pointer dereference at virtual address 00000084 pgd = dfb44000 [00000084] *pgd=1fb99031, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] ...
```diff diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index c2759dbfdfd2..671fe5efabf3 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -608,7 +608,7 @@ static int sdio_uart_startup(struct sdio_uart_port *port) if (!(sdio_uart_get_mctrl(port) & TIOCM_CTS)) ...
edfacdd6f81119b9005615593f2cbd94b8c7e2d8
Analyze and fix the following issue in the Linux kernel code: devpts_get_tty() should validate inode
Problem Details: devpts_get_tty() assumes that the inode passed in is associated with a valid pty. But if the only reference to the pty is via a bind-mount, the inode passed to devpts_get_tty() while valid, would refer to a pty that no longer exists. With a lot of debug effort, Grzegorz Nosek developed a small progra...
```diff diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index d5f8c96964be..8882ecc0f1bf 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -517,11 +517,23 @@ int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty) struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number) { + str...
9e845abfc8a8973373821aa05302794fd254514b
Analyze and fix the following issue in the Linux kernel code: serial: fix NULL pointer dereference
Problem Details: If kzalloc() or alloc_tty_driver() fails, we call: put_tty_driver(normal = NULL). Then: put_tty_driver -> tty_driver_kref_put -> kref_put(&NULL->kref, ...) Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index dcc72444e8e7..885eabe552cd 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -2344,7 +2344,7 @@ static const struct tty_operations uart_ops = { */ int uart_register_driver(struct uart_driver *drv) { ...
2a0785ea375fe93cd480599bb40d0c837ff72a2e
Analyze and fix the following issue in the Linux kernel code: opticon: Fix resume logic
Problem Details: Opticon now takes the right mutex to check the port status but the status check is done wrongly for the modern serial code, so fix it. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index c03fdc0242dd..4cdb975caa89 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c @@ -502,7 +502,8 @@ static int opticon_resume(struct usb_interface *intf) int result; mutex_lock(&port->port.mutex); - if (...
64bc397914265a9ead8d73b63bb31ab3bdd25f67
Analyze and fix the following issue in the Linux kernel code: tty_port: add "tty_port_open" helper
Problem Details: For the moment this just moves the USB logic over and fixes the 'what if we open and hangup at the same time' race noticed by Oliver Neukum. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman...
```diff diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c index c63f3d33914a..b22a61a4fbe5 100644 --- a/drivers/char/tty_port.c +++ b/drivers/char/tty_port.c @@ -99,10 +99,11 @@ EXPORT_SYMBOL(tty_port_tty_set); static void tty_port_shutdown(struct tty_port *port) { + mutex_lock(&port->mutex); if (por...
2eaad1fddd7450a48ad464229775f97fbfe8af36
Analyze and fix the following issue in the Linux kernel code: x86: Limit the number of processor bootup messages
Problem Details: When there are a large number of processors in a system, there is an excessive amount of messages sent to the system console. It's estimated that with 4096 processors in a system, and the console baudrate set to 56K, the startup messages will take about 84 minutes to clear the serial port. This set of...
```diff diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c index c965e5212714..468489b57aae 100644 --- a/arch/x86/kernel/cpu/addon_cpuid_features.c +++ b/arch/x86/kernel/cpu/addon_cpuid_features.c @@ -74,6 +74,7 @@ void __cpuinit detect_extended_topology(struct cpuinfo_...
e93737b0f0159a61772894943199fd3b6f315641
Analyze and fix the following issue in the Linux kernel code: net: Handle NETREG_UNINITIALIZED devices correctly
Problem Details: Fix two problems: 1. If unregister_netdevice_many() is called with both registered and unregistered devices, rollback_registered_many() bails out when it reaches the first unregistered device. The processing of the prior registered devices is unfinished, and the remaining devices are skipp...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index c36a17aafcf3..6fe7d739e59b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4771,21 +4771,23 @@ static void net_set_todo(struct net_device *dev) static void rollback_registered_many(struct list_head *head) { - struct net_device *dev; + struct net_device...
c20a66f474e890dd8cc34e124632cd85e4165899
Analyze and fix the following issue in the Linux kernel code: xfrm: Fix truncation length of authentication algorithms installed via PF_KEY
Problem Details: Commit 4447bb33f09444920a8f1d89e1540137429351b6 ("xfrm: Store aalg in xfrm_state with a user specified truncation length") breaks installation of authentication algorithms via PF_KEY, as the state specific truncation length is not installed with the algorithms default truncation length. This patch ini...
```diff diff --git a/net/key/af_key.c b/net/key/af_key.c index 84209fbbeb17..76fa6fef6473 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -1193,6 +1193,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net, x->aalg->alg_key_len = key->sadb_key_bits; memcpy(x->aalg->alg_key, key+1, keysize...
60c2ffd3d2cf12008747d920ae118df119006003
Analyze and fix the following issue in the Linux kernel code: net: fix compat_sys_recvmmsg parameter type
Problem Details: compat_sys_recvmmsg has a compat_timespec parameter and not a timespec parameter. This way we also get rid of an odd cast. Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David ...
```diff diff --git a/include/net/compat.h b/include/net/compat.h index 3c7d4e38fa1d..28d5428ec6a2 100644 --- a/include/net/compat.h +++ b/include/net/compat.h @@ -46,7 +46,7 @@ extern asmlinkage long compat_sys_sendmsg(int,struct compat_msghdr __user *,unsi extern asmlinkage long compat_sys_recvmsg(int,struct compat_m...
ccdddf500f2b1b8e88ac8e3d4dfc15cce9f73886
Analyze and fix the following issue in the Linux kernel code: cxgb3: Fixing EEH handlers
Problem Details: After commit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff ("PCI: Clear saved_state after the state has been restored"), the EEH is not working proplery on cxgb3. This patch fixes it, always saving the PCI state after a recovery, in order to allow further reoveries. Signed-off-by: Breno Leitao <leitao@lin...
```diff diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index cef3f882e2b6..89bec9c3c141 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c @@ -2860,6 +2860,7 @@ static int t3_reenable_adapter(struct adapter *adapter) } pci_set_master(adapter->pdev); pci_...
5fc3441349936ea6f1f95a1ef17492223c76a695
Analyze and fix the following issue in the Linux kernel code: net: smc91x: Fix up type mismatch in smc_drv_resume().
Problem Details: smc_drv_resume() takes a struct device, while smc_enable_device() takes a platform device. This fixes up the smc_enable_device() callsite with the proper pointer. It's not obvious when this change was introduced, as git history doesn't go back that far. Presumably the resume code has always been broke...
```diff diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index b0c92b60c925..ea4fae79d6ec 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c @@ -2387,7 +2387,7 @@ static int smc_drv_resume(struct device *dev) if (ndev) { struct smc_local *lp = netdev_priv(ndev); - smc_enable_device(dev); + sm...
fd0775bfc9feb036e6efb669133d644ae29e12b8
Analyze and fix the following issue in the Linux kernel code: smc91x: fix unused flags warnings on UP systems
Problem Details: Local flags variables will be declared whenever these functions get used, but obviously on UP systems the flags parameter won't be touched. So add some dummy ops that get optimized away anyways to satisfy gcc's warnings. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Nicolas Pitre <nico@...
```diff diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index ae4983a5127d..b0c92b60c925 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c @@ -534,9 +534,9 @@ static inline void smc_rcv(struct net_device *dev) #define smc_special_lock(lock, flags) spin_lock_irqsave(lock, flags) #define smc_speci...
b338682dc5c20e8ff986e58407bdb6e3a3e3f0a3
Analyze and fix the following issue in the Linux kernel code: net: Fix Yukon-2 Optima TCP offload setup
Problem Details: Fix the TCP offload setup for Yukon-2 Optima. It requires SKY2_HW_NE_LE flag unlike Ultra 2. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 3943d89afb2b..050e6b58d4f9 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -2968,8 +2968,13 @@ static int __devinit sky2_init(struct sky2_hw *hw) break; case CHIP_ID_YUKON_UL_2: + hw->flags = SKY2_HW_GIGABIT + | SKY2_HW_ADV_POWER_C...
44a743f68705c681439f264deb05f8f38e9048d3
Analyze and fix the following issue in the Linux kernel code: xfs: Fix error return for fallocate() on XFS
Problem Details: Noticed that through glibc fallocate would return 28 rather than -1 and errno = 28 for ENOSPC. The xfs routines uses XFS_ERROR format positive return error codes while the syscalls use negative return codes. Fixup the two cases in xfs_vn_fallocate syscall to convert to negative. Signed-off-by: Jason ...
```diff diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index cd42ef78f6b5..1f3b4b8f7dd4 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -573,8 +573,8 @@ xfs_vn_fallocate( bf.l_len = len; xfs_ilock(ip, XFS_IOLOCK_EXCL); - error = xfs_change_file_space(ip, XFS_I...
b8f82a4a6fc79fcb4b2eb81252020e04c9b49da5
Analyze and fix the following issue in the Linux kernel code: xfs: kill the STATIC_INLINE macro
Problem Details: Remove our own STATIC_INLINE macro. For small function inside implementation files just use STATIC and let gcc inline it, and for those in headers do the normal static inline - they are all small enough to be inlined for debug builds, too. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Da...
```diff diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 616ee3febcbb..d6fc4ef727bb 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -337,7 +337,7 @@ xfs_map_blocks( return -xfs_iomap(XFS_I(inode), offset, count, flags, mapp, &nmaps); } -STATIC_INLINE int +S...
e82fa0c7ca29b805388aa51d3cad2cb7a4df3084
Analyze and fix the following issue in the Linux kernel code: xfs: rename xfs_attr_fetch to xfs_attr_get_int
Problem Details: Using a totally different name for the low-level get operation does not fit the _int convention used in the rest of the attr code, so rename it. While we're at it also fix the prototype to use the normal convention and mark it static as it's never used outside of xfs_attr.c. Signed-off-by: Christoph ...
```diff diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index 57825fe63cc5..8fe6f6b78a4a 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c @@ -123,9 +123,13 @@ xfs_inode_hasattr( * Overall external interface routines. *========================================================================*/ -int -xfs_at...
6ad112bfb5af537e9e3103c807748bb4a99bbd9e
Analyze and fix the following issue in the Linux kernel code: xfs: simplify xfs_buf_get / xfs_buf_read interfaces
Problem Details: Currently the low-level buffer cache interfaces are highly confusing as we have a _flags variant of each that does actually respect the flags, and one without _flags which has a flags argument that gets ignored and overriden with a default set. Given that very few places use the default arguments get ...
```diff diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 965df1227d64..811237480734 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -582,7 +582,7 @@ found: * although backing storage may not be. */ xfs_buf_t * -xfs_buf_get_flags( +xfs_buf_get( xfs_buftarg_t ...
fc5bc4c85c45f0bf854404e5736aa8b65720a18d
Analyze and fix the following issue in the Linux kernel code: xfs: Wrapped journal record corruption on read at recovery
Problem Details: Summary of problem: If a journal record wraps at the physical end of the journal, it has to be read in two parts in xlog_do_recovery_pass(): a read at the physical end and a read at the physical beginning. If xlog_bread() has to re-align the first read, the second read request does not take that re-a...
```diff diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index fb17f8226b09..b5b0d8055910 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -3517,7 +3517,7 @@ xlog_do_recovery_pass( { xlog_rec_header_t *rhead; xfs_daddr_t blk_no; - xfs_caddr_t bufaddr, offset; + xfs_caddr_t ...
80641dc66a2d6dfb22af4413227a92b8ab84c7bb
Analyze and fix the following issue in the Linux kernel code: xfs: I/O completion handlers must use NOFS allocations
Problem Details: When completing I/O requests we must not allow the memory allocator to recurse into the filesystem, as we might deadlock on waiting for the I/O completion otherwise. The only thing currently allocating normal GFP_KERNEL memory is the allocation of the transaction structure for the unwritten extent con...
```diff diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 2d0b3e1da9e6..6f83f58c099f 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c @@ -611,7 +611,7 @@ xfs_fs_log_dummy( xfs_inode_t *ip; int error; - tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1); + tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1, KM_...
c56c9631cbe88f08854a56ff9776c1f310916830
Analyze and fix the following issue in the Linux kernel code: xfs: fix mmap_sem/iolock inversion in xfs_free_eofblocks
Problem Details: When xfs_free_eofblocks is called from ->release the VM might already hold the mmap_sem, but in the write path we take the iolock before taking the mmap_sem in the generic write code. Switch xfs_free_eofblocks to only trylock the iolock if called from ->release and skip trimming the prellocated blocks...
```diff diff --git a/fs/xfs/xfs_rw.h b/fs/xfs/xfs_rw.h index f5e4874c37d8..726014d1c925 100644 --- a/fs/xfs/xfs_rw.h +++ b/fs/xfs/xfs_rw.h @@ -36,13 +36,6 @@ xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))); } -/* - * Flags for xfs_free_eofblocks - */ -#define XFS_FR...
e81589a70c9dbee888cce16e8bdfdc993299dc3f
Analyze and fix the following issue in the Linux kernel code: Staging: wlags49_h2: fix up signal levels
Problem Details: Adjusts the signal levels reported by the wlags49_h2 and wlags49_h25 staging drivers. With the constants supplied by Agere the signal levels are always poor, even in close proximity to the AP. The signals are now measured with a real device. 100% for close proximity to the AP, 0% for the noice floor. N...
```diff diff --git a/drivers/staging/wlags49_h2/wl_if.h b/drivers/staging/wlags49_h2/wl_if.h index 919431f12a85..ed2b4135a10e 100644 --- a/drivers/staging/wlags49_h2/wl_if.h +++ b/drivers/staging/wlags49_h2/wl_if.h @@ -80,13 +80,32 @@ #define TX_TIMEOUT ((800 * HZ) / 1000) +//#define HCF_MIN_COMM_...
d52ac3f24e721cd279e7eba1b87914f1454c67ed
Analyze and fix the following issue in the Linux kernel code: staging: dst: fix coding style
Problem Details: Signed-off-by: Mariusz Ziulek <mz.mzet@gmail.com> Cc: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/dst/crypto.c b/drivers/staging/dst/crypto.c index 7250f90f5924..351295c97a4b 100644 --- a/drivers/staging/dst/crypto.c +++ b/drivers/staging/dst/crypto.c @@ -64,7 +64,8 @@ err_out_exit: return ERR_PTR(err); } -static struct crypto_ablkcipher *dst_init_cipher(struct dst_crypto_c...
f5e08ca72288b9762f49778622617184180496e7
Analyze and fix the following issue in the Linux kernel code: Staging: usbip: Fix typo "Contoroller".
Problem Details: Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index 6e91fc2bd850..ef4371358dbe 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c @@ -56,7 +56,7 @@ static void vhci_stop(struct usb_hcd *hcd); static int vhci_get_frame_number(struct usb_hcd *h...
956cd45d03efd10f8b780d54b6e5e28d0afc2ef9
Analyze and fix the following issue in the Linux kernel code: Staging: rt28x0: fix comments in chip/mac_pci.h
Problem Details: Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rt2860/chip/mac_pci.h b/drivers/staging/rt2860/chip/mac_pci.h index 8dbadd033859..bc704acaa3d7 100644 --- a/drivers/staging/rt2860/chip/mac_pci.h +++ b/drivers/staging/rt2860/chip/mac_pci.h @@ -43,10 +43,10 @@ #include "../rtmp_iface.h" #include "../rtmp_dot11.h" -// -// Device ...
51bf00aef02d410bf74afb31ec2d5dbcedb1a52f
Analyze and fix the following issue in the Linux kernel code: Staging: iio: Fix typos in documentation
Problem Details: Spell-check wouln't catch these :) Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/Documentation/device.txt b/drivers/staging/iio/Documentation/device.txt index 6916cd333350..69d9570f29fc 100644 --- a/drivers/staging/iio/Documentation/device.txt +++ b/drivers/staging/iio/Documentation/device.txt @@ -10,7 +10,7 @@ First allocate one using: struct iio_dev *in...
727acb4fb2143ac7228b9a49f9e2f73f71e748d9
Analyze and fix the following issue in the Linux kernel code: Staging: sep: fix 2 warnings
Problem Details: Fix printk format warning: drivers/staging/sep/sep_driver.c:276: warning: format '%08llx' expects type 'long long unsigned int', but argument 2 has type 'dma_addr_t' and variable may be used uninitialized (correct): drivers/staging/sep/sep_driver.c:1774: warning: 'error' may be used uninitialized in t...
```diff diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c index f890a16096c0..67c7d2ca7ca0 100644 --- a/drivers/staging/sep/sep_driver.c +++ b/drivers/staging/sep/sep_driver.c @@ -273,7 +273,8 @@ static dma_addr_t sep_shared_virt_to_bus(struct sep_device *sep, void *virt_address) ...
988536981327c9b8d28a6e956de285791e137cd3
Analyze and fix the following issue in the Linux kernel code: Staging: vt665*: fix printk formats
Problem Details: Fix printk format warnings in vt665[56]: drivers/staging/vt6655/wpa.c:150: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int' drivers/staging/vt6655/wpa.c:181: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int' drivers/staging/vt66...
```diff diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c index f92d33ffe775..5da671418b52 100644 --- a/drivers/staging/vt6655/wpa.c +++ b/drivers/staging/vt6655/wpa.c @@ -147,7 +147,7 @@ WPA_ParseRSN ( if (pRSN->len >= 12) //oui1(4)+ver(2)+GKS(4)+PKSCnt(2) { j = 0;...
d5f5d89f0a48930436dba9735fda4663e7b55ed2
Analyze and fix the following issue in the Linux kernel code: Staging: iio: fix ring buffer build
Problem Details: max1363 uses both the iio hardware ring buffer and software ring buffer interfaces, but its Makefile and Kconfig do not reflect that usage, so its build breaks. Add a new Kconfig symbol to reflect that usage and change max1363.h & Makefile to use the new Kconfig symbol. Signed-off-by: Randy Dunlap <r...
```diff diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig index a2f1626eab41..3989c0ca0e0d 100644 --- a/drivers/staging/iio/adc/Kconfig +++ b/drivers/staging/iio/adc/Kconfig @@ -12,3 +12,12 @@ config MAX1363 convertors (ADC). (max1361, max1362, max1363, max1364, max1136, max1136, ma...
6c8e49dd41a568a1e31e8020ba423a1ade8393b1
Analyze and fix the following issue in the Linux kernel code: Staging: dst: Fix parentheses
Problem Details: `|' has a higher precedence than `?' so since MSG_WAITALL is defined 0x100, MSG_MORE was always written to the msg_flag. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/dst/state.c b/drivers/staging/dst/state.c index d057e52f3b64..bccbd6dbb172 100644 --- a/drivers/staging/dst/state.c +++ b/drivers/staging/dst/state.c @@ -121,7 +121,7 @@ int dst_data_send_header(struct socket *sock, msg.msg_namelen = 0; msg.msg_control = NULL; msg.msg_controll...
a5c330fe8b2f1e17133190e0b297a710c5a4de04
Analyze and fix the following issue in the Linux kernel code: staging: vme: Fix mutex locking
Problem Details: Fix incorrect use of mutex_trylock(). Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/vme/vme.c b/drivers/staging/vme/vme.c index ca9e4de46149..994fdb9b2127 100644 --- a/drivers/staging/vme/vme.c +++ b/drivers/staging/vme/vme.c @@ -879,7 +879,7 @@ int vme_dma_list_add(struct vme_dma_list *list, struct vme_dma_attr *src, return -EINVAL; } - if (mutex_trylock(&(...
70d7aa889f7c107a768d07389998e4fd89a7103d
Analyze and fix the following issue in the Linux kernel code: Staging: vme: fix compiler warnings in vme_ca91cx42.c
Problem Details: It's causing people to ignore problems in the file, so get rid of them so it's obvious something is wrong in the future. Cc: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/vme/bridges/vme_ca91cx42.c b/drivers/staging/vme/bridges/vme_ca91cx42.c index 74d54bb3f8e6..1cf3e91db59d 100644 --- a/drivers/staging/vme/bridges/vme_ca91cx42.c +++ b/drivers/staging/vme/bridges/vme_ca91cx42.c @@ -1171,7 +1171,9 @@ static int ca91cx42_probe(struct pci_dev *pdev, con...
beb9ccc635433065a099b75dc8b22caf0844014a
Analyze and fix the following issue in the Linux kernel code: staging: vme: correct array overflow
Problem Details: Eric Sesterhenn noticed that vme_user is overflowing an array used by sprintf. Use a bigger array. CC: Eric Sesterhenn <eric.sesterhenn@lsexperts.de> Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/vme/devices/vme_user.c b/drivers/staging/vme/devices/vme_user.c index dc9be4778fe5..e228942ee081 100644 --- a/drivers/staging/vme/devices/vme_user.c +++ b/drivers/staging/vme/devices/vme_user.c @@ -624,7 +624,7 @@ err_nocard: static int __init vme_user_probe(struct device *dev, int...
23d1d3d92283d6888e8e595cd52848728cd3da35
Analyze and fix the following issue in the Linux kernel code: Staging: rt28x0: Add proper selection of WIRELESS_EXT and WEXT_PRIV
Problem Details: After the incorporation of the patch entitled "wext: refactor", some of the wireless drivers in drivers/staging fail to build because they need to have CONFIG_WIRELESS_EXT and CONFIG_WEXT_PRIV defined. [ patch description borrowed from the previous fix for wireless staging drivers ("staging: Add pro...
```diff diff --git a/drivers/staging/rt2860/Kconfig b/drivers/staging/rt2860/Kconfig index bd5f8666dde2..f9962b693128 100644 --- a/drivers/staging/rt2860/Kconfig +++ b/drivers/staging/rt2860/Kconfig @@ -1,6 +1,8 @@ config RT2860 tristate "Ralink 2860/3090 wireless support" depends on PCI && X86 && WLAN + select WI...
ca58fb303757d73876af32238d86091c59b88507
Analyze and fix the following issue in the Linux kernel code: Staging: rt28x0: fix some build warnings
Problem Details: Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/rt2860/chip/rtmp_phy.h b/drivers/staging/rt2860/chip/rtmp_phy.h index 87516f3a111a..e2b90a14bf6c 100644 --- a/drivers/staging/rt2860/chip/rtmp_phy.h +++ b/drivers/staging/rt2860/chip/rtmp_phy.h @@ -552,8 +552,8 @@ #ifdef RT30xx #define RTMP_ASIC_MMPS_DISABLE(_pAd) \ do{ ...
b767fa1d110230f342243034e285ceadcbbb709e
Analyze and fix the following issue in the Linux kernel code: Staging: otus : checkpatch.pl cleanup for .c files
Problem Details: First patch for checkpatch.pl error and warning fixes for .c files of otus driver in staging tree. Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/otus/apdbg.c b/drivers/staging/otus/apdbg.c index d3e2f6224196..0eb93f19958a 100644 --- a/drivers/staging/otus/apdbg.c +++ b/drivers/staging/otus/apdbg.c @@ -38,39 +38,39 @@ #include <linux/sockios.h> -#define ZM_IOCTL_REG_READ 0x01 -#define ZM_IOCTL_REG_WRITE ...
dba0da373d389b9e12bb739d25cbe116dee5f55b
Analyze and fix the following issue in the Linux kernel code: Staging: otus : checkpatch.pl cleanup for header files
Problem Details: Fix for checkpatch.pl errors and warnings in header files of otus driver. (There is a typedef which still remains. Plan to clean it up in next set of patches) Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/otus/athr_common.h b/drivers/staging/otus/athr_common.h index 620f78a41d5f..3e32f5b4ac68 100644 --- a/drivers/staging/otus/athr_common.h +++ b/drivers/staging/otus/athr_common.h @@ -68,7 +68,7 @@ #define ZM_WAPI_KEY_SIZE 32 #define ZM_WAPI_IV_LEN ...
bfb97bf833785525eb128cbcee81f686d0239aa4
Analyze and fix the following issue in the Linux kernel code: Staging: wlags49: fix kconfigs dependancy
Problem Details: Fix depends/selects in wlags49 drivers. ERROR: "wireless_spy_update" [drivers/staging/wlags49_h2/wlags49_h2_cs.ko] undefined! ERROR: "iw_handler_get_spy" [drivers/staging/wlags49_h2/wlags49_h2_cs.ko] undefined! ERROR: "iw_handler_set_spy" [drivers/staging/wlags49_h2/wlags49_h2_cs.ko] undefined! ERROR...
```diff diff --git a/drivers/staging/wlags49_h2/Kconfig b/drivers/staging/wlags49_h2/Kconfig index f9978fc40d4b..92053fe70130 100644 --- a/drivers/staging/wlags49_h2/Kconfig +++ b/drivers/staging/wlags49_h2/Kconfig @@ -1,6 +1,7 @@ config WLAGS49_H2 tristate "Agere Systems HERMES II Wireless PC Card Model 0110" - dep...
7f59b1bfa3149c81b332a8c2c3935111d97a5b20
Analyze and fix the following issue in the Linux kernel code: Staging: et131x: Clean up the receive arrays
Problem Details: We don't use them for anything having stripped out the debug gunge in the original driver. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index 5d17abdf7119..f8fee252a944 100644 --- a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -1076,10 +1076,7 @@ void et131x_reset_recv(struct et131x_adapter *etdev) void et131x_handle_recv_inte...
e12274ba0ca0d9c7e175c419964dbdbe2fd671f8
Analyze and fix the following issue in the Linux kernel code: Staging: iio: Fix up the module build.
Problem Details: Both the max1363 and lis3l02dq modules rely on IIO trigger support in their ring buffer implementations, which is presently a separate config option. In the case of IIO_RING_BUFFER=y and IIO_TRIGGER=n, we end up with the following: ERROR: "iio_trigger_attach_poll_func" [drivers/staging/iio/adc/max1363...
```diff diff --git a/drivers/staging/iio/accel/Kconfig b/drivers/staging/iio/accel/Kconfig index fef3da48276c..40446636d79b 100644 --- a/drivers/staging/iio/accel/Kconfig +++ b/drivers/staging/iio/accel/Kconfig @@ -13,6 +13,7 @@ config KXSD9 config LIS3L02DQ tristate "ST Microelectronics LIS3L02DQ Accelerometer Driv...
7e0463839cbde150fe7d767e9a91bea0d17bcde5
Analyze and fix the following issue in the Linux kernel code: Staging: iio: kconfig and make edits
Problem Details: Fix spelling, typos, indentation in iio Kconfig files. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/Kconfig b/drivers/staging/iio/Kconfig index 4586650d65c3..ace99f6d1166 100644 --- a/drivers/staging/iio/Kconfig +++ b/drivers/staging/iio/Kconfig @@ -8,7 +8,7 @@ menuconfig IIO ---help--- The industrial I/O subsystem provides a unified framework for drivers for many di...
ea25371a78c33e276527361d3ab19393d558b2fd
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix usbdux timeout bug
Problem Details: I've fixed a bug in the USBDUX driver which caused timeouts while sending commands to the boards. This was mainly because of one bulk transfer which had a timeout of 1ms (!). I've now set all timeouts to 1000ms. From: Bernd Porr <BerndPorr@f2s.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index cec028e0db13..f2dab1a4d41b 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -1,4 +1,4 @@ -#define DRIVER_VERSION "v2.2" +#define DRIVER_VERSION "v2.3" #defin...
26ac87851aa65f6bc58c2d1aa9162951a1dcd999
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: ke_counter: fix style issues
Problem Details: 80 char limit (where useful) braces around single line block KERN_ facility for printk Signed-off-by: Dirk Hohndel <hohndel@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/ke_counter.c b/drivers/staging/comedi/drivers/ke_counter.c index c145e829108f..73b0445e310f 100644 --- a/drivers/staging/comedi/drivers/ke_counter.c +++ b/drivers/staging/comedi/drivers/ke_counter.c @@ -192,12 +192,14 @@ static int cnt_attach(struct comedi_device *dev...
13ccea3ff07cabcc48eb5e953eec24141b7be9d6
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: ii_pci_20kc: fix style printk
Problem Details: add KERN_ facility to printk (mostly KERN_INFO, some KERN_WARNING) I think I found a bug - commented on it but didn't change as it's just in a printk (off by 1 error in output) Signed-off-by: Dirk Hohndel <hohndel@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/ii_pci20kc.c b/drivers/staging/comedi/drivers/ii_pci20kc.c index 6885714be993..e26c1b88ebeb 100644 --- a/drivers/staging/comedi/drivers/ii_pci20kc.c +++ b/drivers/staging/comedi/drivers/ii_pci20kc.c @@ -226,14 +226,13 @@ static int pci20xxx_attach(struct comedi_device...
dc1fe479413996629df9ab10b9f4749ba60ae637
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: ii_pci20kc: white space fixes
Problem Details: No code changes - left some 80 char violations alone as folding those lines would have made code less readable Signed-off-by: Dirk Hohndel <hohndel@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/ii_pci20kc.c b/drivers/staging/comedi/drivers/ii_pci20kc.c index 24df2453e683..6885714be993 100644 --- a/drivers/staging/comedi/drivers/ii_pci20kc.c +++ b/drivers/staging/comedi/drivers/ii_pci20kc.c @@ -23,7 +23,8 @@ * no extern trigger implemented * * NOT WORKI...