id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
b4d59a9317e41faec3d0b6a03f0454d1e8abb710
Analyze and fix the following issue in the Linux kernel code: mac80211: fix rates setup on IBSS merge
Problem Details: when an IBSS merge happened, the supported rates for the newly added station were left empty, causing the rate control module to be initialized with only the basic rates. also the section of the ibss code which deals with updating supported rates for an already existing station fails to inform the rat...
```diff diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index f3e942486749..b840d9072de9 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -276,6 +276,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, (unsigned long long) sta->sta.supp_rates[band]); #endif rcu_...
06f7bc7db79fabe6b2ec16eff0f59e4acc21eb72
Analyze and fix the following issue in the Linux kernel code: wl1271: Fix queue stopping/waking for TX path
Problem Details: The queue stopping/waking functionality was broken in a way that could cause huge latencies in TX transfers and even cause the TX to stall in the right circumstances. Correct these problems. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Kalle Valo <kalle.valo@nokia.com> Signe...
```diff diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h index cc974eae009e..7f03f899b2b0 100644 --- a/drivers/net/wireless/wl12xx/wl1271.h +++ b/drivers/net/wireless/wl12xx/wl1271.h @@ -491,7 +491,8 @@ int wl1271_plt_stop(struct wl1271 *wl); #define WL1271_DEFAULT_POWER_LEVEL...
15305498a443c181c8fb5deafb94eae585fe3ad5
Analyze and fix the following issue in the Linux kernel code: wl1271: Fix ad-hoc mode neighborhood detection
Problem Details: This patch fixes a bug in ad-hoc mode preventing mac80211 from properly detecting other ad-hoc networks with the same SSID. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index 6759aa11c132..e029bf03809d 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c @@ -247,7 +247,7 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl) return ret; ...
ffb591cd0e32d817bdbd359dead3baa770b999f8
Analyze and fix the following issue in the Linux kernel code: wl1271: Improvements to the TX path
Problem Details: - Fix a TX result overflow problem that was present in the TX path and visible with at least linksys AP's (probably any AP with high throughput capability.) - Optimize TX by writing FW trigger for a group of TX frames instead of each and every frame. - Slightly optimize the TX path code. Signed-of...
```diff diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h index 10135c94e20e..cc974eae009e 100644 --- a/drivers/net/wireless/wl12xx/wl1271.h +++ b/drivers/net/wireless/wl12xx/wl1271.h @@ -396,10 +396,10 @@ struct wl1271 { /* Accounting for allocated / available TX blocks on HW *...
5833ded9b6d783b8446349bada08f0f5e4227895
Analyze and fix the following issue in the Linux kernel code: udf: Do not read inode before writing it
Problem Details: We needlessly read inode in udf_update_inode just before zeroing out the contents of the buffer. Fix it. Signed-off-by: Jan Kara <jack@suse.cz>
```diff diff --git a/fs/udf/inode.c b/fs/udf/inode.c index a792a884b49c..a00602b2e32d 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -1408,9 +1408,8 @@ static int udf_update_inode(struct inode *inode, int do_sync) unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; struct udf_inode_info *iinfo = UDF_...
aae917cd188f397e9223001d9f6c0adfb339fd64
Analyze and fix the following issue in the Linux kernel code: udf: Fix unalloc space handling in udf_update_inode
Problem Details: Writing of inode holding unallocated space info was broken because we first cleared the buffer and after that checked whether it contains a tag meaning the block holds unallocated space information. Fix the problem by checking appropriate in memory flag instead. Also cleanup the function a bit along ...
```diff diff --git a/fs/udf/inode.c b/fs/udf/inode.c index b57ab0402d89..a792a884b49c 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -1412,16 +1412,16 @@ static int udf_update_inode(struct inode *inode, int do_sync) udf_get_lb_pblock(inode->i_sb, &iinfo->i_location, 0)); if (!bh) { - udf_debug("brea...
28918c211d86b6eeb70182c523800c7bc442960c
Analyze and fix the following issue in the Linux kernel code: HID: magicmouse: fix oops after device removal
Problem Details: Ask the HID core not to register an input device for the mouse. Fix an oops after removing the device, due to leaving the new input device registered. Signed-off-by: Michael Poole <mdpoole@troilus.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 4a3a94f2b10c..c174b64c3810 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c @@ -353,7 +353,7 @@ static int magicmouse_probe(struct hid_device *hdev, goto err_free; } - ret = hid_hw_start(hdev, HID_C...
2943bff69e3728cfd69841537120125f9373bb28
Analyze and fix the following issue in the Linux kernel code: Blackfin: fix anomaly 283 handling with exact hardware error
Problem Details: The exact hardware error handling code was added before the workaround for anomaly 283 which caused the anomaly to be triggered in some cases (an infinite core stall). So re-order the code to avoid this. Reported-by: Andrew Rook <andrew.rook@speakerbus.co.uk> Signed-off-by: Robin Getz <robin.getz@ana...
```diff diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 6c20044c7f4c..a5847f5d67c7 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S @@ -482,6 +482,8 @@ ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/ [--sp] ...
600482c13d3d3612d71f39d8aaec47f63aafa801
Analyze and fix the following issue in the Linux kernel code: Blackfin: fix single stepping over system calls
Problem Details: On Blackfin systems, the hardware single step exception triggers before the system call exception, so we need to save this info to process it later on. Otherwise, single stepping in userspace misses a few insns right after the system call. This is based a bit on the SuperH code added in commit 4b505d...
```diff diff --git a/arch/blackfin/include/asm/thread_info.h b/arch/blackfin/include/asm/thread_info.h index 0149c92ceeb0..e9a5614cdbb1 100644 --- a/arch/blackfin/include/asm/thread_info.h +++ b/arch/blackfin/include/asm/thread_info.h @@ -103,6 +103,7 @@ static inline struct thread_info *current_thread_info(void) #def...
f5b99627a3065858ad5c678703ed7af5363dca39
Analyze and fix the following issue in the Linux kernel code: Blackfin: use generic ptrace_resume code
Problem Details: Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cl...
```diff diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index 65567dc4b9f5..895302df21c1 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c @@ -354,50 +354,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ret = put_reg(child, ...
3750411fb7ca96dd11ce8a63f213b60bfe4b5c29
Analyze and fix the following issue in the Linux kernel code: Blackfin: fix whitespace damage in thread_info.h
Problem Details: Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/include/asm/thread_info.h b/arch/blackfin/include/asm/thread_info.h index a40d9368c38a..0149c92ceeb0 100644 --- a/arch/blackfin/include/asm/thread_info.h +++ b/arch/blackfin/include/asm/thread_info.h @@ -1,5 +1,5 @@ /* - * Copyright 2004-2009 Analog Devices Inc. + * Copyright 2004-20...
c6669c223a409199a45bb8f31a2e160ee26d19cc
Analyze and fix the following issue in the Linux kernel code: Blackfin: fix up mm locking in address dumping
Problem Details: The locking code in the address dumper needs to grab the mm's mmap_sem so that other CPUs do not get an inconsistent view. On UP systems this really wasn't a problem, but it is easy to trigger a race on SMP systems when another CPU removes a mapping. Signed-off-by: Graf Yang <graf.yang@analog.com> Si...
```diff diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 870d74b1b407..85766805b03a 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -138,6 +138,12 @@ static void decode_address(char *buf, unsigned long address) if (!mm) continue; + if (!down_read_t...
48a74f9d1b381471397097851531c4e392f97451
Analyze and fix the following issue in the Linux kernel code: Blackfin: fix decoding of opcodes 41-47 in decode_instruction()
Problem Details: This condition allowed only decoding of opcode 0x0040 Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index d3cbcd6bd985..870d74b1b407 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -712,7 +712,7 @@ static void decode_instruction(unsigned short *address) verbose_printk("RTE"); else if (opcode == 0x00...
aad16f32284030907b4f105e92e5fb534fd272bc
Analyze and fix the following issue in the Linux kernel code: Blackfin: fix initial stack pointer setup
Problem Details: During very early init, the stack pointer is given a slightly incorrect value (&init_thread_union). The value is later adjusted to the right one during early init (&init_thread_union + THREAD_SIZE), but it is used a few times in between. While the few functions used don't actually put things onto the...
```diff diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S index cab0a0031eee..cf037782c8ad 100644 --- a/arch/blackfin/mach-common/head.S +++ b/arch/blackfin/mach-common/head.S @@ -144,8 +144,8 @@ ENTRY(__start) #endif /* Initialize stack pointer */ - sp.l = _init_thread_union; - sp.h...
8916a1499d958fcb9086a2c49a5fa3000689bb81
Analyze and fix the following issue in the Linux kernel code: Blackfin: fix the section name of init_thread_union
Problem Details: Use the common attribute rather than setting the section name directly. The common linker script defines expect the newer naming. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/kernel/init_task.c b/arch/blackfin/kernel/init_task.c index 118c5b9dedac..d3970e8acd1a 100644 --- a/arch/blackfin/kernel/init_task.c +++ b/arch/blackfin/kernel/init_task.c @@ -28,5 +28,5 @@ EXPORT_SYMBOL(init_task); * "init_task" linker map entry. */ union thread_union init_threa...
0afc272cc6044b7a4f1318eadbfb10c4be654441
Analyze and fix the following issue in the Linux kernel code: Blackfin: fix relocation errors with large initramfs images
Problem Details: Since we are now discarding .exit.text at runtime instead of link time, we need to place all .text sections ahead of the .data sections. Otherwise, a really large attached initramfs may cause link errors as it pushes the PC relative relocations behind the limits of the Blackfin ISA (~16meg). The instr...
```diff diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index 66799e763dc9..be4b1bbb3918 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S @@ -104,18 +104,21 @@ SECTIONS ___init_begin = .; INIT_TEXT_SECTION(PAGE_SIZE) - . = ALIGN(16); - I...
1dafdc513a20410e328b22b6d25d4ac78557516a
Analyze and fix the following issue in the Linux kernel code: Blackfin: BF51x: fix L1 Instruction SRAM size
Problem Details: The BF51x's Instruction SRAM is 32kB, not 48kB. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/mach-bf518/include/mach/mem_map.h b/arch/blackfin/mach-bf518/include/mach/mem_map.h index 3c6777cb3532..073b5d73d391 100644 --- a/arch/blackfin/mach-bf518/include/mach/mem_map.h +++ b/arch/blackfin/mach-bf518/include/mach/mem_map.h @@ -41,7 +41,7 @@ #define L1_DATA_A_START 0xFF80000...
a3a6a590190ca77aedf9de871d941c1139a5a24c
Analyze and fix the following issue in the Linux kernel code: Blackfin: dma-mapping: fix thinko in constant optimization
Problem Details: Make sure the non-constant version of the dma_sync functions actually complete instead of recursively calling itself forever. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/include/asm/dma-mapping.h b/arch/blackfin/include/asm/dma-mapping.h index f9172ff30e5c..e63f6d9fdab8 100644 --- a/arch/blackfin/include/asm/dma-mapping.h +++ b/arch/blackfin/include/asm/dma-mapping.h @@ -44,13 +44,8 @@ dma_mapping_error(struct device *dev, dma_addr_t dma_addr) extern...
e18e7dd33454f277b9438af66d25984362278021
Analyze and fix the following issue in the Linux kernel code: Blackfin: fix MPU page permission masks overflow when dealing with async memory
Problem Details: Attempting to use the MPU while doing XIP out of parallel flash hooked up to the async memory bus would often result in random crashes as the MPU slowly corrupted memory. The fallout here is that the async banks gain MPU protection from user space too. So any accesses have to go through the mmap() in...
```diff diff --git a/arch/blackfin/include/asm/mmu_context.h b/arch/blackfin/include/asm/mmu_context.h index ae8ef4ffd806..7f363d7e43a5 100644 --- a/arch/blackfin/include/asm/mmu_context.h +++ b/arch/blackfin/include/asm/mmu_context.h @@ -13,6 +13,7 @@ #include <asm/page.h> #include <asm/pgalloc.h> #include <asm/cpl...
7de6f798e13093536b6cb229213db2fab6e6555f
Analyze and fix the following issue in the Linux kernel code: mtd: Make SM_FTL depend on MTD_NAND
Problem Details: Randy Dunlap observed a build problem with the following config: CONFIG_SM_FTL=y CONFIG_SM_FTL_MUSEUM=y CONFIG_MTD_NAND=m The ECC calculation routines are then built as a module, but referenced by the sm_ftl code in the kernel, resulting in a build failure. The simple fix is to make CONFIG_SM_FTL de...
```diff diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 8a912406433f..dbee14d37224 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -307,22 +307,22 @@ config SSFDC config SM_FTL tristate "SmartMedia/xD new translation layer" - depends on EXPERIMENTAL && BLOCK + depends on EXPERIMENTAL && ...
ada496578850cb063ccf64d43a293cfcc9d32bf8
Analyze and fix the following issue in the Linux kernel code: mtd: nand: r852: fix name space clash
Problem Details: and include delay.h for msleep(). Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c index 96db476ce3ed..f5a0bc7addea 100644 --- a/drivers/mtd/nand/r852.c +++ b/drivers/mtd/nand/r852.c @@ -13,15 +13,16 @@ #include <linux/workqueue.h> #include <linux/interrupt.h> #include <linux/pci_ids.h> +#include <linux/delay.h> #include <asm/...
b2aaf7a2b476820cf5fd7738e8641ed88046acf5
Analyze and fix the following issue in the Linux kernel code: mtd/nand/r852: fix build for CONFIG_PM=n
Problem Details: Fix r852 build for the case of CONFIG_PM=n. drivers/mtd/nand/r852.c:1039: error: implicit declaration of function 'pci_prepare_to_sleep' drivers/mtd/nand/r852.c:1048: error: implicit declaration of function 'pci_back_from_sleep' This patch leaves r852_pm_ops untouched. Signed-off-by: Randy Dunlap <r...
```diff diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c index cb271167b4a5..96db476ce3ed 100644 --- a/drivers/mtd/nand/r852.c +++ b/drivers/mtd/nand/r852.c @@ -1019,6 +1019,7 @@ void r852_shutdown(struct pci_dev *pci_dev) pci_disable_device(pci_dev); } +#ifdef CONFIG_PM int r852_suspend(struct devi...
fb45d3232c641bfee5000c8a81e2005903734702
Analyze and fix the following issue in the Linux kernel code: mtd: r852: Few fixes for problems that occur when card is rapidly inserted/removed.
Problem Details: First don't enable card detection logic to early. Second be very careful with DMA engine, to be sure it doesn't write to kernel memory driver doesn't own. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
```diff diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c index 218a42dadff1..cb271167b4a5 100644 --- a/drivers/mtd/nand/r852.c +++ b/drivers/mtd/nand/r852.c @@ -96,14 +96,21 @@ static void r852_dma_enable(struct r852_device *dev) if (dev->dma_dir) dma_reg |= R852_DMA_READ; - if (dev->dma_state == D...
30124d11097e371e42052144d8a3f4a78d26e09f
Analyze and fix the following issue in the Linux kernel code: powerpc/booke: Fix breakpoint/watchpoint one-shot behavior
Problem Details: Another fix for the extended ptrace patches in the -next tree. The handling of breakpoints and watchpoints is inconsistent. When a breakpoint or watchpoint is hit, the interrupt handler is clearing the proper bits in the dbcr* registers, but leaving the dac* and iac* registers alone. The ptrace code...
```diff diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 0efa2e3f40c6..ed2cfe17d25e 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c @@ -940,7 +940,7 @@ static int del_instruction_bp(struct task_struct *child, int slot) { switch (slot) { case 1: - if (chil...
a8e6da093ea8642b1320fb5d64134366f2a8d0ac
Analyze and fix the following issue in the Linux kernel code: powerpc: Reduce printk from pseries_mach_cpu_die()
Problem Details: Remove debug printks in pseries_mach_cpu_die(). These are noisy at runtime. Traceevents can be added to instrument this section of code. The following KERN_INFO printks are removed: cpu 62 (hwid 62) returned from cede. Decrementer value = b2802fff Timebase value = 2fa8f95035f4a cpu 62 (hwid 62) got...
```diff diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index fefb7f84800b..a8e1d5d17a28 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -122,21 +122,10 @@ static void pseries_mach_cpu_die(void) i...
0212f2602a38e740d5a96aba4cebfc2ebc993ecf
Analyze and fix the following issue in the Linux kernel code: powerpc: Move checks in pseries_mach_cpu_die()
Problem Details: Rearrange condition checks for better code readability and prevention of possible race conditions when preferred_offline_state can potentially change during the execution of pseries_mach_cpu_die(). The patch will make pseries_mach_cpu_die() put cpu in one of the consistent states and not hit the ...
```diff diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 349e0af9389a..fefb7f84800b 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -140,25 +140,25 @@ static void pseries_mach_cpu_die(void) i...
de0b632ba05bc88949e67d33d1c313fcf922ae2e
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix G5 thermal shutdown
Problem Details: This changes the thresholds for the liquid cooled G5 thermal shutdown mechanism to prevent an errant shutdown with some models. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 5738d8bf2d97..921373e4e3af 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c @@ -948,10 +948,16 @@ static void do_monitor_cpu_combined(void) printk(KERN_WARNING "Warning ! Temperature way above m...
856f70a368022645a08fbecc5d30ec218f13232d
Analyze and fix the following issue in the Linux kernel code: powerpc/booke: Fix a couple typos in the advanced ptrace code
Problem Details: powerpc/booke: Fix a couple typos in the advanced ptrace code Found and fixed a couple typos in the advanced ptrace patches. (These patches are currently in benh's next tree.) Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: linuxppc-d...
```diff diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 8808d307fe7e..414d434a66d0 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h @@ -421,8 +421,8 @@ /* Bit definitions related to the DBCR2. */ #define DBCR2_DAC1US 0xC0000000...
5b72d74ce2fccca2a301de60f31b16ddf5c93984
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix SMP build with disabled CPU hotplugging.
Problem Details: Compiling 2.6.33 with SMP enabled and HOTPLUG_CPU disabled gives me the following link errors: LD init/built-in.o LD .tmp_vmlinux1 arch/powerpc/platforms/built-in.o: In function `.smp_xics_setup_cpu': smp.c:(.devinit.text+0x88): undefined reference to `.set_cpu_current_state' smp.c:(.dev...
```diff diff --git a/arch/powerpc/platforms/pseries/offline_states.h b/arch/powerpc/platforms/pseries/offline_states.h index 22574e0d9d91..202d8692c6a2 100644 --- a/arch/powerpc/platforms/pseries/offline_states.h +++ b/arch/powerpc/platforms/pseries/offline_states.h @@ -9,10 +9,30 @@ enum cpu_state_vals { CPU_MAX_OFF...
d88dca79d3852a3623f606f781e013d61486828a
Analyze and fix the following issue in the Linux kernel code: tipc: fix endianness on tipc subscriber messages
Problem Details: Remove htohl implementation from tipc I was working on forward porting the downstream commits for TIPC and ran accross this one: http://tipc.cslab.ericsson.net/cgi-bin/gitweb.cgi?p=people/allan/tipc.git;a=commitdiff;h=894279b9437b63cbb02405ad5b8e033b51e4e31e I was going to just take it, when I looked...
```diff diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index ac91f0dfa144..ff123e56114a 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c @@ -75,19 +75,6 @@ struct top_srv { static struct top_srv topsrv = { 0 }; -/** - * htohl - convert value to endianness used by destination - * @in: value to convert - *...
e9dcd1613f0ac0b3573b7d813a2c5672cd8302eb
Analyze and fix the following issue in the Linux kernel code: can: fix bfin_can build error after alloc_candev() change
Problem Details: Looks like commit a6e4bc530403 didn't include updates to drivers so the Blackfin CAN driver fails to build now. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@da...
```diff diff --git a/drivers/net/can/bfin_can.c b/drivers/net/can/bfin_can.c index bf7f9ba2d903..866905fa4119 100644 --- a/drivers/net/can/bfin_can.c +++ b/drivers/net/can/bfin_can.c @@ -26,6 +26,7 @@ #define DRV_NAME "bfin_can" #define BFIN_CAN_TIMEOUT 100 +#define TX_ECHO_SKB_MAX 1 /* * transmit and receive...
28b2774a0d5852236dab77a4147b8b88548110f1
Analyze and fix the following issue in the Linux kernel code: tcp: Fix tcp_make_synack()
Problem Details: Commit 4957faad (TCPCT part 1g: Responder Cookie => Initiator), part of TCP_COOKIE_TRANSACTION implementation, forgot to correctly size synack skb in case user data must be included. Many thanks to Mika Pentillä for spotting this error. Reported-by: Penttillä Mika <mika.penttila@ixonos.com> Signed-of...
```diff diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 4a1605d3f909..f181b78f2385 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2395,13 +2395,17 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, struct tcp_extend_values *xvp = tcp_xv(rvp); struct inet_...
f6bb13aa1ea3bb26a4c783822347873f085b9000
Analyze and fix the following issue in the Linux kernel code: ACPI / EC / PM: Close race between EC and resume from hibernation
Problem Details: There is a race between resume from hibernation and the EC driver that may result in restoring the hibernation image in the middle of an EC transaction in progress, which in turn may lead to unpredictable behavior of the platform. To remove that race condition, add a helpers for suspending and resumin...
```diff diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index d6471bb6852f..19f93e114225 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -76,8 +76,9 @@ enum ec_command { enum { EC_FLAGS_QUERY_PENDING, /* Query is pending */ EC_FLAGS_GPE_STORM, /* GPE storm detected */ - EC_FLAGS_HANDLERS_INSTALLED /...
7dd08a570dcf45d52155996fee688405635ee481
Analyze and fix the following issue in the Linux kernel code: nfs: fix unlikely memory leak
Problem Details: I'll admit that it's unlikely for the first allocation to fail and the second one to succeed. I won't be offended if you ignore this patch. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
```diff diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index eda74c42d552..f9254fb0c9d0 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5107,6 +5107,7 @@ static int nfs41_proc_async_sequence(struct nfs_client *clp, res = kzalloc(sizeof(*res), GFP_KERNEL); if (!args || !res) { kfree(args); + kfree...
77d3926306bf4eecac50150ba5625797219f14ba
Analyze and fix the following issue in the Linux kernel code: qlogicpti: Remove slash in QlogicPTI irq name
Problem Details: qlogicpti driver registers its irq with a name containing slash. This results in [ 71.049735] WARNING: at fs/proc/generic.c:316 __xlate_proc_name+0xa8/0xb8() [ 71.132815] name 'Qlogic/PTI' because proc_mkdir with the name of the irq fails. Fix it by just removing the slash from irq name. Discov...
```diff diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index fa34b92850a6..1b8217076b0e 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -738,7 +738,7 @@ static int __devinit qpti_register_irq(struct qlogicpti *qpti) * sanely maintain. */ if (request_irq(qpti->irq, qpti_...
9837638727488922727b0cfd438039fa73364183
Analyze and fix the following issue in the Linux kernel code: net: fix route cache rebuilds
Problem Details: We added an automatic route cache rebuilding in commit 1080d709fb9d8cd43 but had to correct few bugs. One of the assumption of original patch, was that entries where kept sorted in a given way. This assumption is known to be wrong (commit 1ddbcb005c395518 gave an explanation of this and corrected a le...
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index b2ba5581d2ae..d9b40248b97f 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -146,7 +146,6 @@ static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst); static void ipv4_link_failure(struct sk_buff *skb); static void ip_rt_update_pmtu...
addd5abf49be31787aeb6203d266e0bd31a3fadd
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix bios version check
Problem Details: Bios sub version from unified fw image is calculated incorrect. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 21a6e9f3dac5..7c34e4e29b3f 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c @@ -847,7 +847,7 @@ qlcnic_get_bios_version(struct qlcnic_adapter *adapter) bios_ver = cpu_to_le32(*((u32 *) (&...
9ab17b3968f9521bb4fffd8767953d2b0148aad0
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix multicast handling
Problem Details: For promiscuous mode, driver send request to device for deleting multicast addresses and again it send request for adding them back while exiting from this mode, this is bad for performance. Just setting device in promiscuous mode is enough, no need to del/add multicast addresses. Signed-off-by: Suche...
```diff diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c index e95646bf7d56..da00e162b6d3 100644 --- a/drivers/net/qlcnic/qlcnic_hw.c +++ b/drivers/net/qlcnic/qlcnic_hw.c @@ -398,20 +398,16 @@ qlcnic_sre_macaddr_change(struct qlcnic_adapter *adapter, u8 *addr, return qlcnic_send_cmd_descs(...
8bae5698616ac336938684ce7a7370299bd55d01
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix tx csum status
Problem Details: Kernel default tx csum function (ethtool_op_get_tx_csum) doesn't show correct csum status. It takes various FLAGS (NETIF_F_ALL_CSUM) in account to show tx csum status, which driver doesn't set while disabling tx csum. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: A...
```diff diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c index 8da6ec8c13b9..ef12792a88be 100644 --- a/drivers/net/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/qlcnic/qlcnic_ethtool.c @@ -785,6 +785,11 @@ qlcnic_get_ethtool_stats(struct net_device *dev, } } +static u32 qlcnic_get...
89c0ac7cab2440a771ba1e2ab953186bc9c29786
Analyze and fix the following issue in the Linux kernel code: sound: fix opti92x-ad1848 build
Problem Details: Fix 'else' placement in ifdef block so that build succeeds: sound/isa/opti9xx/opti92x-ad1848.c:221: error: 'else' without a previous 'if' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> 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 becd90d7536d..4d2d0405bdc7 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -217,8 +217,9 @@ static int __devinit snd_opti9xx_init(struct snd_opti9xx *chip, if (isapnp && chip-...
0d9dc7c8b9b7fa0f53647423b41056ee1beed735
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_transport_fc: Fix synchronization issue while deleting vport
Problem Details: The issue occur while deleting 60 virtual ports through the sys interface /sys/class/fc_vports/vport-X/vport_delete. It happen while in a mistake each request sent twice for the same vport. This interface is asynchronous, entering the delete request into a work queue, allowing more than one request to ...
```diff diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 79660ee3e211..1d5b72173dd8 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -1232,6 +1232,15 @@ store_fc_vport_delete(struct device *dev, struct device_attribute *attr, { struct fc_vp...
8b408fe4f853dcfa18d133aa4cf1d7546b4c3870
Analyze and fix the following issue in the Linux kernel code: x86/amd-iommu: Use helper function to destroy domain
Problem Details: In the amd_iommu_domain_destroy the protection_domain_free function is partly reimplemented. The 'partly' is the bug here because the domain is not deleted from the domain list. This results in use-after-free errors and data-corruption. Fix it by just using protection_domain_free instead. Cc: stable@k...
```diff diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 0c0425436a73..b06f29e275e9 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -2380,9 +2380,7 @@ static void amd_iommu_domain_destroy(struct iommu_domain *dom) free_pagetable(domain); - domain_id_free(d...
40d1f0048289b1baed859baee06878417fae540e
Analyze and fix the following issue in the Linux kernel code: sh: Fix up uncached offset for legacy 29-bit mode.
Problem Details: The uncached_start was being set up properly for 32-bit but managed to break 29-bit in the process, fix it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/uncached.c b/arch/sh/mm/uncached.c index cf20a5c5136a..2ef57efeb225 100644 --- a/arch/sh/mm/uncached.c +++ b/arch/sh/mm/uncached.c @@ -1,6 +1,7 @@ #include <linux/init.h> #include <asm/sizes.h> #include <asm/page.h> +#include <asm/addrspace.h> /* * This is the offset of the uncac...
1ffaa640c6ba135aafc91841204e41846eae6841
Analyze and fix the following issue in the Linux kernel code: [S390] smsgiucv_app: deliver z/VM CP special messages (SMSG) as uevents
Problem Details: The smsgiucv_app driver registers a callback with the smsgiucv driver to receive z/VM CP special messages (SMSG) starting with "APP". When the callback is called for special messages, the driver creates an uevent for the received message. The uevent consists of additional environment data containing ...
```diff diff --git a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig index cb909a5b5047..977bb4d4ed15 100644 --- a/drivers/s390/net/Kconfig +++ b/drivers/s390/net/Kconfig @@ -43,6 +43,16 @@ config SMSGIUCV Select this option if you want to be able to receive SMSG messages from other VM guest systems. +con...
09003ed90a2880de7e36b170a9298dd10d53e322
Analyze and fix the following issue in the Linux kernel code: [S390] smsgiucv: declare char pointers as "const"
Problem Details: Declare the smsgiucv prefix char pointer as "const" and use use const char pointers in callback functions. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index 76a3637b88e0..f16bd04e39e9 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c @@ -374,7 +374,7 @@ static struct ctl_table cmm_dir_table[] = { #ifdef CONFIG_CMM_IUCV #define SMSG_PREFIX "CMM" static void -cmm_smsg_target(char *from, char *msg) +...
a290156f479af436f94ac23f5729a1e33c94293b
Analyze and fix the following issue in the Linux kernel code: [S390] cio: fix init_count in case of recognition after steal lock
Problem Details: After we try to steal a lock on a ccw device in boxed state, we have to restart device recognition and potentially reprobing. In this case ccw_device_init_count was erroneously decreased twice. This patch fixes the issue. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin ...
```diff diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index c6abb75c4615..6d229f3523a0 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -764,7 +764,7 @@ static void sch_create_and_recog_new_device(struct subchannel *sch) static void io_subchannel_register(struct ccw_device...
596a95cdf0ba35ea353fb5b65750f596d712041e
Analyze and fix the following issue in the Linux kernel code: [S390] uaccess: make sure copy_from_user_overflow is builtin
Problem Details: If there is no in kernel image caller modules will suffer: ERROR: "copy_from_user_overflow" [net/core/pktgen.ko] undefined! ERROR: "copy_from_user_overflow" [net/can/can-raw.ko] undefined! ERROR: "copy_from_user_overflow" [fs/cifs/cifs.ko] undefined! Signed-off-by: Heiko Carstens <heiko.carstens@de.i...
```diff diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile index cd54a1c352af..761ab8b56afc 100644 --- a/arch/s390/lib/Makefile +++ b/arch/s390/lib/Makefile @@ -2,7 +2,8 @@ # Makefile for s390-specific library files.. # -lib-y += delay.o string.o uaccess_std.o uaccess_pt.o usercopy.o +lib-y += delay.o str...
5311114d4867113c00f78829d4ce14be458ec925
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix input source elements of secondary ADCs on Realtek
Problem Details: Since alc_auto_create_input_ctls() doesn't set the elements for the secondary ADCs, "Input Source" elemtns for these also get empty, resulting in buggy outputs of alsactl like: control.14 { comment.access 'read write' comment.type ENUMERATED comment.count 1 iface MIXER name 'Input Source' ...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index dcd8a2cadd99..3a8371990d75 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -411,6 +411,8 @@ static int alc_mux_enum_info(struct snd_kcontrol *kcontrol, unsigned int mux_idx = snd_ctl_get_ioffidx(...
50ae0aa8f55813b2cc5e5b7f589f328b8fcd45ec
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix wrong model range check for ALC268
Problem Details: Fix a wrong value passed to snd_hda_check_board_codec_sid_config() as the upper-limit in parse_alc268(), so that any wrong value can't be passed. So far, no bogus value was set in the quirk entries, so this won't give any behavioral changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 5d2fbb87b871..dcd8a2cadd99 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -13201,7 +13201,7 @@ static int patch_alc268(struct hda_codec *codec) if (board_config < 0 || board_config >= ALC268_M...
39f3be72c1a1b20d7e6e35717afa2ddb89259650
Analyze and fix the following issue in the Linux kernel code: [WATCHDOG] i6300esb: fix unlock register with
Problem Details: Before you can read or write from the i6300esb memeory mapped registers, you need to unlock these. This is done by writing the magic numbers 0x80 and 0x86 to the reload register. The size of the reload register is 32bit though. Also binary 11 is hex 0x03 and not 0x11. Signed-off-by: Wim Van Sebroeck ...
```diff diff --git a/drivers/watchdog/i6300esb.c b/drivers/watchdog/i6300esb.c index 2fbe7fea7ee6..3e00dc5b5a20 100644 --- a/drivers/watchdog/i6300esb.c +++ b/drivers/watchdog/i6300esb.c @@ -65,7 +65,7 @@ /* Config register bits */ #define ESB_WDT_REBOOT (0x01 << 5) /* Enable reboot on timeout */ #define...
e93bc1a0cab3e54e3c1947e01c8e73892e35630d
Analyze and fix the following issue in the Linux kernel code: Revert "kbuild: specify absolute paths for cscope"
Problem Details: This reverts commit eb8f844c0a41c4529a7d06b7801296eca9ae67aa. Ian Campbell writes: > I keep my kernel source tree on a more powerful build box where I run my > builds etc (including "make cscope") but run my editor from my > workstation with an NFS mount to the source. This worked fine for me > using r...
```diff diff --git a/scripts/tags.sh b/scripts/tags.sh index 868b4c8fc25f..8509bb512935 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -18,6 +18,8 @@ ignore="( -name SCCS -o -name BitKeeper -o -name .svn -o \ -prune -o" # Do not use full path if we do not use O=.. builds +# Use make O=. {tags|cscop...
a6c366324cacd5f71107dd01362b995a1c67b1ad
Analyze and fix the following issue in the Linux kernel code: kbuild: Do not unnecessarily regenerate modules.builtin
Problem Details: Only regenerate it if the configuration has changed. Also, do this after the modules build to fix errors with some weird Makefiles that are generated during build. Reported-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/Makefile b/Makefile index 2e74a68878c7..160cadadc471 100644 --- a/Makefile +++ b/Makefile @@ -882,9 +882,6 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ; PHONY += $(vmlinux-dirs) $(vmlinux-dirs): prepare scripts $(Q)$(MAKE) $(build)=$@ -ifdef CONFIG_MODULES - $(Q)$...
c2282adbdea3548ae0271c1b1b2deec5f56ad224
Analyze and fix the following issue in the Linux kernel code: Documentation: fix block/biodoc.txt dma mapping description
Problem Details: - It looks incorrect to use blk_rq_map_sg with pci_map_page here about DMA mappings. dma_map_sg? - better to use dma_map_page instead of pci_map_page. http://marc.info/?l=linux-kernel&m=126596737604808&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <j...
```diff diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 6fab97ea7e6b..508b5b2b0289 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt @@ -1162,8 +1162,8 @@ where a driver received a request ala this before: As mentioned, there is no virtual mapping of ...
8bf8c376ab2eefaf0386f4e003e720e1434fa43d
Analyze and fix the following issue in the Linux kernel code: blkdev: fix merge_bvec_fn return value checks v2
Problem Details: merge_bvec_fn() returns bvec->bv_len on success. So we have to check against this value. But in case of fs_optimization merge we compare with wrong value. This patch must be included in b428cd6da7e6559aca69aa2e3a526037d3f20403 But accidentally i've forgot to add this in the initial patch. To make thin...
```diff diff --git a/fs/bio.c b/fs/bio.c index dc17afd672e3..d89e0199dc0d 100644 --- a/fs/bio.c +++ b/fs/bio.c @@ -555,7 +555,7 @@ static int __bio_add_page(struct request_queue *q, struct bio *bio, struct page .bi_rw = bio->bi_rw, }; - if (q->merge_bvec_fn(q, &bvm, prev) < len) { + if (q->merge_bvec...
2abbf4391fb56dfa97221ed6796782537d15196f
Analyze and fix the following issue in the Linux kernel code: ALSA: hdmi - show debug message on changing audio infoframe
Problem Details: Also change printk level for the two others. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index b2ab39670dda..2c2bafbf0258 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -398,9 +398,8 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec, hda_nid_t nid, } snd_print_channel_allocation...
62e877b893e6350c900d381f353aa62ed48dcc97
Analyze and fix the following issue in the Linux kernel code: sysfs: fix for thinko with sysfs_bin_attr_init()
Problem Details: After merging the final tree, today's linux-next build (powerpc allyesconfig) failed like this: drivers/pci/pci-sysfs.c: In function 'pci_create_legacy_files': drivers/pci/pci-sysfs.c:645: error: lvalue required as unary '&' operand drivers/pci/pci-sysfs.c:658: error: lvalue required as unary '&' oper...
```diff diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 9fa183cfb0e9..de296452c957 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -642,7 +642,7 @@ void pci_create_legacy_files(struct pci_bus *b) if (!b->legacy_io) goto kzalloc_err; - sysfs_bin_attr_init(&b->legacy_io);...
f8d4f618fed5a4978afada52166bc2efaf7656d1
Analyze and fix the following issue in the Linux kernel code: sysfs: Serialize updates to the vfs inode
Problem Details: The vfs depends upon filesystem methods to update the vfs inode. Sysfs adds to the normal number of places where the vfs inode is updated by also updatng the vfs inode in sysfs_refresh_inode. Typically the inode mutex is used to serialize updates to the vfs inode, but grabbing the inode mutex in sys...
```diff diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 6a06a1d1ea7b..0d09f6c6efab 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -111,20 +111,20 @@ int sysfs_setattr(struct dentry *dentry, struct iattr *iattr) if (!sd) return -EINVAL; + mutex_lock(&sysfs_mutex); error = inode_change_ok(inode, ...
a07e4156a2ee6359d31a44946d7ee7f85dbf6bca
Analyze and fix the following issue in the Linux kernel code: sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on dynamic attributes
Problem Details: These are the non-static sysfs attributes that exist on my test machine. Fix them to use sysfs_attr_init or sysfs_bin_attr_init as appropriate. It simply requires making a sysfs attribute present to see this. So this is a little bit tedious but otherwise not too bad. Signed-off-by: Eric W. Biederm...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index a8aacd4b513c..28cba46bf32c 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -2044,6 +2044,7 @@ static __init void mce_init_banks(void) struct mce_bank *b = &mce_banks[i]; struct sy...
3c31f07ad0dab02fe17195d32a965d57fd947707
Analyze and fix the following issue in the Linux kernel code: Driver core: Fix first line of kernel-doc for a few functions
Problem Details: The function name must be followed by a space, hypen, space, and a short description. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 07977484cb3c..d0dc26ad5387 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -613,7 +613,7 @@ request_firmware_work_func(void *arg) } /** - * request_firmware_nowait: asynchronous version of requ...
0a965eb9f69caf0fb331d45556da8bab1c8dcb11
Analyze and fix the following issue in the Linux kernel code: UIO: minor Kconfig fixes
Problem Details: Two trivial fixes for the Userspace IO Kconfig file: 1) uio_sercos3 is a PCI driver, so let it depend on PCI. 2) "default n" under UIO_PCI_GENERIC is luxury since it is already the default. Acked-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by:...
```diff diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig index 069b1443be6c..6dd2a290f323 100644 --- a/drivers/uio/Kconfig +++ b/drivers/uio/Kconfig @@ -74,6 +74,7 @@ config UIO_AEC config UIO_SERCOS3 tristate "Automata Sercos III PCI card driver" + depends on PCI help Userspace I/O interface for the S...
831fad2f75f0d7bfc339de81173e7068a3c72276
Analyze and fix the following issue in the Linux kernel code: Driver core: make struct platform_driver.id_table const
Problem Details: This fixes a warning on several pxa based machines: arch/arm/mach-pxa/ssp.c:475: warning: initialization discards qualifiers from pointer target type Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Vikram Dhillon <dhillonv10@gmail.com> Acked-by: Eric Miao <eric.y.miao@gmai...
```diff diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 937d58021d1b..575e08bc6630 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -636,7 +636,7 @@ static int platform_uevent(struct device *dev, struct kobj_uevent_env *env) } static const struct platform_device_id *platfor...
6c1733aca0b48db4d0e660d54976a1cca25b5eaf
Analyze and fix the following issue in the Linux kernel code: sysdev: fix up the probe/release attributes
Problem Details: These should be sysdev attributes, not class attributes. This patch should resolve the problem. Thanks to Stephen Rothwell for pointing out the problem. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 9121c77b77fa..7036e8e96ab8 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -79,24 +79,24 @@ void unregister_cpu(struct cpu *cpu) } #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE -static ssize_t cpu_probe_store(struct class *class, - struct clas...
1e5289c97bba2d8ee7239a416bc3f28743362cd9
Analyze and fix the following issue in the Linux kernel code: sysfs: Cache the last sysfs_dirent to improve readdir scalability v2
Problem Details: When sysfs_readdir stops short we now cache the next sysfs_dirent to return to user space in filp->private_data. There is no impact on the rest of sysfs by doing this and in the common case it allows us to pick up exactly where we left off with no seeking. Additionally I drop and regrab the sysfs_mute...
```diff diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 699f371b9f12..5c4703d751b5 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c @@ -837,11 +837,46 @@ static inline unsigned char dt_type(struct sysfs_dirent *sd) return (sd->s_mode >> 12) & 15; } +static int sysfs_dir_release(struct inode *inode, struct file ...
5fbcae57db69128c14080a7a5a42d0626bfe155c
Analyze and fix the following issue in the Linux kernel code: sysdev: fix missing s390 conversion
Problem Details: In linux-next "sysdev: Pass attribute in sysdev_class attributes show/store" forgot to convert one place in s390 code. Here is the missing part. Cc: Andi Kleen <ak@linux.intel.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: ...
```diff diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index e2121099f03b..29f65bce55e1 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -1033,7 +1033,9 @@ static ssize_t __ref rescan_store(struct sysdev_class *class, static SYSDEV_CLASS_ATTR(rescan, 0200, NULL, rescan_store); #endif ...
8564a6c140317de04a71eb203bdbb58845d69f9c
Analyze and fix the following issue in the Linux kernel code: sysdev: Fix type of sysdev class attribute in memory driver
Problem Details: This attribute is really a sysdev_class attribute, not a plain class attribute. They are identical in layout currently, but this might not always be the case. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/base/memory.c b/drivers/base/memory.c index bd025059711f..563656ad75a1 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -309,17 +309,18 @@ static SYSDEV_ATTR(removable, 0444, show_mem_removable, NULL); * Block size attribute stuff */ static ssize_t -print_block_size(st...
20ef9f46a9abe3c25d9f2834f6cc86bfab46d609
Analyze and fix the following issue in the Linux kernel code: kset-example: Spelling fixes.
Problem Details: No change in functionality. Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/samples/kobject/kset-example.c b/samples/kobject/kset-example.c index 45b7d56fb541..7c6088140528 100644 --- a/samples/kobject/kset-example.c +++ b/samples/kobject/kset-example.c @@ -127,7 +127,7 @@ static struct foo_attribute foo_attribute = __ATTR(foo, 0666, foo_show, foo_store); /* - * More ...
a115bc070b1fc57ab23f3972401425927b5b465c
Analyze and fix the following issue in the Linux kernel code: kobject-example: Spelling fixes.
Problem Details: No change in functionality. Signed-off-by: Radu Voicilas <rvoicilas@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/samples/kobject/kobject-example.c b/samples/kobject/kobject-example.c index 8d9b55a12023..86ea0c3ad975 100644 --- a/samples/kobject/kobject-example.c +++ b/samples/kobject/kobject-example.c @@ -44,7 +44,7 @@ static struct kobj_attribute foo_attribute = __ATTR(foo, 0666, foo_show, foo_store); /...
77d3d7c1d561f49f755d7390f0764dff90765974
Analyze and fix the following issue in the Linux kernel code: driver-core: fix race condition in get_device_parent()
Problem Details: sysfs is creating several devices in cuse class concurrently and with CONFIG_SYSFS_DEPRECATED turned off, it triggers the following oops. BUG: unable to handle kernel NULL pointer dereference at 0000000000000038 IP: [<ffffffff81158b0a>] sysfs_addrm_start+0x4a/0xf0 PGD 75bb067 PUD 75be067 PMD 0 Oop...
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index 282025770429..fb4bc4f5151c 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -607,6 +607,7 @@ static struct kobject *get_device_parent(struct device *dev, int retval; if (dev->class) { + static DEFINE_MUTEX(gdp_mutex); struct kob...
138860b95359feee49a31fb12be87825e4cd84ac
Analyze and fix the following issue in the Linux kernel code: seq_file: fix new kernel-doc warnings
Problem Details: Fix kernel-doc notation in new seq-file functions and correct spelling. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/seq_file.c b/fs/seq_file.c index 5afd554efad3..e1f437be6c3c 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c @@ -734,7 +734,7 @@ EXPORT_SYMBOL(seq_hlist_start_head); * seq_hlist_next - move to the next position of the hlist * @v: the current iterator * @head: the head of the hlist - * @po...
10cc2b50eb4b01ca4dc014af2094d28b4ebe20d7
Analyze and fix the following issue in the Linux kernel code: bridge: Fix RCU race in br_multicast_stop
Problem Details: Thanks to Paul McKenny for pointing out that it is incorrect to use synchronize_rcu_bh to ensure that pending callbacks have completed. Instead we should use rcu_barrier_bh. Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by...
```diff diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index a1ffe1582c9a..12ce1eaa4f3e 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -1135,7 +1135,7 @@ void br_multicast_stop(struct net_bridge *br) if (mdb->old) { spin_unlock_bh(&br->multicast_lock); - synchroniz...
30765d0502905a9248e5de72fc7ac83c23422861
Analyze and fix the following issue in the Linux kernel code: cpmac: fix the receiving of 802.1q frames
Problem Details: Despite what the comment above CPMAC_SKB_SIZE says, the hardware also needs to account for the FCS length in a received frame. This patch fix the receiving of 802.1q frames which have 4 more bytes. While at it unhardcode the definition and use the one from if_vlan.h. Signed-off-by: Florian Fainelli <f...
```diff diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index 9d489421535e..55ee055d3321 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c @@ -28,6 +28,7 @@ #include <linux/delay.h> #include <linux/netdevice.h> +#include <linux/if_vlan.h> #include <linux/etherdevice.h> #include <linux/ethtool.h> ...
0e2b807234c42fab59f98ec913db30dfda0e63a7
Analyze and fix the following issue in the Linux kernel code: irda-usb: add error handling and fix leak
Problem Details: If the call to kcalloc() fails then we should return -ENOMEM. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index e8e33bb9d876..2c9b3af16612 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c @@ -1651,6 +1651,8 @@ static int irda_usb_probe(struct usb_interface *intf, self->rx_urb = kcalloc(self->max_rx_urb, sizeof(struc...
b96b894c518bc7399e6b86b635b5e8cd7356a8e9
Analyze and fix the following issue in the Linux kernel code: fix a race in ks8695_poll
Problem Details: fix a race at the end of NAPI processing in ks8695_poll() function. Signed-off-by:Figo.zhang <figo1802@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c index 8ca639127dbc..a1d4188c430b 100644 --- a/drivers/net/arm/ks8695net.c +++ b/drivers/net/arm/ks8695net.c @@ -575,9 +575,9 @@ static int ks8695_poll(struct napi_struct *napi, int budget) if (work_done < budget) { unsigned long flags; ...
f9fed7cd7efaa0d050f21f6f9ed532d3143b7369
Analyze and fix the following issue in the Linux kernel code: USB: Fix s3c-hsotg build following Samsung platform header moves
Problem Details: Fix a reference to regs-sys.h got missed in the reorganisation of the Samsung platform headers targetted for 2.6.34. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 4b5dbd0127f5..458f7651957d 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -30,7 +30,7 @@ #include <plat/regs-usb-hsotg-phy.h> #include <plat/regs-usb-hsotg.h> -#include <plat/regs-sys.h> +...
ad0194e8d624df67a970a36e8ef9e61514e25553
Analyze and fix the following issue in the Linux kernel code: i2c-pnx: fix setting start/stop condition
Problem Details: The start/stop condtions are set in different places repetedly in the i2c-pnx driver. Beside in i2c_pnx_start and i2c_pnx_stop the start/stop bit are also set during the transfer of a i2c message in the master_xmit/rcv calls. This is wrong since we can't set the start/stop condition during the transac...
```diff diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index 2b0bd0b042d6..9532dee6b580 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c @@ -172,12 +172,6 @@ static int i2c_pnx_master_xmit(struct i2c_pnx_algo_data *alg_data) /* We still have something to talk abo...
2c08583c6a6b4c5f5dea4cb0931eca82af7db6fe
Analyze and fix the following issue in the Linux kernel code: mfd: Fix ucb1x00 build failure for collie_defconfig
Problem Details: This patch fixes a build failure[1], by adding the missing semaphore.h include References: [1] http://kisskb.ellerman.id.au/kisskb/buildresult/2234322/ Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index 252b74188ec2..b281217334eb 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c @@ -27,6 +27,7 @@ #include <linux/mutex.h> #include <linux/mfd/ucb1x00.h> #include <linux/gpio.h> +#include <linux/semaphore.h> #in...
860fb8c134ebca9be8bc2ddd2b13e19ac10c192e
Analyze and fix the following issue in the Linux kernel code: mfd: Fix lpc_sch related depends/selects, fix build error
Problem Details: LPC_SCH is selected by GPI_SCH and I2C_ISCH, even when PCI is not enabled, but LPC_SCH depends on PCI, so make GPI_SCH and I2C_ISCH also depend on PCI. Those 2 selects also need to select what LPC_SCH selects, since kconfig does not follow selects. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com...
```diff diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 60cb3632c8fd..fee678f74a19 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -96,7 +96,8 @@ config GPIO_VR41XX config GPIO_SCH tristate "Intel SCH GPIO" - depends on GPIOLIB + depends on GPIOLIB && PCI + select MFD_CORE select L...
8e7aafe41be2a7cd5c181ed68876e9ec55ccdba7
Analyze and fix the following issue in the Linux kernel code: gpio: Fix sch_gpio warning
Problem Details: We need to check for gpiochip_remove() errors. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/gpio/sch_gpio.c b/drivers/gpio/sch_gpio.c index 761071ae3596..583521352c16 100644 --- a/drivers/gpio/sch_gpio.c +++ b/drivers/gpio/sch_gpio.c @@ -229,7 +229,10 @@ static int __devinit sch_gpio_probe(struct platform_device *pdev) return 0; err_sch_gpio_resume: - gpiochip_remove(&sch_gpi...
11a441ce82d6ffecfd39b324024de0cd630b36c1
Analyze and fix the following issue in the Linux kernel code: mfd: Introduce remove_script function for twl4030
Problem Details: New function twl4030_remove_script(u8 flags) takes a script type as defined in twl.h and prevents any script already loaded in that position from running. This is accomplished by programming SEQ_ADD_* to 0x3f, the END_OF_SCRIPT value, where SEQ_ADD_* is determined by flags. (Future) users of this fun...
```diff diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c index 5b045ff4a2c2..7efa8789a3a2 100644 --- a/drivers/mfd/twl4030-power.c +++ b/drivers/mfd/twl4030-power.c @@ -461,6 +461,56 @@ out: return err; } +int twl4030_remove_script(u8 flags) +{ + int err = 0; + + err = twl_i2c_write_u8(TWL403...
14e5c82ca32870698b7cbe54196e00682d929ca5
Analyze and fix the following issue in the Linux kernel code: mfd: Fix twl_has_pwrbutton typo
Problem Details: Change the typo CONFIG_INPUT_TWL4030_PWBUTTON_MODULE in the twl_has_pwrbutton definition to CONFIG_INPUT_TWL4030_PWRBUTTON_MODULE. Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com> Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de> Signed-off-by: Samuel Ortiz <sameo@l...
```diff diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index d81003f4867e..942a1e837819 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -123,7 +123,7 @@ #define TWL_NUM_SLAVES 4 #if defined(CONFIG_INPUT_TWL4030_PWRBUTTON) \ - || defined(CONFIG_INPUT_TWL4030_PWBUTTON_MODULE) + || d...
7731074ab21745cde00578148ce760df107eaf27
Analyze and fix the following issue in the Linux kernel code: mfd: Fix WM8994 error handling
Problem Details: This patch fixes wrong goto statement for error handling on probe. Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 299c1af1334e..844e1c1b7d90 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c @@ -305,14 +305,14 @@ static int wm8994_device_init(struct wm8994 *wm8994, unsigned long id, int irq) wm8994->supplies); if (ret != 0...
ca229f1b624a72a1c9eb1d94bbca7a0c094a1b8b
Analyze and fix the following issue in the Linux kernel code: mfd: Fix debugfs code in AB3100 OTP driver
Problem Details: This fixes the aged and unreachable debugfs code in the AB3100 OTP driver so that it's (A) reachable and (B) works. Bug detected in parallell by Christoph Egger using VAMOS and Robert P. J. Day by his kernel scanning script. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Cc: Christoph Egg...
```diff diff --git a/drivers/mfd/ab3100-otp.c b/drivers/mfd/ab3100-otp.c index 0499b2031a2c..b603469dff69 100644 --- a/drivers/mfd/ab3100-otp.c +++ b/drivers/mfd/ab3100-otp.c @@ -13,6 +13,7 @@ #include <linux/platform_device.h> #include <linux/mfd/ab3100.h> #include <linux/debugfs.h> +#include <linux/seq_file.h> ...
dbbe33e99f41a6f07e61dbce455964112d8ac72b
Analyze and fix the following issue in the Linux kernel code: headers_check: fix perl warnings
Problem Details: According to PBP; best way practice is to use local reference for file handle and three argument open. Also perl prototypes are a mistake. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: WANG Cong <amwang@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <ak...
```diff diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index db1dd7a549f2..50d6cfd1fa77 100644 --- a/scripts/headers_check.pl +++ b/scripts/headers_check.pl @@ -28,11 +28,12 @@ my $lineno = 0; my $filename; foreach my $file (@files) { - local *FH; $filename = $file; - open(FH, "<$filename") or d...
91416cfdf98bdbc828fd3e5ca7208beba5979d63
Analyze and fix the following issue in the Linux kernel code: export_report: fix perl warnings
Problem Details: Use local file handles, use three argument open. Don't modify arguments in perl grep (use sed instead) Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: WANG Cong <amwang@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-...
```diff diff --git a/scripts/export_report.pl b/scripts/export_report.pl index 705b5ba7c152..04dce7c15f83 100644 --- a/scripts/export_report.pl +++ b/scripts/export_report.pl @@ -49,10 +49,10 @@ sub usage { } sub collectcfiles { - my @file = `cat .tmp_versions/*.mod | grep '.*\.ko\$'`; - @file = grep ...
9c49fd307a6cb2d3255f9441bce5b7cb08dff79e
Analyze and fix the following issue in the Linux kernel code: profile2linkerlist: fix perl warnings
Problem Details: Turn on strict checking. Simplify code by using "unless" statement. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: WANG Cong <amwang@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/profile2linkerlist.pl b/scripts/profile2linkerlist.pl index cb4260ebdb91..6943fa7cc95b 100644 --- a/scripts/profile2linkerlist.pl +++ b/scripts/profile2linkerlist.pl @@ -7,15 +7,13 @@ # usage: # readprofile | sort -rn | perl profile2linkerlist.pl > functionlist # +use strict; while (...
3da27157316cbcce326d56faa0a7a5cadc7ae507
Analyze and fix the following issue in the Linux kernel code: checkincludes: fix perlcritic warnings
Problem Details: Turn on strict checking. Use local file handles. Use three argument open. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Cc: Cong Wang <amwang@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
```diff diff --git a/scripts/checkincludes.pl b/scripts/checkincludes.pl index 676ddc07d6fa..97b2c6143fe4 100755 --- a/scripts/checkincludes.pl +++ b/scripts/checkincludes.pl @@ -11,6 +11,8 @@ # you do have real dups and do not have them under #ifdef's. You # could also just review the results. +use strict; + sub ...
1f2a144f5ab5e836b5ca8f67bd76b759fa947751
Analyze and fix the following issue in the Linux kernel code: scripts: improve checkstack
Problem Details: Cleanup checkstack script: * Turn on strict checking * Fix resulting error message because the declaration syntax was incorrect. * Remove incorrect and misleading use of prototype - prototype not required for this type of sort function because $a and $b are being used in this cont...
```diff diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index 14ee68e991dd..1afff6658a7d 100755 --- a/scripts/checkstack.pl +++ b/scripts/checkstack.pl @@ -21,6 +21,8 @@ # # TODO : Port to all architectures (one regex per arch) +use strict; + # check for arch # # $re is used for two matches: @@ -104,1...
1dace8c801ac531022bd31a7316a6b4351837617
Analyze and fix the following issue in the Linux kernel code: vhost: fix error path in vhost_net_set_backend
Problem Details: An error could cause vhost_net_set_backend to exit without unlocking vq->mutex. Fix this. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
```diff diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index ad37da2b6cb5..fcafb6b170fb 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -508,12 +508,12 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) /* Verify that ring has been setup correctly. */ if (!vhost_...
8d2b09f5b0de2c0e37f50d04980bc81098988239
Analyze and fix the following issue in the Linux kernel code: ARM: 5961/1: ux500: fix CLKRST addresses
Problem Details: Correct the base addresses of the CLKRST registers. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h index 6da650202dc7..04ea836969b3 100644 --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ b/arch/arm/mach-ux500/include/mach/hardware.h @@ -68,12 +68,12 @@ #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x20...
0a4b1fc0b24fc7adbaf8413f2992ce1395991a78
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: Replace bfa_get_attr() with specific APIs
Problem Details: bfa_ioc_attr_s is a big structure and some times could cause stack overflow if defined locally, so add specific APIs that are needed to replace the use of ioc_attr local var. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/bfa/bfa_fcport.c b/drivers/scsi/bfa/bfa_fcport.c index a48413c230a5..0da612010787 100644 --- a/drivers/scsi/bfa/bfa_fcport.c +++ b/drivers/scsi/bfa/bfa_fcport.c @@ -145,35 +145,12 @@ bfa_fcport_aen_post(struct bfa_fcport_s *fcport, enum bfa_port_aen_event event) struct bfa_log_mod_s ...
13cc20c5e764e6ef8d57f33980ab8c386c25fb4d
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: IOC fixes, check for IOC down condition.
Problem Details: Currently BFA was not checking for IOC down condition when issuing getstats/clearstats Add check to see if IOC is operational, before issuing getstats/clearstats. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index 2f09d17730cc..4d9a47ccffe9 100644 --- a/drivers/scsi/bfa/bfa_ioc.c +++ b/drivers/scsi/bfa/bfa_ioc.c @@ -1129,9 +1129,6 @@ bfa_ioc_download_fw(struct bfa_ioc_s *ioc, u32 boot_type, if (bfa_ioc_fwimg_get_size(ioc) < BFA_IOC_FWIMG_MINSZ) ...
f5713c5dfb4d61cd77debf61d3873eb36877ff1f
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: Fix Command Queue (CPE) full condition check and ack CPE interrupt.
Problem Details: Fixed the issue of not acknowledging the command queue full-to-non-full interrupt. Implemented separate acknowledging functions for different ASIC and interrupt mode. Fixed the case of missing CPE interrupt by always processing the pending requests in the completion path. Signed-off-by: Krishna Gudi...
```diff diff --git a/drivers/scsi/bfa/bfa_hw_cb.c b/drivers/scsi/bfa/bfa_hw_cb.c index ede1438619e2..871a4e28575c 100644 --- a/drivers/scsi/bfa/bfa_hw_cb.c +++ b/drivers/scsi/bfa/bfa_hw_cb.c @@ -52,6 +52,18 @@ bfa_hwcb_reginit(struct bfa_s *bfa) } } +void +bfa_hwcb_reqq_ack(struct bfa_s *bfa, int reqq) +{ +} + +st...
816e49b8ed209e5e08d4c43359635cbca17e7196
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: IOC recovery fix in fcmode.
Problem Details: ioc_recover failed to work in fcmode. Fixed the code to initialize the ioc_regs.err_set during the notify_hbfail. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/bfa/bfa_ioc_ct.c b/drivers/scsi/bfa/bfa_ioc_ct.c index 0430edd2e011..469da95aedf3 100644 --- a/drivers/scsi/bfa/bfa_ioc_ct.c +++ b/drivers/scsi/bfa/bfa_ioc_ct.c @@ -171,10 +171,14 @@ bfa_ioc_ct_firmware_unlock(struct bfa_ioc_s *ioc) static void bfa_ioc_ct_notify_hbfail(struct bfa_ioc...
2993cc71d1bff61999ade7f2b6b3ea2dd1e2c8d9
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: AEN and byte alignment fixes.
Problem Details: Replace enum types with int and rearrange the fields to fix some alignment issue. Local var ioc_attr is causing the stack to overflow, so removed the usage of the local ioc_attr var and now invoking an API to return the ioc_type. Fix some AEN issues. Signed-off-by: Krishna Gudipati <kgudipat@brocade...
```diff diff --git a/drivers/scsi/bfa/bfa_fcport.c b/drivers/scsi/bfa/bfa_fcport.c index 4ed048bf45cb..bdea7f0eb6bd 100644 --- a/drivers/scsi/bfa/bfa_fcport.c +++ b/drivers/scsi/bfa/bfa_fcport.c @@ -142,6 +142,7 @@ bfa_pport_aen_post(struct bfa_pport_s *pport, enum bfa_port_aen_event event) char pwwn_ptr[B...
86e32dabbad0d860b2be3c30a33c10a134d4ccf1
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: Fix to copy fpma MAC when requested by user space application.
Problem Details: Copy fpma MAC when requested by user space application. Added FPMA mac address to the lport attributes structure. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/bfa/bfa_fcs_lport.c b/drivers/scsi/bfa/bfa_fcs_lport.c index 960ae1a7bcd0..7bb182dcbd7d 100644 --- a/drivers/scsi/bfa/bfa_fcs_lport.c +++ b/drivers/scsi/bfa/bfa_fcs_lport.c @@ -936,8 +936,13 @@ bfa_fcs_port_get_attr(struct bfa_fcs_port_s *port, bfa_fcs_port_get_fabric_ipaddr(...
72041ed8fc8ed92c11af90949bab7b08f3e34fd3
Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: RPORT state machine: direct attach mode fix.
Problem Details: Make sure that in direct attach mode, we do not query the name server after a target is marked offline. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
```diff diff --git a/drivers/scsi/bfa/rport.c b/drivers/scsi/bfa/rport.c index 32cf180ec791..80592e352226 100644 --- a/drivers/scsi/bfa/rport.c +++ b/drivers/scsi/bfa/rport.c @@ -925,10 +925,17 @@ bfa_fcs_rport_sm_hcb_offline(struct bfa_fcs_rport_s *rport, case RPSM_EVENT_HCB_OFFLINE: case RPSM_EVENT_ADDRESS_CHANGE...
7bc80cd935a4d5fd8574f6994bd95d0aad273d56
Analyze and fix the following issue in the Linux kernel code: usbfs: fix deadlock on 'usbfs_mutex', clean up poll
Problem Details: The caller of usbfs_conn_disc_event() in some cases (but not always) already holds usbfs_mutex, so trying to protect the event counter with that lock causes nasty deadlocks. The problem was introduced by commit 554f76962d ("USB: Remove BKL from poll()") when the BLK protection was turned into using th...
```diff diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c index c83c975152a6..6053a8b730cd 100644 --- a/drivers/usb/core/devices.c +++ b/drivers/usb/core/devices.c @@ -117,9 +117,21 @@ static const char *format_endpt = * However, these will come from functions that return ptrs to each of them. */...
a8a5164c297c16c2f4be776714ca47dba252cc3d
Analyze and fix the following issue in the Linux kernel code: gpio: cs5535-gpio: fix input direction
Problem Details: The cs5535-gpio driver's get() function was returning the output value. This means that the GPIO pins would never work as an input, even if configured as an input. The driver should return the READ_BACK value, which is the sensed line value. To make that work when the direction is 'output', INPUT_ENA...
```diff diff --git a/drivers/gpio/cs5535-gpio.c b/drivers/gpio/cs5535-gpio.c index 0fdbe94f24a3..0c3c498f2260 100644 --- a/drivers/gpio/cs5535-gpio.c +++ b/drivers/gpio/cs5535-gpio.c @@ -154,7 +154,7 @@ static int chip_gpio_request(struct gpio_chip *c, unsigned offset) static int chip_gpio_get(struct gpio_chip *chip...
62fecb70cfaa9b4c6aa1981acd53b18f4ad925f0
Analyze and fix the following issue in the Linux kernel code: pca953x: minor include cleanup
Problem Details: linux/i2c/pca953x.h is a very bare include file. Fix check for multiple includes of linux/i2c/pca953x.h, and add dependent includes into the header file. Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Jean Delvare <khali@linux-fr.org> Cc: David...
```diff diff --git a/include/linux/i2c/pca953x.h b/include/linux/i2c/pca953x.h index 81736d6a8db7..29699f8dc5a4 100644 --- a/include/linux/i2c/pca953x.h +++ b/include/linux/i2c/pca953x.h @@ -1,3 +1,9 @@ +#ifndef _LINUX_PCA953X_H +#define _LINUX_PCA953X_H + +#include <linux/types.h> +#include <linux/i2c.h> + /* platfor...
5a98c04d78c896d52baef20ffc11f6d1ba6eb786
Analyze and fix the following issue in the Linux kernel code: rtc-coh901331: fix braces in resume code
Problem Details: The else part of the if statement is indented but does not have braces around it. It clearly should since it uses clk_enable and clk_disable which are supposed to balance. Signed-off-by: James Hogan <james@albanarts.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Alessandro Zummo...
```diff diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c index 03ea530981d1..44c4399ee714 100644 --- a/drivers/rtc/rtc-coh901331.c +++ b/drivers/rtc/rtc-coh901331.c @@ -271,12 +271,13 @@ static int coh901331_resume(struct platform_device *pdev) { struct coh901331_port *rtap = dev_get_drvdata(&p...