id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
57205026da070b59e9546df352fe465f1aeacf99
Analyze and fix the following issue in the Linux kernel code: mc13783: rename mc13783_{{un,}mask,ack_irq} to have a mc13783_irq prefix
Problem Details: In the source file group these functions together. The mc13783 header file provides fallback implementations for the old names to prevent build failures. When all users of the old names are fixed to use the new names these can go away. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>...
```diff diff --git a/drivers/mfd/mc13783-core.c b/drivers/mfd/mc13783-core.c index 735c8a4d164f..a2bd44552042 100644 --- a/drivers/mfd/mc13783-core.c +++ b/drivers/mfd/mc13783-core.c @@ -225,7 +225,7 @@ int mc13783_reg_rmw(struct mc13783 *mc13783, unsigned int offset, } EXPORT_SYMBOL(mc13783_reg_rmw); -int mc13783_...
2a7a06a0cdd86d572e91657603180da5992be6d3
Analyze and fix the following issue in the Linux kernel code: rtc-core: fix memory leak
Problem Details: The idr should be destroyed when the module is unloaded. Found with kmemleak. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torval...
```diff diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index be5a6b73e601..40845c7e9322 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -226,6 +226,7 @@ static void __exit rtc_exit(void) { rtc_dev_exit(); class_destroy(rtc_class); + idr_destroy(&rtc_idr); } subsys_initcall(rtc_init); ```
b4877d2b3678f4455f2b8b0211868ac57c3b1ff6
Analyze and fix the following issue in the Linux kernel code: rtc-ep93xx.c: cleanup probe/remove routines
Problem Details: Fix issue with rtc device not getting unregistered in probe error path. Use the devres managed resource functions in the probe routine to cleanup the error path. Use sysfs_{create/remove}_group to add/remove the sysfs files. Reduces the text size by 132 bytes, increases data by 12 bytes: text ...
```diff diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c index 9da02d108b73..91bde976bc0f 100644 --- a/drivers/rtc/rtc-ep93xx.c +++ b/drivers/rtc/rtc-ep93xx.c @@ -115,6 +115,15 @@ static ssize_t ep93xx_rtc_show_comp_delete(struct device *dev, } static DEVICE_ATTR(comp_delete, S_IRUGO, ep93xx_rtc_show_...
49908e739e23e2672d3efb9b1a35f877f8e86342
Analyze and fix the following issue in the Linux kernel code: rtc: mxc: fix memory leak
Problem Details: Free pdata before exit. Found by cppcheck. [yuasa@linux-mips.org: add missing iounmap()] Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com> Acked-by: Daniel Mack <daniel@caiaq.de> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Cc Yoichi Yua...
```diff diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c index 6bd5072d4eb7..8710f9415d98 100644 --- a/drivers/rtc/rtc-mxc.c +++ b/drivers/rtc/rtc-mxc.c @@ -396,8 +396,11 @@ static int __init mxc_rtc_probe(struct platform_device *pdev) pdata->ioaddr = ioremap(res->start, resource_size(res)); clk = clk_g...
76595f79d76fbe6267a51b3a866a028d150f06d4
Analyze and fix the following issue in the Linux kernel code: coredump: suppress uid comparison test if core output files are pipes
Problem Details: Modify uid check in do_coredump so as to not apply it in the case of pipes. This just got noticed in testing. The end of do_coredump validates the uid of the inode for the created file against the uid of the crashing process to ensure that no one can pre-create a core file with different ownership an...
```diff diff --git a/fs/exec.c b/fs/exec.c index 829a6c6d1803..49cdaa19e5b9 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1936,8 +1936,9 @@ void do_coredump(long signr, int exit_code, struct pt_regs *regs) /* * Dont allow local users get cute and trick others to coredump * into their pre-created files: + * Note, ...
5c99cbf49a6e1a1efd25b11f4604c65c455e1612
Analyze and fix the following issue in the Linux kernel code: coredump: set ->group_exit_code for other CLONE_VM tasks too
Problem Details: User visible change. do_coredump() kills all threads which share the same ->mm but only the coredumping process gets the proper exit_code. Other tasks which share the same ->mm die "silently" and return status == 0 to parent. This is historical behaviour, not actually a bug. But I think Frank Hecke...
```diff diff --git a/fs/exec.c b/fs/exec.c index 89d4080c1435..829a6c6d1803 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1561,12 +1561,13 @@ out: return ispipe; } -static int zap_process(struct task_struct *start) +static int zap_process(struct task_struct *start, int exit_code) { struct task_struct *t; int nr ...
30736a4d43f4af7f1a7836d6a266be17082195c4
Analyze and fix the following issue in the Linux kernel code: coredump: pass mm->flags as a coredump parameter for consistency
Problem Details: Pass mm->flags as a coredump parameter for consistency. --- 1787 if (mm->core_state || !get_dumpable(mm)) { <- (1) 1788 up_write(&mm->mmap_sem); 1789 put_cred(cred); 1790 goto fail; 1791 } 1792 [...] 1798 if (get_dumpable(mm) ==...
```diff diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 78de530cfb02..535e763ab1a6 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1882,7 +1882,6 @@ static int elf_core_dump(struct coredump_params *cprm) struct vm_area_struct *vma, *gate_vma; struct elfhdr *elf = NULL; loff_t offset = 0, dataoff, foff...
05f47fda9fc5b17bfab189e9d54228025befc996
Analyze and fix the following issue in the Linux kernel code: coredump: unify dump_seek() implementations for each binfmt_*.c
Problem Details: The current ELF dumper can produce broken corefiles if program headers exceed 65535. In particular, the program in 64-bit environment often demands more than 65535 mmaps. If you google max_map_count, then you can find many users facing this problem. Solaris has already dealt with this issue, and oth...
```diff diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 61dd00a6c7b4..d2f8872dd767 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c @@ -69,16 +69,32 @@ static int dump_write(struct file *file, const void *addr, int nr) return file->f_op->write(file, addr, nr, &file->f_pos) == nr; } +static int dump_seek...
5748150eabdacd3f870c311b63d32f5e312bf624
Analyze and fix the following issue in the Linux kernel code: drivers/hwmon/adcxx.c: fix for single-channel ADCs
Problem Details: While testing an ADC121S021 in an embedded board with a S3C2142 SoC (ARM core), I have found that the 'adcxx' driver does not handle correctly single channel ADCs from this chip family. For single channel chips you must only issue one read transfer for correct measurement. Signed-off-by: Jose Miguel ...
```diff diff --git a/drivers/hwmon/adcxx.c b/drivers/hwmon/adcxx.c index 5e9e095f1136..74d9c5195e44 100644 --- a/drivers/hwmon/adcxx.c +++ b/drivers/hwmon/adcxx.c @@ -62,18 +62,23 @@ static ssize_t adcxx_read(struct device *dev, struct spi_device *spi = to_spi_device(dev); struct sensor_device_attribute *attr = to_...
4cae787840ae82aa02649f45c46839b349034435
Analyze and fix the following issue in the Linux kernel code: drivers/hwmon/vt8231.c: fix continuation line formats
Problem Details: String constants that are continued on subsequent lines with \ will cause spurious whitespace in the resulting output. Signed-off-by: Joe Perches <joe@perches.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>...
```diff diff --git a/drivers/hwmon/vt8231.c b/drivers/hwmon/vt8231.c index d47b4c9949c2..e6078c9f0e27 100644 --- a/drivers/hwmon/vt8231.c +++ b/drivers/hwmon/vt8231.c @@ -948,8 +948,7 @@ static int __devinit vt8231_pci_probe(struct pci_dev *dev, address = val & ~(VT8231_EXTENT - 1); if (address == 0) { - dev_err...
52131292c069b74f4b5f3c786ff66ff6e82b0e69
Analyze and fix the following issue in the Linux kernel code: checkpatch: fix false positive on __initconst
Problem Details: checkpatch falsely complained about '__initconst' because it thought the 'const' needed a space before. Fix this by changing the list of attributes: - add '__initconst' - force plain 'init' to contain a word-boundary at the end Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Andy Whitcroft <...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9a3894dbf752..1530dbf1dab5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -145,11 +145,14 @@ our $Sparse = qr{ __kprobes| __ref }x; + +# Notes to $Attribute: +# We need \b after 'init' otherwise 'initconst' will cause...
42bdf74c95b6935f3c09a09ba4bead6cad11b540
Analyze and fix the following issue in the Linux kernel code: checkpatch: trivial fix for trailing statements check
Problem Details: In case if the statement and the conditional are in one line, the line appears in the report doubly. And items of this check have no blank line before the next item. This patch fixes these trivial problems, to improve readability of the report. [sample.c] > if (cond1 > && cond2 > ...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 309050f30874..3e4099a6df51 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2182,8 +2182,10 @@ sub process { # Find out how long the conditional actually is. my @newlines = ($c =~ /\n/gs); my $cond_lines = 1 + $#ne...
849382948992cc6482c778b1e854c19368b60c05
Analyze and fix the following issue in the Linux kernel code: mmc: enable DMA on Ricoh sdhci reader by default
Problem Details: This card reader doesn't advertise, however DMA works well. Probably windows SDHCI driver assumes that all readers support DMA and thus we see that bug. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Tested-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Maxim Levitsky <maximlevits...
```diff diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index dbf054315fe2..8e1020cf73f4 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -80,9 +80,6 @@ struct sdhci_pci_chip { static int ricoh_probe(struct sdhci_pci_chip *chip) { - if (chip->pdev->subsystem_v...
a04ac5b9b45a7adec7d3ee3968e677b6e4b98f25
Analyze and fix the following issue in the Linux kernel code: mmc: at91_mci: fix timeout errors
Problem Details: Fix two timeout errors, one for slow SDHC cards and one for slow users while inserting SD cards. Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Andrew Victor <avictor.za@gmail.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: And...
```diff diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 4e1b2e6288da..37efe6b3f12d 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c @@ -756,7 +756,8 @@ static void at91_mci_request(struct mmc_host *mmc, struct mmc_request *mrq) host->request = mrq; host->flags ...
0b3520f2df8e4e5dad6a7b2743d037bf06c22024
Analyze and fix the following issue in the Linux kernel code: mmc: at91_mci: fix pointer errors
Problem Details: Fixes two pointer errors, one which leads to memory overwrites if used with large chunks of data. Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Andrew Victor <avictor.za@gmail.com> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: An...
```diff diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c index 63924e0c7ea9..4e1b2e6288da 100644 --- a/drivers/mmc/host/at91_mci.c +++ b/drivers/mmc/host/at91_mci.c @@ -227,11 +227,13 @@ static inline void at91_mci_sg_to_dma(struct at91mci_host *host, struct mmc_data for (index = 0; index < (a...
da68c4eb258cd9f3f0b8aeb7e46b8118bb6358b6
Analyze and fix the following issue in the Linux kernel code: sdio: introduce API for special power management features
Problem Details: This patch series provides the core changes needed to allow SDIO cards to remain powered and active while the host system is suspended, and let them wake up the host system when needed. This is used to implement wake-on-lan with SDIO wireless cards at the moment. Patches to add that support to the li...
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 30acd5265821..f4b97d3c3d0f 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1151,6 +1151,9 @@ void mmc_stop_host(struct mmc_host *host) cancel_delayed_work(&host->detect); mmc_flush_scheduled_work(); + /* clear pm f...
c744d988729db9be37d1c877d143cfe63941c25c
Analyze and fix the following issue in the Linux kernel code: mmc: bfin_sdh: fix unused sg warning on BF51x/BF52x systems
Problem Details: The local sg variable is only used with BF54x code. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/mmc/host/bfin_sdh.c b/drivers/mmc/host/bfin_sdh.c index 3343a57355cc..f218a9964552 100644 --- a/drivers/mmc/host/bfin_sdh.c +++ b/drivers/mmc/host/bfin_sdh.c @@ -115,7 +115,6 @@ static int sdh_setup_data(struct sdh_host *host, struct mmc_data *data) unsigned int length; unsigned int dat...
03cd8f7ebe0cbef5ca7eed349774085e92a3d726
Analyze and fix the following issue in the Linux kernel code: ricoh_mmc: port from driver to pci quirk
Problem Details: This patch solves nasty problem original driver has. Original goal of the ricoh_mmc was to disable this device because then, mmc cards can be read using standard SDHCI controller, thus avoiding writing of yet another driver. However, the act of disablement, makes other pci functions that belong to th...
```diff diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index ce1d28884e29..6bc3ecb1f247 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -69,20 +69,16 @@ config MMC_SDHCI_PCI If unsure, say N. config MMC_RICOH_MMC - tristate "Ricoh MMC Controller Disabler (EXPERIMENTAL)"...
9a86e2bad0b9fbf3290ae496da6dab9536dd6bf7
Analyze and fix the following issue in the Linux kernel code: lib: 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/linux/list.h b/include/linux/list.h index 5d9c6558e8ab..8392884a2977 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -498,7 +498,7 @@ static inline void list_splice_tail_init(struct list_head *list, pos = n, n = list_entry(n->member.next, typeof(*n), member)) /** -...
835cc0c8477fdbc59e0217891d6f11061b1ac4e2
Analyze and fix the following issue in the Linux kernel code: lib: more scalable list_sort()
Problem Details: XFS and UBIFS can pass long lists to list_sort(); this alternative implementation scales better, reaching ~3x performance gain when list length exceeds the L2 cache size. Stand-alone program timings were run on a Core 2 duo L1=32KB L2=4MB, gcc-4.4, with flags extracted from an Ubuntu kernel build. Ob...
```diff diff --git a/lib/list_sort.c b/lib/list_sort.c index 19d11e0bb958..362c10f1653f 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -4,99 +4,213 @@ #include <linux/slab.h> #include <linux/list.h> +#define MAX_LIST_LENGTH_BITS 20 + +/* + * Returns a list organized in an intermediate format suited + * to ch...
3c840c18bcd8efb37f1a565e83a9509e1ea5d105
Analyze and fix the following issue in the Linux kernel code: scripts/get_maintainer.pl: fix possible infinite loop
Problem Details: If MAINTAINERS section entries are misformatted, it was possible to have an infinite loop. Correct the defect by always moving the index to the end of section + 1 Also, exit check for exclude as soon as possible. Signed-off-by: Joe Perches <joe@perches.com> Cc: <stable@kernel.org> Signed-off-by: And...
```diff diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index b61002dceaba..f76f3d13276d 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -347,6 +347,7 @@ foreach my $file (@files) { if ($type eq 'X') { if (file_match_pattern($file, $value)) { $exclude = 1; + ...
22dd5b0cba50a197aaa3bd2790a29ee2e8e4e372
Analyze and fix the following issue in the Linux kernel code: get_maintainer: fix perlcritic warnings
Problem Details: perlcritic is a standard checker for Perl Best Practices. This patch fixes most of the warnings in the get_maintainer script. If kernel programmers are going to have checkpatch they should write clean scripts as well... Bareword file handle opened at line 176, column 1. See pages 202,204 of PBP. (...
```diff diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index f8baeeb8c3f7..9bb094138dd8 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -185,8 +185,9 @@ if (!top_of_kernel_tree($lk_path)) { my @typevalue = (); my %keyword_hash; -open(MAINT, "<${lk_path}MAINTAINERS") || ...
4b76c9da611593eed6a13527c5ebd00c173624ad
Analyze and fix the following issue in the Linux kernel code: scripts/get_maintainer.pl: add --sections, print entire matched subsystem
Problem Details: Print the complete contents of the matched subsystems in pattern match depth order. Sample output: $ ./scripts/get_maintainer.pl --sections -f drivers/net/usb/smsc95xx.c USB SMSC95XX ETHERNET DRIVER M:Steve Glendinning <steve.glendinning@smsc.com> L:netdev@vger.kernel.org S:Supported F:drivers/net/us...
```diff diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index bff2390652c2..e54f72f6c341 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -41,6 +41,7 @@ my $web = 0; my $subsystem = 0; my $status = 0; my $keywords = 1; +my $sections = 0; my $file_emails = 0; my $from_fil...
8aeee85a29e27e043db582bf2ae8e5f42767934f
Analyze and fix the following issue in the Linux kernel code: panic: fix panic_timeout accuracy when running on a hypervisor
Problem Details: I've had some complaints about panic_timeout being wildly innacurate on shared processor PowerPC partitions (a 3 minute panic_timeout taking 30 minutes). The problem is we loop on mdelay(1) and with a 1ms in 10ms hypervisor timeslice each of these will take 10ms (ie 10x) longer. I expect other platfo...
```diff diff --git a/kernel/panic.c b/kernel/panic.c index c787333282b8..13d966b4c14a 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -36,15 +36,36 @@ ATOMIC_NOTIFIER_HEAD(panic_notifier_list); EXPORT_SYMBOL(panic_notifier_list); -static long no_blink(long time) -{ - return 0; -} - /* Returns how long it wait...
f3abd4f9531becb71626bd206955d47d5ea54f06
Analyze and fix the following issue in the Linux kernel code: kernel/exit.c: fix shadows sparse warning
Problem Details: kernel/exit.c:1183:26: warning: symbol 'status' shadows an earlier one kernel/exit.c:1173:21: originally declared here Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/exit.c b/kernel/exit.c index 10d3c5d5ae44..ce1e48c2d93d 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1189,7 +1189,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p) if (unlikely(wo->wo_flags & WNOWAIT)) { int exit_code = p->exit_code; - int why, statu...
9c03c383563f147907f1a90cf16f1e190e2f4aae
Analyze and fix the following issue in the Linux kernel code: includecheck fix for kernel/params.c
Problem Details: Fix the following 'make includecheck' warning: kernel/params.c: linux/string.h is included more than once. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Cc: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus ...
```diff diff --git a/kernel/params.c b/kernel/params.c index cf1b69183127..8d95f5451b22 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -24,7 +24,6 @@ #include <linux/err.h> #include <linux/slab.h> #include <linux/ctype.h> -#include <linux/string.h> #if 0 #define DEBUGP printk ```
33fd797b3e2c6a7663b9331150da0acdb31990a2
Analyze and fix the following issue in the Linux kernel code: eisa: fix coding style for eisa bus code
Problem Details: Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation...
```diff diff --git a/drivers/eisa/eisa-bus.c b/drivers/eisa/eisa-bus.c index 66958b3f10b4..806c77bfd434 100644 --- a/drivers/eisa/eisa-bus.c +++ b/drivers/eisa/eisa-bus.c @@ -39,10 +39,10 @@ static unsigned int enable_dev_count; static int disable_dev[EISA_MAX_FORCED_DEV]; static unsigned int disable_dev_count; -st...
cfd8d6c0ed89ba387609419e3d8d4c6b92a5d446
Analyze and fix the following issue in the Linux kernel code: smp: fix documentation in include/linux/smp.h
Problem Details: smp: Fix documentation. Fix documentation in include/linux/smp.h: smp_processor_id() Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/linux/smp.h b/include/linux/smp.h index 7a0570e6a596..cfa2d20e35f1 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -154,7 +154,7 @@ smp_call_function_any(const struct cpumask *mask, void (*func)(void *info), /* * smp_processor_id(): get the current CPU ID. * - * if DEBUG_...
221e3ebf6d5f2625373573155924e39f196c5d3d
Analyze and fix the following issue in the Linux kernel code: cpumask: let num_*_cpus() function always return unsigned values
Problem Details: Dependent on CONFIG_SMP the num_*_cpus() functions return unsigned or signed values. Let them always return unsigned values to avoid strange casts. Fixes at least one warning: kernel/kprobes.c: In function 'register_kretprobe': kernel/kprobes.c:1038: warning: comparison of distinct pointer types l...
```diff diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index dbcee7647d9a..bae6fe24d1f9 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -90,10 +90,10 @@ extern const struct cpumask *const cpu_active_mask; #define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask) #define ...
8aaed5bec2b9177eab1796c8c4f7a4c90804eef6
Analyze and fix the following issue in the Linux kernel code: init/initramfs.c: fix "symbol shadows an earlier one" noise
Problem Details: The symbol 'count' is a local global variable in this file. The function clean_rootfs() should use a different symbol name to prevent "symbol shadows an earlier one" noise. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-...
```diff diff --git a/init/initramfs.c b/init/initramfs.c index b37d34beb90b..37d3859b1b32 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -525,7 +525,7 @@ static void __init clean_rootfs(void) int fd; void *buf; struct linux_dirent64 *dirp; - int count; + int num; fd = sys_open("/", O_RDONLY, 0); WA...
03315b59165ee2049a4b903a1b0b8bf673d701fa
Analyze and fix the following issue in the Linux kernel code: uml: line.c: avoid NULL pointer dereference
Problem Details: Assign tty only if line is not NULL. [akpm@linux-foundation.org: simplification] Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index cf8a97f34518..64cda95f59ca 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c @@ -18,10 +18,10 @@ static irqreturn_t line_interrupt(int irq, void *data) { struct chan *chan = data; struct line *line = chan->line; - struct tty_...
cda1c5af26a00ee31cdc5ab8321a1be7851cbfff
Analyze and fix the following issue in the Linux kernel code: cryptocop: fix assertion in create_output_descriptors()
Problem Details: size_t desc_len cannot be less than 0, test before the subtraction. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux...
```diff diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index fd529a0ec758..b70fb34939d9 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c @@ -628,9 +628,9 @@ static int create_output_descriptors(struct cryptocop_operation *oper...
c08c6e1f54c85fc299cf9f88cf330d6dd28a9a1d
Analyze and fix the following issue in the Linux kernel code: nommu: get_user_pages(): pin last page on non-page-aligned start
Problem Details: The noMMU version of get_user_pages() fails to pin the last page when the start address isn't page-aligned. The patch fixes this in a way that makes find_extend_vma() congruent to its MMU cousin. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Cc: D...
```diff diff --git a/mm/nommu.c b/mm/nommu.c index 55727a74af98..b9b5cceb1b68 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -146,7 +146,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE); for (i = 0; i < nr_pages; i++) { - vma = find_vma(mm,...
452aa6999e6703ffbddd7f6ea124d3968915f3e3
Analyze and fix the following issue in the Linux kernel code: mm/pm: force GFP_NOIO during suspend/hibernation and resume
Problem Details: There are quite a few GFP_KERNEL memory allocations made during suspend/hibernation and resume that may cause the system to hang, because the I/O operations they depend on cannot be completed due to the underlying devices being suspended. Avoid this problem by clearing the __GFP_IO and __GFP_FS bits i...
```diff diff --git a/include/linux/gfp.h b/include/linux/gfp.h index e5567e6762f3..2e1b32c0484d 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -83,6 +83,7 @@ struct vm_area_struct; #define GFP_HIGHUSER_MOVABLE (__GFP_WAIT | __GFP_IO | __GFP_FS | \ __GFP_HARDWALL | __GFP_HIGHMEM | \ __GFP_MOV...
ad2bd7e0e9647cd48593a6b3a2be07dc2c2d28ed
Analyze and fix the following issue in the Linux kernel code: mm/swapfile.c: fix swapon size off-by-one
Problem Details: There's an off-by-one disagreement between mkswap and swapon about the meaning of swap_header last_page: mkswap (in all versions I've looked at: util-linux-ng and BusyBox and old util-linux; probably as far back as 1999) consistently means the offset (in page units) of the last page of the swap area, w...
```diff diff --git a/mm/swapfile.c b/mm/swapfile.c index 187a21f8b7bd..4a986127f15e 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1760,11 +1760,11 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) unsigned int type; int i, prev; int error; - union swap_header *swap_header = NULL; ...
c44b674323f4a2480dbeb65d4b487fa5f06f49e0
Analyze and fix the following issue in the Linux kernel code: rmap: move exclusively owned pages to own anon_vma in do_wp_page()
Problem Details: When the parent process breaks the COW on a page, both the original which is mapped at child and the new page which is mapped parent end up in that same anon_vma. Generally this won't be a problem, but for some workloads it could preserve the O(N) rmap scanning complexity. A simple fix is to ensure t...
```diff diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 62da2001d55c..72be23b1480a 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -125,6 +125,7 @@ static inline void anon_vma_merge(struct vm_area_struct *vma, /* * rmap interfaces called when adding or removing pte of page */ +void p...
5beb49305251e5669852ed541e8e2f2f7696c53e
Analyze and fix the following issue in the Linux kernel code: mm: change anon_vma linking to fix multi-process server scalability issue
Problem Details: The old anon_vma code can lead to scalability issues with heavily forking workloads. Specifically, each anon_vma will be shared between the parent process and all its child processes. In a workload with 1000 child processes and a VMA with 1000 anonymous pages per process that get COWed, this leads to...
```diff diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index b81e46b1629b..703062c44fb9 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -2315,6 +2315,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, pfm_context_t DPRINT(("Cannot allocate vma\n"...
648bcc771145172a14bc35eeb849ed08f6aa4f1e
Analyze and fix the following issue in the Linux kernel code: mm/memcontrol.c: fix "integer as NULL pointer" sparse warning
Problem Details: mm/memcontrol.c:2548:32: warning: Using plain integer as NULL pointer Signed-off-by: Thiago Farina <tfransosi@gmail.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 954032b80bed..d813823ab08f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2545,7 +2545,7 @@ static int mem_cgroup_force_empty_list(struct mem_cgroup *mem, pc = list_entry(list->prev, struct page_cgroup, lru); if (busy == pc) { list_move(&pc-...
0141450f66c3c12a3aaa869748caa64241885cdf
Analyze and fix the following issue in the Linux kernel code: readahead: introduce FMODE_RANDOM for POSIX_FADV_RANDOM
Problem Details: This fixes inefficient page-by-page reads on POSIX_FADV_RANDOM. POSIX_FADV_RANDOM used to set ra_pages=0, which leads to poor performance: a 16K read will be carried out in 4 _sync_ 1-page reads. In other places, ra_pages==0 means - it's ramfs/tmpfs/hugetlbfs/sysfs/configfs - some IO error happened w...
```diff diff --git a/include/linux/fs.h b/include/linux/fs.h index 45689621a851..be87edcaba06 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -87,6 +87,9 @@ struct inodes_stat_t { */ #define FMODE_NOCMTIME ((__force fmode_t)2048) +/* Expect random access pattern */ +#define FMODE_RANDOM ((__force fmo...
da0aa138944311e6745a00ac3d88f03e8d9a46c4
Analyze and fix the following issue in the Linux kernel code: mm/mempolicy.c: fix indentation of the comments of do_migrate_pages
Problem Details: Currently, do_migrate_pages() have very long comment and this is not indent properly. I often misunderstand it is function starting commnents and confused it. this patch fixes it. note: this patch doesn't break 80 column rule. I guess original author intended this indentaion, but an accident c...
```diff diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 44dd9d1521ec..bda230e52acd 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -888,36 +888,36 @@ int do_migrate_pages(struct mm_struct *mm, if (err) goto out; -/* - * Find a 'source' bit set in 'tmp' whose corresponding 'dest' - * bit in 'to' is not als...
9d8cebd4bcd7c3878462fdfda34bbcdeb4df7ef4
Analyze and fix the following issue in the Linux kernel code: mm: fix mbind vma merge problem
Problem Details: Strangely, current mbind() doesn't merge vma with neighbor vma although it's possible. Unfortunately, many vma can reduce performance... This patch fixes it. reproduced program ---------------------------------------------------------------- #include <numaif.h> #include <numa.h> ...
```diff diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 290fb5bf0440..44dd9d1521ec 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -563,24 +563,50 @@ static int policy_vma(struct vm_area_struct *vma, struct mempolicy *new) } /* Step 2: apply policy to a range and do splits. */ -static int mbind_range(struct ...
93e4a89a8c987189b168a530a331ef6d0fcf07a7
Analyze and fix the following issue in the Linux kernel code: mm: restore zone->all_unreclaimable to independence word
Problem Details: commit e815af95 ("change all_unreclaimable zone member to flags") changed all_unreclaimable member to bit flag. But it had an undesireble side effect. free_one_page() is one of most hot path in linux kernel and increasing atomic ops in it can reduce kernel performance a bit. Thus, this patch revert ...
```diff diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index a01a103341bd..bc209d8b7b5c 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -306,6 +306,7 @@ struct zone { * free areas of different sizes */ spinlock_t lock; + int all_unreclaimable; /* All pages ...
fc91668eaf9e7ba61e867fc2218b7e9fb67faa4f
Analyze and fix the following issue in the Linux kernel code: mm: remove free_hot_page()
Problem Details: free_hot_page() is just a wrapper around free_hot_cold_page() with parameter 'cold = 0'. After adding a clear comment for free_hot_cold_page(), it is reasonable to remove a level of call. [akpm@linux-foundation.org: fix build] Signed-off-by: Li Hong <lihong.hi@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie...
```diff diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 557bdad320b6..e5567e6762f3 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -325,7 +325,7 @@ void free_pages_exact(void *virt, size_t size); extern void __free_pages(struct page *page, unsigned int order); extern void free_pages(unsig...
45973d74fd3b1e3e16c025b688a725c7653b1443
Analyze and fix the following issue in the Linux kernel code: vmscan: check high watermark after shrink zone
Problem Details: Kswapd checks that zone has sufficient pages free via zone_watermark_ok(). If any zone doesn't have enough pages, we set all_zones_ok to zero. !all_zone_ok makes kswapd retry rather than sleeping. I think the watermark check before shrink_zone() is pointless. Only after kswapd has tried to shrink th...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index c26986c85ce0..96ebe6608d5c 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2060,9 +2060,6 @@ loop_again: priority != DEF_PRIORITY) continue; - if (!zone_watermark_ok(zone, order, - high_wmark_pages(zone), end_zone, 0)) - all_zones_ok = 0; tem...
b084d4353ff99d824d3bc5a5c2c22c70b1fba722
Analyze and fix the following issue in the Linux kernel code: mm: count swap usage
Problem Details: A frequent questions from users about memory management is what numbers of swap ents are user for processes. And this information will give some hints to oom-killer. Besides we can count the number of swapents per a process by scanning /proc/<pid>/smaps, this is very slow and not good for usual proce...
```diff diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index e418f3d8f427..b5c5fc657a88 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -164,6 +164,7 @@ read the file /proc/PID/status: VmExe: 68 kB VmLib: 1412 kB VmPT...
34e55232e59f7b19050267a05ff1226e5cd122a5
Analyze and fix the following issue in the Linux kernel code: mm: avoid false sharing of mm_counter
Problem Details: Considering the nature of per mm stats, it's the shared object among threads and can be a cache-miss point in the page fault path. This patch adds per-thread cache for mm_counter. RSS value will be counted into a struct in task_struct and synchronized with mm's one at events. Now, in this patch, the...
```diff diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 0d07513a67a6..e418f3d8f427 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -188,6 +188,12 @@ memory usage. Its seven fields are explained in Table 1-3. The stat file contains ...
e3cb91ce1ac1d93a7cc6f81bb5247f7602b572bb
Analyze and fix the following issue in the Linux kernel code: timbgpio: fix build
Problem Details: Use of get_irq_chip_data() et al. requires including linux/irq.h Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Richard Röjfors <richard.rojfors@pelagicore.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/gpio/timbgpio.c b/drivers/gpio/timbgpio.c index a4d344ba8e5c..d941f45fe557 100644 --- a/drivers/gpio/timbgpio.c +++ b/drivers/gpio/timbgpio.c @@ -23,6 +23,7 @@ #include <linux/module.h> #include <linux/gpio.h> #include <linux/platform_device.h> +#include <linux/irq.h> #include <linux/io...
781b16775ba0bb55fac0e1757bf0bd87c8879632
Analyze and fix the following issue in the Linux kernel code: Fix a dumb typo - use of & instead of &&
Problem Details: We managed to lose O_DIRECTORY testing due to a stupid typo in commit 1f36f774b2 ("Switch !O_CREAT case to use of do_last()") Reported-by: Walter Sheets <w41ter@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/namei.c b/fs/namei.c index 3d9d2f965f84..48e60a187325 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1656,7 +1656,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path, if (path->dentry->d_inode->i_op->follow_link) return NULL; error = -ENOTDIR; - if (*want_dir & !pat...
f070304094edb8d516423e79edd27c97ec2020b0
Analyze and fix the following issue in the Linux kernel code: dm raid1: fix deadlock when suspending failed device
Problem Details: To prevent deadlock, bios in the hold list should be flushed before dm_rh_stop_recovery() is called in mirror_suspend(). The recovery can't start because there are pending bios and therefore dm_rh_stop_recovery deadlocks. When there are pending bios in the hold list, the recovery waits for the comple...
```diff diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index 6d66ddf39071..ddda531723dc 100644 --- a/drivers/md/dm-raid1.c +++ b/drivers/md/dm-raid1.c @@ -465,9 +465,17 @@ static void map_region(struct dm_io_region *io, struct mirror *m, static void hold_bio(struct mirror_set *ms, struct bio *bio) { /* ...
a97f925a32aad2a37971d7bfb657006acf04e42d
Analyze and fix the following issue in the Linux kernel code: dm: free dm_io before bio_endio not after
Problem Details: Free the dm_io structure before calling bio_endio() instead of after it, to ensure that the io_pool containing it is not referenced after it is freed. This partially fixes a problem described here https://www.redhat.com/archives/dm-devel/2010-February/msg00109.html thread 1: bio_endio(bio, io_error...
```diff diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 21222f5193fb..7199846364e9 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -635,8 +635,10 @@ static void dec_pending(struct dm_io *io, int error) if (!md->barrier_error && io_error != -EOPNOTSUPP) md->barrier_error = io_error; end_io_acct(i...
8215d6ec5fee1e76545decea2cd73717efb5cb42
Analyze and fix the following issue in the Linux kernel code: dm table: remove unused dm_get_device range parameters
Problem Details: Remove unused parameters(start and len) of dm_get_device() and fix the callers. Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
```diff diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index a93637223c8d..3bdbb6115702 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1160,8 +1160,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) } cc->start = tmpll; - if (dm_get_device(ti, argv[3], ...
d0259bf0eefc503d3c9c9ccda35033c3dd3aac30
Analyze and fix the following issue in the Linux kernel code: dm mpath: hold io until all pg_inits completed
Problem Details: m->queue_io is set to block processing I/Os, and it needs to be kept while pg-init, which issues multiple path activations, is in progress. But m->queue is cleared when a path activation completes without error in pg_init_done(), even while other path activations are in progress. That may cause undesir...
```diff diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 8fa0c955eeb5..ae187e5d7d58 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -1181,14 +1181,19 @@ static void pg_init_done(void *data, int errors) m->current_pgpath = NULL; m->current_pg = NULL; } - } else if (!m->pg_ini...
f7b934c8127deebf4eb56fbe4a4ae0da16b6dbcd
Analyze and fix the following issue in the Linux kernel code: dm mpath: skip activate_path for failed paths
Problem Details: This patch adds two minor fixes while processing device mapper path activation. Skip failed paths while calling activate_path. If the path is already failed then activate_path will fail for sure. We don't have to call in that case. In some case this might cause prolonged retries unnecessarily. Chang...
```diff diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 2c6bf74ad5c1..ecada419809c 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c @@ -461,6 +461,9 @@ static void process_queued_ios(struct work_struct *work) m->pg_init_count++; m->pg_init_required = 0; list_for_each_entry(tmp, &...
1acaa1b2d9b5904c9cce06122990a2d71046ce16
Analyze and fix the following issue in the Linux kernel code: tracing: Update the comm field in the right variable in update_max_tr
Problem Details: The latency output showed: # | task: -3 (uid:0 nice:0 policy:1 rt_prio:99) The comm is missing in the "task:" and it looks like a minus 3 is the output. The correct display should be: # | task: migration/0-3 (uid:0 nice:0 policy:1 rt_prio:99) The problem is that the comm is being stored in ...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 032c57ca6502..6efd5cb3c252 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -592,7 +592,7 @@ static void __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) { struct trace_array_cpu *data = tr->data[cpu]; - s...
801c29fd1fdeb84f60241beb445ff5db154450ae
Analyze and fix the following issue in the Linux kernel code: function-graph: Fix unused reference to ftrace_set_func()
Problem Details: The declaration of ftrace_set_func() is at the start of the ftrace.c file and wrapped with a #ifdef CONFIG_FUNCTION_GRAPH condition. If function graph tracing is enabled but CONFIG_DYNAMIC_FTRACE is not, a warning about that function being declared static and unused is given. This really should have b...
```diff diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index d996353473fd..d0407c9f368c 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -85,10 +85,6 @@ ftrace_func_t ftrace_trace_function __read_mostly = ftrace_stub; ftrace_func_t __ftrace_trace_function __read_mostly = ftrace_stub; ftra...
3a22813a5aaf8e8c72be575dabe0ba26f9352f4d
Analyze and fix the following issue in the Linux kernel code: s2io: Fixing debug message
Problem Details: Currently s2io is dumping debug messages using the interface name before it was allocated, showing a message like the following: s2io: eth%d: Ring Mem PHY: 0x7ef80000 s2io: s2io_reset: Resetting XFrame card eth%d This patch just fixes it, printing the pci bus information for the card instead of the i...
```diff diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 43bc66aa8405..df70657260dd 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -923,8 +923,8 @@ static int init_shared_mem(struct s2io_nic *nic) tmp_v_addr = mac_control->stats_mem; mac_control->stats_info = (struct stat_block *)tmp_v_addr; ...
a80483d3722b603dae8a52495f8d88a7d4b1bf1c
Analyze and fix the following issue in the Linux kernel code: e1000e: fix packet corruption and tx hang during NFSv2
Problem Details: when receiving a particular type of NFS v2 UDP traffic, the hardware could DMA some bad data and then hang, possibly corrupting memory. Disable the NFS parsing in this hardware, verified to fix the bug. Originally reported and reproduced by RedHat's Neil Horman CC: nhorman@tuxdriver.com Signed-off-by...
```diff diff --git a/drivers/net/e1000e/defines.h b/drivers/net/e1000e/defines.h index db05ec355749..e301e26d6897 100644 --- a/drivers/net/e1000e/defines.h +++ b/drivers/net/e1000e/defines.h @@ -320,6 +320,8 @@ #define E1000_RXCSUM_IPPCSE 0x00001000 /* IP payload checksum enable */ /* Header split receive */ +...
5fe88eae26dbd24eed73eb0b681e13981fd486b3
Analyze and fix the following issue in the Linux kernel code: typhoon: fix incorrect use of smp_wmb()
Problem Details: The typhoon driver was incorrectly using smp_wmb() to order memory accesses against IO to the NIC in a few instances. Use wmb() instead, which is required to actually order between memory types. Signed-off-by: David Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index e3ddcb8f29df..1cf012d3e072 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c @@ -480,7 +480,7 @@ typhoon_hello(struct typhoon *tp) typhoon_inc_cmd_index(&ring->lastWrite, 1); INIT_COMMAND_NO_RESPONSE(cmd, TYPHOON_CMD_HELLO_RES...
dc71afe5ac7e8d049bb991330518e4c898a7d92e
Analyze and fix the following issue in the Linux kernel code: hwmon: Fix off-by-one kind values
Problem Details: Recent changes on the I2C front have left off-by-one array indexes in 3 hwmon drivers. Fix them. Faulty commit: e5e9f44c2 i2c: Drop I2C_CLIENT_INSMOD_2 to 8 Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Andr...
```diff diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c index fa0728232e71..0627f7a5b9b8 100644 --- a/drivers/hwmon/fschmd.c +++ b/drivers/hwmon/fschmd.c @@ -267,7 +267,7 @@ struct fschmd_data { struct list_head list; /* member of the watchdog_data_list */ struct kref kref; struct miscdevice watchdog...
a44908d742a577fb5ccb9a8c082326d4cea234c2
Analyze and fix the following issue in the Linux kernel code: hwmon: (tmp421) Fix temperature conversions
Problem Details: The low bits of temperature registers are status bits, they must be masked out before converting the register values to temperatures. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Andre Prendel <andre.prendel@gmx.de> Cc: stable@kernel.org
```diff diff --git a/drivers/hwmon/tmp421.c b/drivers/hwmon/tmp421.c index a97e299b233b..bb9760d7e8b6 100644 --- a/drivers/hwmon/tmp421.c +++ b/drivers/hwmon/tmp421.c @@ -80,14 +80,16 @@ struct tmp421_data { static int temp_from_s16(s16 reg) { - int temp = reg; + /* Mask out status bits */ + int temp = reg & ~0xf; ...
8d59582a867470a3e0c3eced4a01625ae8dc546b
Analyze and fix the following issue in the Linux kernel code: hwmon: (tmp421) Restore missing inputs
Problem Details: An off-by-one error caused some inputs to not be created by the driver when they should. TMP421 gets only one input instead of two, TMP422 gets two instead of three, etc. Fix the bug by listing explicitly the number of inputs each device has. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by:...
```diff diff --git a/drivers/hwmon/tmp421.c b/drivers/hwmon/tmp421.c index 4f7c051e2d7b..a97e299b233b 100644 --- a/drivers/hwmon/tmp421.c +++ b/drivers/hwmon/tmp421.c @@ -61,9 +61,9 @@ static const u8 TMP421_TEMP_LSB[4] = { 0x10, 0x11, 0x12, 0x13 }; #define TMP423_DEVICE_ID 0x23 static const struct i2c_device_id...
5f2dc798cadd144659cc9f5b6fc2a0a12c6dbdb0
Analyze and fix the following issue in the Linux kernel code: hwmon: (it87) Fix many checkpatch errors and warnings
Problem Details: Fix 20 errors and 11 warnings reported by the checkpatch script. The remainining errors would require more work. The remaining warnings will be addressed later. Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index d70c6ec31725..96306a6f844e 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -1,40 +1,40 @@ /* - it87.c - Part of lm_sensors, Linux kernel modules for hardware - monitoring. - - The IT8705F is an LPC-based Super I/O ...
c1a7c2262035e83a8f70ebe1328b3451702cf51b
Analyze and fix the following issue in the Linux kernel code: net/9p: Handle mount errors correctly.
Problem Details: With this patch we have # mount -t 9p -o trans=virtio virtio2 /mnt/ # mount -t 9p -o trans=virtio virtio2 /mnt/ mount: virtio2 already mounted or /mnt/ busy mount: according to mtab, virtio2 is already mounted on /mnt # mount -t 9p -o trans=virtio virtio3 /mnt/ -o debug=0xfff mount: special device vir...
```diff diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 05918d3cb40d..0aaed4819379 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -279,6 +279,7 @@ static int p9_virtio_create(struct p9_client *client, const char *devname, char *args) { struct virtio_chan *chan; + int ret = -ENOEN...
6c550ee41596798cbd873d3df9f8ea0a4ce7ad2f
Analyze and fix the following issue in the Linux kernel code: x86: fix mtrr missing kernel-doc
Problem Details: Fix missing kernel-doc notation in mtrr/main.c: Warning(arch/x86/kernel/cpu/mtrr/main.c:152): No description found for parameter 'info' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index fe4622e8c837..79556bd9b602 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c @@ -145,6 +145,7 @@ struct set_mtrr_data { /** * ipi_handler - Synchronisation handler. Executed by "other" CPUs...
3ed3a4343b79a79d10e31f85f2d1afabcead76c6
Analyze and fix the following issue in the Linux kernel code: xfs: truncate delalloc extents when IO fails in writeback
Problem Details: We currently use block_invalidatepage() to clean up pages where I/O fails in ->writepage(). Unfortunately, if the page has delalloc regions on it, we fail to remove the delalloc regions when we invalidate the page. This can result in tripping a BUG() in xfs_get_blocks() later on if a direct IO read is...
```diff diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 793908a8a09b..9083357f9e44 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -39,6 +39,7 @@ #include "xfs_iomap.h" #include "xfs_vnodeops.h" #include "xfs_trace.h" +#include "xfs_bmap.h" #include <linux/...
20f6b2c785cf187445f126321638ab8ba7aa7494
Analyze and fix the following issue in the Linux kernel code: xfs: check for more work before sleeping in xfssyncd
Problem Details: xfssyncd processes a queue of work by detaching the queue and then iterating over all the work items. It then sleeps for a time period or until new work comes in. If new work is queued while xfssyncd is actively processing the detached work queue, it will not process that new work until after a sleep t...
```diff diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index f9fc154d9f72..05cd85317f6f 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c @@ -607,7 +607,8 @@ xfssyncd( set_freezable(); timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); for (;;) { - timeleft = ...
694189328a7e566cb84bd3205503a42b60e87882
Analyze and fix the following issue in the Linux kernel code: xfs: Fix a build warning in xfs_aops.c
Problem Details: Fix a build warning that slipped through. Dave Chinner had posted an updated version of his patch but the previous version--without this fix--was what got committed. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Dave Chinner...
```diff diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index b493c63976cd..793908a8a09b 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -229,7 +229,7 @@ xfs_end_io( { xfs_ioend_t *ioend = container_of(work, xfs_ioend_t, io_work); struct xfs_inode *ip = XFS_I(io...
692247196dd845eef02f26bf2959719b82e935c6
Analyze and fix the following issue in the Linux kernel code: ASoC: Improve DAPM pop_wait delays
Problem Details: Currently during pop/click debug we're inserting a delay both after every log message we generate and at explicit points in the sequence, slowing things down even further than they need to be especially when many writes get coalesced by the sequence generation code. Remove the per-printk delay and ens...
```diff diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 6c3351095786..86ded22e36af 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -97,7 +97,6 @@ static void pop_dbg(u32 pop_time, const char *fmt, ...) if (pop_time) { vprintk(fmt, args); - pop_wait(pop_time); } va_end(args);...
d2db09b87eb7b547136d5d25ff1df06820e070bf
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: uninitialized variable fix
Problem Details: Commit eaa9b3a748539651f50e3a234c8854e1b42a839a introduced the following uninitialized warning: sound/pci/hda/patch_realtek.c: In function 'set_capture_mixer': sound/pci/hda/patch_realtek.c:4928: warning: 'pin' is used uninitialized in this function sound/pci/hda/patch_realtek.c:4918: note: 'pin' w...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b9f4689ccd9a..5d2fbb87b871 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4915,7 +4915,7 @@ static void fixup_automic_adc(struct hda_codec *codec) static void fixup_single_adc(struct hda_codec *...
0321b69569eadbc13242922925a4316754c5f744
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: Use LPIB for a Biostar Microtech board
Problem Details: BugLink: https://launchpad.net/bugs/523953 The OR has verified that position_fix=1 is necessary to work around errors on his machine. Reported-by: MMarking Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 531a0b6a66c1..c24bffa08c84 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2273,6 +2273,7 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = { SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS...
5bc923c505926af927d4f3011da92c243787d6a7
Analyze and fix the following issue in the Linux kernel code: Input: gamecon - fix off by one range check
Problem Details: It should be >= GC_MAX not > GC_MAX. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index ae998d99a5ae..7a55714a1486 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c @@ -819,7 +819,7 @@ static int __init gc_setup_pad(struct gc *gc, int idx, int pad_type) int i; int err; - ...
2b9ddcb8b2ce6a44f0f969000f16b016caa64294
Analyze and fix the following issue in the Linux kernel code: ALSA: usb/audio.h: Fix field order
Problem Details: Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index 6bb293684eb8..4d3e450e2b03 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h @@ -269,8 +269,8 @@ struct uac_format_type_i_ext_descriptor { __u8 bLength; __u8 bDescriptorType; __u8 bDescriptorSubtype; - __u8 bSubs...
50152dfaa7d09da85588b66fee7e8c7f541f631d
Analyze and fix the following issue in the Linux kernel code: ALSA: fix jazz16 compile (udelay)
Problem Details: While trying to compile jazz16 isa sound driver on alpha (2.6.33+git), I found a compile failure in jazz16.c (udelay is unknown). Fix it by including delay.h. Signed-foo-by: Meelis Roos <mroos@linux.ee> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/isa/sb/jazz16.c b/sound/isa/sb/jazz16.c index 8d21a3feda3a..8ccbcddf08e1 100644 --- a/sound/isa/sb/jazz16.c +++ b/sound/isa/sb/jazz16.c @@ -14,6 +14,7 @@ #include <linux/init.h> #include <linux/module.h> #include <linux/io.h> +#include <linux/delay.h> #include <asm/dma.h> #include <linux...
64e290ec69be39f1887fa0b403c1e417b6b038e7
Analyze and fix the following issue in the Linux kernel code: ext4: fix up rb_root initializations to use RB_ROOT
Problem Details: ext4 uses rb_node = NULL; to zero rb_root at few places. Using RB_ROOT as the initializer is more portable in case the underlying implementation of rbtrees changes in the future. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org...
```diff diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c index a60ab9aad57d..983f0e127493 100644 --- a/fs/ext4/block_validity.c +++ b/fs/ext4/block_validity.c @@ -205,14 +205,14 @@ void ext4_release_system_zone(struct super_block *sb) entry = rb_entry(n, struct ext4_system_zone, node); kmem_cache_...
facf92695dcf40836973ce09b7f62d3cc3a89152
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix S3C64xx IIS driver for Samsung header reorg
Problem Details: The reorgs of the Samsung headers have moved the GPIO bank definitions from plat/ to mach/ - the IIS driver needs to be updated to take care of this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c index cc7edb5f792d..22fdb799c883 100644 --- a/sound/soc/s3c24xx/s3c64xx-i2s.c +++ b/sound/soc/s3c24xx/s3c64xx-i2s.c @@ -28,8 +28,8 @@ #include <sound/soc.h> #include <plat/regs-s3c2412-iis.h> -#include <plat/gpio-bank-d.h> -#incl...
ab94c39b6fa076d4f6d2903dcc54cda35d938776
Analyze and fix the following issue in the Linux kernel code: quota: Properly invalidate caches even for filesystems with blocksize < pagesize
Problem Details: Sometimes invalidate_bdev() can fail to invalidate a part of block device cache because of dirty data. If the filesystem has blocksize smaller than page size, this can happen even for pages containing quota files and thus kernel would operate on stale data. Fix the issue by syncing the filesystem befor...
```diff diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 4d2041fddefc..10d021dd37c1 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -2033,11 +2033,13 @@ static int vfs_load_quota_inode(struct inode *inode, int type, int format_id, } if (!(dqopt->flags & DQUOT_QUOTA_SYS_FILE)) { - /* As we bypass th...
86963918965eb8fe0c8ae009e7c1b4c630f533d5
Analyze and fix the following issue in the Linux kernel code: jbd: Delay discarding buffers in journal_unmap_buffer
Problem Details: Delay discarding buffers in journal_unmap_buffer until we know that "add to orphan" operation has definitely been committed, otherwise the log space of committing transation may be freed and reused before truncate get committed, updates may get lost if crash happens. This patch is a backport of JBD2 f...
```diff diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 4bd882548c45..2c90e3ef625f 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -862,12 +862,12 @@ restart_loop: /* A buffer which has been freed while still being * journaled by a previous transaction may end up still * being dirty here, but we w...
0a5a9c725512461d19397490f3adf29931dca1f2
Analyze and fix the following issue in the Linux kernel code: quota: Fix warning when a delayed write happens before quota is enabled
Problem Details: If a delayed-allocation write happens before quota is enabled, the kernel spits out a warning: WARNING: at fs/quota/dquot.c:988 dquot_claim_space+0x77/0x112() because the fact that user has some delayed allocation is not recorded in quota structure. Make dquot_initialize() update amount of reserved s...
```diff diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index f11255b18b58..6c849de5dc8f 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -229,6 +229,8 @@ static struct hlist_head *dquot_hash; struct dqstats dqstats; EXPORT_SYMBOL(dqstats); +static qsize_t inode_get_rsv_space(struct inode *inode); + static...
c7e8d4d6dceeb6fd236991f590d3fa6f97c59874
Analyze and fix the following issue in the Linux kernel code: jbd[2]: remove references to BUFFER_DEBUG
Problem Details: CONFIG_BUFFER_DEBUG seems to have been removed from the documentation somewhere around 2.4.15 and seemingly hasn't been available even longer. It is, however, still referenced at one place from the jbd code (one is a copy of the other header). Time to clean it up Signed-off-by: Christoph Egger <sicceg...
```diff diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 331530cd3cc6..f3aa59cb675d 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -246,19 +246,8 @@ typedef struct journal_superblock_s #define J_ASSERT(assert) BUG_ON(!(assert)) -#if defined(CONFIG_BUFFER_DEBUG) -void buffer_assertion_fai...
8997de30adf5d11e9c807f1d89a894ffed60616b
Analyze and fix the following issue in the Linux kernel code: ARM: S3C2440: Fix plat-s3c24xx move of s3c2440/s3c2442 support
Problem Details: Commit 58bac7b8ded70c39bcd5f7037091051c277618aa failed to move the two PLL files s3c2440-pll-12000000.c and s3c2440-pll-16934400.c, so place these in arch/arm/mach-s3c2440 to fix this commit up. As a note, these are not built by the default configuration and thus the failure to move wasn't spotted unt...
```diff diff --git a/arch/arm/plat-s3c24xx/s3c2440-pll-12000000.c b/arch/arm/mach-s3c2440/s3c2440-pll-12000000.c similarity index 98% rename from arch/arm/plat-s3c24xx/s3c2440-pll-12000000.c rename to arch/arm/mach-s3c2440/s3c2440-pll-12000000.c index 49f65032f2c0..f105d5e8c477 100644 --- a/arch/arm/plat-s3c24xx/s3c244...
c8563473c1259f5686ceb918c548c80132089f79
Analyze and fix the following issue in the Linux kernel code: Security: Fix some coding styles in security/keys/keyring.c
Problem Details: Fix some coding styles in security/keys/keyring.c Signed-off-by: Zhitong Wang <zhitong.wangzt@alibaba-inc.com> Signed-off-by: James Morris <jmorris@namei.org>
```diff diff --git a/security/keys/keyring.c b/security/keys/keyring.c index e814d2109f8e..a98fb376f249 100644 --- a/security/keys/keyring.c +++ b/security/keys/keyring.c @@ -170,12 +170,10 @@ static void keyring_describe(const struct key *keyring, struct seq_file *m) { struct keyring_list *klist; - if (keyring->d...
9421502b4fc894cc477be8fc49776830e37ca157
Analyze and fix the following issue in the Linux kernel code: [LogFS] Fix bdev erases
Problem Details: Erases for block devices were always just emulated by writing 0xff. Some time back the write was removed and only the page cache was changed to 0xff. Superficialy a good idea with two problems: 1. Touching the page cache isn't necessary either. 2. However, writing out 0xff _is_ necessary for the journ...
```diff diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c index 58a057b6e1af..9718c22f186d 100644 --- a/fs/logfs/dev_bdev.c +++ b/fs/logfs/dev_bdev.c @@ -167,27 +167,91 @@ static void bdev_writeseg(struct super_block *sb, u64 ofs, size_t len) generic_unplug_device(bdev_get_queue(logfs_super(sb)->s_bdev)); } -...
a71b676fa9b92119c0fb4e3fab34e45a17f15107
Analyze and fix the following issue in the Linux kernel code: Staging: winbond: fix up wireless api errors
Problem Details: The wireless core made a number of api changes that caused the winbond driver to break. This patch fixes those errors by making the needed changes to the driver. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c index ecf418dcefd9..3482eec18651 100644 --- a/drivers/staging/winbond/wbusb.c +++ b/drivers/staging/winbond/wbusb.c @@ -65,17 +65,17 @@ static void hal_set_beacon_period(struct hw_data *pHwData, u16 beacon_period) } static int wb...
62c8cbbfc2367e706317f56ac21959120ae72773
Analyze and fix the following issue in the Linux kernel code: sh: Move PMB debugfs entry initialization to later stage
Problem Details: ... so the "sh_debugfs_root" is already available. Previously it wasn't and in result its path was "/sys/kernel/debug/pmb" instead of "/sys/kernel/debug/sh/pmb". Signed-off-by: Pawel Moll <pawel.moll@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index 30035caeb73a..a4662e2782c3 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c @@ -871,7 +871,7 @@ static int __init pmb_debugfs_init(void) return 0; } -postcore_initcall(pmb_debugfs_init); +subsys_initcall(pmb_debugfs_init); #ifdef CONFIG_PM stat...
b94c765ac31f8eb9c6fe895ba611bb446b799635
Analyze and fix the following issue in the Linux kernel code: Staging: dream: camera: sk5k3e2fx: fix code style issues
Problem Details: This fixes some code style issues about assignments in if conditions. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/dream/camera/s5k3e2fx.c b/drivers/staging/dream/camera/s5k3e2fx.c index edba19889b0f..2426f5e5b2aa 100644 --- a/drivers/staging/dream/camera/s5k3e2fx.c +++ b/drivers/staging/dream/camera/s5k3e2fx.c @@ -743,12 +743,12 @@ static int s5k3e2fx_sensor_open_init(const struct msm_camera_se...
df84f941e9370be6798fa11aa5a77396d8869fdc
Analyze and fix the following issue in the Linux kernel code: Staging: dream: camera: msm_camera: fix code style issues
Problem Details: This fixes some code style issues like to add one space after a while or switch statement and before a open parenthesis '(', and to include KERN_ facility level in the printk() functions. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hart...
```diff diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 925e16c324d2..223918f858e7 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c @@ -76,14 +76,14 @@ static LIST_HEAD(msm_sensors); list_del_init(&qcmd->li...
639b9f1ee5987270be2bca4bf8b7e6110d3b47ec
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix suspect code indent in ni_labpc.c
Problem Details: This is a patch to the ni_labpc.c file that fixes suspect code indent for conditional statements found by the checkpatch.pl tool Signed-off-by: Stewart Robertson <stewart_r@aliencamel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index d6b5c05ee199..ddc3b0715dc3 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -583,8 +583,11 @@ int labpc_common_attach(struct comedi_device *dev, unsig...
65d6d26c6bcd802ebe2b22a29d9b6bbebfd8d7f8
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix yet another brace coding style issue in ni_labpc.c
Problem Details: This is a patch to the ni_labpc.c file that fixes up all the brace warnings found by the checkpatch.pl tool Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 5dc8606009aa..d6b5c05ee199 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -642,9 +642,8 @@ int labpc_common_attach(struct comedi_device *dev, unsign...
2bb9c335902a5d59fc084170aaae0ccc9d9d4012
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix another brace coding style issues in ni_labpc.c
Problem Details: This is a patch to the ni_labpc.c file that fixes up a brace warning found by the checkpatch.pl tool Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index a01e35d4b31e..5dc8606009aa 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -638,9 +638,8 @@ int labpc_common_attach(struct comedi_device *dev, unsign...
8377e813c75cf5aca46032fb780ca74c923dbe86
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix brace coding style issue in ni_labpc.c
Problem Details: This is a patch to the ni_labpc.c file that fixes up a brace warning found by the checkpatch.pl tool. Signed-off-by: Maurice Dawson <maurice2699@btinternet.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index dc3f398cb3ed..a01e35d4b31e 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -483,12 +483,10 @@ int labpc_common_attach(struct comedi_device *dev, unsi...
a917d4c4251314afc196fd7a7d9d10faff2effda
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: poc: Adding some KERN_ facility level
Problem Details: This fixes some coding style issues like include KERN_ facility levels in some printk() and one trailing whitespace error. Signed-off-by: Chihau Chau <chihau@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c index 28eba6d3cb5a..e15fbd7d3141 100644 --- a/drivers/staging/comedi/drivers/poc.c +++ b/drivers/staging/comedi/drivers/poc.c @@ -122,22 +122,21 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *i...
d4023a5ee2f683f57636346c0baf94cda710055a
Analyze and fix the following issue in the Linux kernel code: Staging: dream: camera: msm_camera: fix some code style issues
Problem Details: This fixes some code style issues like else staments after the close braces '}' and to use __func__ instead of __FUNCTION__. Signed-off-by: Chihau Chau <chihau@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 4f808dc2ca48..925e16c324d2 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c @@ -670,7 +670,7 @@ static int msm_get_stats(struct msm_sync *sync, void __us...
71508ee489e09dc206ea3f62542dd3bd11c0e201
Analyze and fix the following issue in the Linux kernel code: Staging: wlan-ng: fix most of the style issues in hfa384x.h
Problem Details: This patch fixes all the errors and the majority of the warnings found with checkpatch.pl script in hfa384x.h, following Gábor Stefanik hints Signed-off-by: Alessandro Ghedini <al3xbio@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index 46cce8159e59..5984d74dfce2 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -61,17 +61,17 @@ #include <linux/if_ether.h> /*--- Mins & Maxs -----------------------------------*/ -...
49c9b5c7bd6cf87ccc1d820dec8d23ba3ae53f64
Analyze and fix the following issue in the Linux kernel code: Staging: dream: camera: msm_camera: fix coding style issues
Problem Details: This fixes some coding style issues like to use __func__ instead __FUNCTION__, "foo *bar" instead "foo* bar" and a initial comment with "/* */" instead "//" Signed-off-by: Chihau Chau <chihau@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/dream/camera/msm_camera.c b/drivers/staging/dream/camera/msm_camera.c index 7d938772eacc..4f808dc2ca48 100644 --- a/drivers/staging/dream/camera/msm_camera.c +++ b/drivers/staging/dream/camera/msm_camera.c @@ -2,7 +2,7 @@ * Copyright (C) 2008-2009 QUALCOMM Incorporated. */ -//...
0054a361e44bf71b8bb79b863bcf00e04dc4a464
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix bracing coding style and 80 character issues in ni_660x.c
Problem Details: This is a patch to the ni_660x.c file that fixes up the brace and 80 character issues found by the checkpatch tool Signed-off-by: Graham M Howe <gmhowe@btopenworld.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 404d3c516ed1..df61e5a03ae1 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -52,7 +52,8 @@ enum ni_660x_constants { }; #define NUM_PFI_CHANNELS 40 -/*...
c2ca6a476a2fde7239a576c1bde8d7cd2ded87a8
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix bracing coding style issue in ni_65xx.c
Problem Details: This is a patch to the ni_65xx.c file that fixes up a brace warning found by the checkpatch.pl tool Signed-off-by: Graham M Howe <gmhowe@btopenworld.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c index bbf75eb6d7f2..dad79d5efec6 100644 --- a/drivers/staging/comedi/drivers/ni_65xx.c +++ b/drivers/staging/comedi/drivers/ni_65xx.c @@ -26,12 +26,13 @@ /* Driver: ni_65xx Description: National Instruments 65xx ...
dedf3ad1534ff5e30a2eba88afe64bbe7beecfb6
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: pcmad: Checkpatch cleanups
Problem Details: This fixes all checkpatch issues in the pcmad comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/pcmad.c b/drivers/staging/comedi/drivers/pcmad.c index acac67090810..f7991a9e0a78 100644 --- a/drivers/staging/comedi/drivers/pcmad.c +++ b/drivers/staging/comedi/drivers/pcmad.c @@ -34,11 +34,11 @@ Configuration options: [0] - I/O port base [1] - unused [2] ...
52d83bde6f10480268c454b3373bfcec8c2e3c3e
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: poc: fix coding style issues
Problem Details: This fixes a line over 80 characters and a brace warnings. Signed-off-by: Chihau Chau <chihau@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c index d23e588d0632..28eba6d3cb5a 100644 --- a/drivers/staging/comedi/drivers/poc.c +++ b/drivers/staging/comedi/drivers/poc.c @@ -136,8 +136,8 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)...
9919c7619c52d01e89103bca405cc3d4a2b1ac31
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: Use LPIB for Dell Latitude 131L
Problem Details: BugLink: https://launchpad.net/bugs/530346 The OR has verified that position_fix=1 is necessary to work around errors on his machine. Reported-by: Tom Louwrier Cc: <stable@kernel.org> Signed-off-by: Daniel T Chen <crimsun@ubuntu.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index b1047570e78d..531a0b6a66c1 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2268,6 +2268,7 @@ static int azx_dev_free(struct snd_device *device) static struct snd_pci_quirk position_fix_list[] __devinitdata = { ...
8d53dd546f36073e0d29b0cfc24c665db301e3e7
Analyze and fix the following issue in the Linux kernel code: rcu, ftrace: Fix RCU lockdep splat in ftrace_perf_buf_prepare()
Problem Details: Change the pair of rcu_dereference() calls in ftrace_perf_buf_prepare() to rcu_dereference_sched(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: laijs@cn.fujitsu.com Cc: dipankar@in.ibm.com ...
```diff diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 0804cd594803..601ad7744247 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h @@ -699,9 +699,9 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ * __cpu = smp_processor_id(); * * if (in_nmi()) - * trace_buf =...