id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
19f2c05964dc428ef639fcda1cce7c8c3075c9cc
Analyze and fix the following issue in the Linux kernel code: hwmon: (ds1621) Fix checkpatch issues
Problem Details: Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: trailing whitespace WARNING: labels should not be indented WARNING: please, no spaces at the start of a line WARNING: simple_strtol is obsolete, use kstrtol instead Also modified multi-line com...
```diff diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c index 9832ac53c4b7..f647a3307ebc 100644 --- a/drivers/hwmon/ds1621.c +++ b/drivers/hwmon/ds1621.c @@ -1,25 +1,25 @@ /* - ds1621.c - Part of lm_sensors, Linux kernel modules for hardware - monitoring - Christian W. Zuckschwerdt <zan...
61ba031841ad60c4a9ea16b20dd46b6cdb0faf2a
Analyze and fix the following issue in the Linux kernel code: hwmon: (vt8231) Fix multi-line comments
Problem Details: Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
```diff diff --git a/drivers/hwmon/vt8231.c b/drivers/hwmon/vt8231.c index eb74f3778c90..386a84538010 100644 --- a/drivers/hwmon/vt8231.c +++ b/drivers/hwmon/vt8231.c @@ -1,28 +1,29 @@ /* - vt8231.c - Part of lm_sensors, Linux kernel modules - for hardware monitoring + * vt8231.c - Part of lm_sensors, Linux kernel ...
9ed5bc24fa2b4ebe52b5aec3318babe2aa31795a
Analyze and fix the following issue in the Linux kernel code: hwmon: (adt7475) Fix multi-line comments
Problem Details: Cc: Jean Delvare <khali@linux-fr.org> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
```diff diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index 71e9ac4b8494..a3b46924a15d 100644 --- a/drivers/hwmon/adt7475.c +++ b/drivers/hwmon/adt7475.c @@ -32,9 +32,10 @@ #define THERM 5 #define HYSTERSIS 6 -/* These are unique identifiers for the sysfs functions - unlike the - numbers above, ...
2fff0840c2fa18bd84613c307770e46ddd9db8e2
Analyze and fix the following issue in the Linux kernel code: hwmon: (f71805f) Fix checkpatch issues
Problem Details: Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: "foo* bar" should be "foo *bar" ERROR: need consistent spacing around '|' (ctx:VxW) WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul inst...
```diff diff --git a/drivers/hwmon/f71805f.c b/drivers/hwmon/f71805f.c index 2309be5b1861..3e4da620e9c7 100644 --- a/drivers/hwmon/f71805f.c +++ b/drivers/hwmon/f71805f.c @@ -241,9 +241,11 @@ static inline long fan_from_reg(u16 reg) static inline u16 fan_to_reg(long rpm) { - /* If the low limit is set below what th...
703af96040491912efbe8b48e14cb70db054cc1b
Analyze and fix the following issue in the Linux kernel code: hwmon: (max6650) Fix multi-line comments
Problem Details: Cc: Hans J. Koch <hjk@hansjkoch.de> Acked-by: Hans J. Koch <hjk@hansjkoch.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
```diff diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c index 159ce0275325..0998094a2871 100644 --- a/drivers/hwmon/max6650.c +++ b/drivers/hwmon/max6650.c @@ -159,13 +159,13 @@ static ssize_t get_fan(struct device *dev, struct device_attribute *devattr, int rpm; /* - * Calculation details: - * - *...
c531eb3f229bcc3b4ee7fb471e580caff86dafad
Analyze and fix the following issue in the Linux kernel code: hwmon: (w83781d) Fix checkpatch issues
Problem Details: Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: "foo* bar" should be "foo *bar" ERROR: space prohibited after that open parenthesis '(' ERROR: space required after that ',' (ctx:VxV) ERROR: spaces required around that '==' (ctx:VxV) WARNING: ...
```diff diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c index 17a8fa2d9ae9..e8a19005b7d2 100644 --- a/drivers/hwmon/w83781d.c +++ b/drivers/hwmon/w83781d.c @@ -1,9 +1,9 @@ /* w83781d.c - Part of lm_sensors, Linux kernel modules for hardware - monitoring + monitoring Copyright (...
2b22de5117d6dec44b62c305cb456e5b9a913c95
Analyze and fix the following issue in the Linux kernel code: hwmon: (adm1025) Fix checkpatch issues
Problem Details: Fixed: ERROR: do not use assignment in if condition ERROR: space required after that ',' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: spaces required around that '=' (ctx:VxV) ERROR: trailing whitespace WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul...
```diff diff --git a/drivers/hwmon/adm1025.c b/drivers/hwmon/adm1025.c index 60befc0ee65f..1a7f65102343 100644 --- a/drivers/hwmon/adm1025.c +++ b/drivers/hwmon/adm1025.c @@ -12,7 +12,7 @@ * resolution of about 0.5% of the nominal value). Temperature values are * reported with a 1 deg resolution and a 3 deg accurac...
79738416f6016198aef64a772d94ce50fe8b0f5c
Analyze and fix the following issue in the Linux kernel code: hwmon: (abituguru3) Fix checkpatch issues
Problem Details: Fixed: ERROR: do not use assignment in if condition ERROR: "foo* bar" should be "foo *bar" WARNING: line over 80 characters Not fixed: WARNING: msleep < 20ms can sleep for up to 20ms Cc: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com> Signed-off-by: Guent...
```diff diff --git a/drivers/hwmon/abituguru3.c b/drivers/hwmon/abituguru3.c index 34a14a77e008..93ab1a5001c7 100644 --- a/drivers/hwmon/abituguru3.c +++ b/drivers/hwmon/abituguru3.c @@ -80,7 +80,8 @@ #define ABIT_UGURU3_MAX_NO_SENSORS 26 /* sum of strlen +1 of: in??_input\0, in??_{min,max}\0, in??_{min,max}_alarm\0,...
65fe5c79577f181909a13500106027efd05db19a
Analyze and fix the following issue in the Linux kernel code: hwmon: (vt8231) Fix checkpatch issues
Problem Details: Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: trailing statements should be on next line WARNING: braces {} are not necessary for any arm of this statement WARNING: line over 80 characters WARNING: please, no space before tabs WARNING: simp...
```diff diff --git a/drivers/hwmon/vt8231.c b/drivers/hwmon/vt8231.c index 11d6a39d2b9e..eb74f3778c90 100644 --- a/drivers/hwmon/vt8231.c +++ b/drivers/hwmon/vt8231.c @@ -56,12 +56,12 @@ static struct platform_device *pdev; which sets the selected inputs marked with '*' below if multiple options are possible: ...
bafda5d0f5eeef6f80a9030b23d824fd16dcd827
Analyze and fix the following issue in the Linux kernel code: hwmon: (max6650) Fix checkpatch issues
Problem Details: Fixed: ERROR: do not use assignment in if condition ERROR: open brace '{' following struct go on the same line ERROR: spaces required around that '||' (ctx:VxV) ERROR: switch and case should be at the same indent WARNING: simple_strtoul is obsolete, use kstrtoul instead Cc: Hans J. Koch <hjk@hansjkoch...
```diff diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c index 2fc034aeca09..159ce0275325 100644 --- a/drivers/hwmon/max6650.c +++ b/drivers/hwmon/max6650.c @@ -135,8 +135,7 @@ static struct i2c_driver max6650_driver = { * Client data (each client gets its own) */ -struct max6650_data -{ +struct max...
b3789a0de229b4e9cc6d2531c7cbcdb5424a37b8
Analyze and fix the following issue in the Linux kernel code: hwmon: (lm83) fix checkpatch issues
Problem Details: resolved: ERROR: trailing whitespace WARNING: please, no spaces at the start of a line WARNING: simple_strtol is obsolete, use kstrtol instead ERROR: do not use assignment in if condition Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericss...
```diff diff --git a/drivers/hwmon/lm83.c b/drivers/hwmon/lm83.c index 8290476aee4a..1fed26579fdb 100644 --- a/drivers/hwmon/lm83.c +++ b/drivers/hwmon/lm83.c @@ -124,7 +124,7 @@ static struct lm83_data *lm83_update_device(struct device *dev); /* * Driver data (common to all clients) */ - + static const struct i...
93092a644fb519ec520c3a1f3e05ef9d25b1dac4
Analyze and fix the following issue in the Linux kernel code: hwmon: (k8temp) fix checkpatch issues
Problem Details: resolved: WARNING: line over 80 characters ERROR: do not use assignment in if condition Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/k8temp.c b/drivers/hwmon/k8temp.c index d985ae3558f8..575101988751 100644 --- a/drivers/hwmon/k8temp.c +++ b/drivers/hwmon/k8temp.c @@ -46,7 +46,7 @@ struct k8temp_data { unsigned long last_updated; /* in jiffies */ /* registers values */ - u8 sensorsp; /* sensor presence bits ...
6a9e7c4c0365e246d85166a5ee04a8dd4dcfada9
Analyze and fix the following issue in the Linux kernel code: hwmon: (lm80) fix checkpatch warnings
Problem Details: fix: WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> [guenter.roeck@ericsson.com: kstrtol->kstrtoul where appropriate] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson....
```diff diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c index 616f470c38b3..c4de272f3aaf 100644 --- a/drivers/hwmon/lm80.c +++ b/drivers/hwmon/lm80.c @@ -185,7 +185,10 @@ static ssize_t set_in_##suffix(struct device *dev, \ int nr = to_sensor_dev_attr(attr)->index; \ struct i2c_client *client = to_i2c_clie...
6b904b623ab4646ce64124462c4bec6f0d3f78a6
Analyze and fix the following issue in the Linux kernel code: hwmon: (adt7470) fix checkpatch issues
Problem Details: fixed: ERROR: that open brace { should be on the previous line #1135: FILE: adt7470.c:1135: +static struct attribute *adt7470_attr[] = +{ ERROR: do not use assignment in if condition #1279: FILE: adt7470.c:1279: + if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs))) Signed-off-by: Frans M...
```diff diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c index 5e10c79f2dfd..b23efd9c232f 100644 --- a/drivers/hwmon/adt7470.c +++ b/drivers/hwmon/adt7470.c @@ -1131,8 +1131,7 @@ static SENSOR_DEVICE_ATTR(pwm3_auto_channels_temp, S_IWUSR | S_IRUGO, static SENSOR_DEVICE_ATTR(pwm4_auto_channels_temp, S_IWU...
e6a83dbec9a62b9d57826c1dd17a62c9ad41a5aa
Analyze and fix the following issue in the Linux kernel code: hwmon: (adt7411) fix checkpatch issues
Problem Details: fixed: WARNING: please, no space before tabs #11: FILE: adt7411.c:11: + * ^I use power-down mode for suspend?, interrupt handling?$ not fixed as all other macros around it are the same structure and this one is only 2 chars longer: WARNING: line over 80 characters #229: FILE: adt7411.c:229: +static A...
```diff diff --git a/drivers/hwmon/adt7411.c b/drivers/hwmon/adt7411.c index 5b02f7a91018..ffe64f8771a0 100644 --- a/drivers/hwmon/adt7411.c +++ b/drivers/hwmon/adt7411.c @@ -8,7 +8,7 @@ * published by the Free Software Foundation. * * TODO: SPI, support for external temperature sensor - * use power-down mod...
56c24af8def73ec0f8e172771287400ce76e3bcd
Analyze and fix the following issue in the Linux kernel code: hwmon: (lm70) fix checkpatch issues
Problem Details: fixed: ERROR: spaces required around that '=' (ctx:VxV) #60: FILE: lm70.c:60: + s16 raw=0; ^ ERROR: do not use assignment in if condition #168: FILE: lm70.c:168: + if ((status = device_create_file(&spi->dev, &dev_attr_temp1_input)) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.c...
```diff diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c index c274ea25d899..0994cb086754 100644 --- a/drivers/hwmon/lm70.c +++ b/drivers/hwmon/lm70.c @@ -57,7 +57,7 @@ static ssize_t lm70_sense_temp(struct device *dev, struct spi_device *spi = to_spi_device(dev); int status, val = 0; u8 rxbuf[2]; - s16 r...
1dc370899f97ae281ff2a63df39b8d574dd67cc0
Analyze and fix the following issue in the Linux kernel code: hwmon: (f71882fg) fix checkpatch issues
Problem Details: fixed: WARNING: static const char * array should probably be static const char * const +static const char *f71882fg_names[] = { Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index e50305819f01..f8a9c9a86a44 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c @@ -112,7 +112,7 @@ MODULE_PARM_DESC(force_id, "Override the detected device ID"); enum chips { f71808e, f71808a, f71858fg, f71862fg, f71869, f7...
c6e8ac0405c4274d4d716eee2340d8d8dee2b429
Analyze and fix the following issue in the Linux kernel code: hwmon: (asus_atk0110) fix checkpatch issues
Problem Details: fixed: WARNING: line over 80 characters #1321: FILE: asus_atk0110.c:1321: + if (data->rtmp_handle && data->rvlt_handle && data->rfan_handle && !new_if) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index 00e98517f94c..4000fee9d989 100644 --- a/drivers/hwmon/asus_atk0110.c +++ b/drivers/hwmon/asus_atk0110.c @@ -1318,7 +1318,8 @@ static int atk_probe_if(struct atk_data *data) */ if (new_if) dev_info(dev, "Overriding interface d...
99b8c83a7720da66c9054aa06f5c13c30555c17d
Analyze and fix the following issue in the Linux kernel code: hwmon: (adt7475) fix checkpatch issues
Problem Details: fixed: WARNING: static const char * array should probably be static const char * const + static const char *names[] = { Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/adt7475.c b/drivers/hwmon/adt7475.c index 7dab3547fee5..71e9ac4b8494 100644 --- a/drivers/hwmon/adt7475.c +++ b/drivers/hwmon/adt7475.c @@ -1232,7 +1232,7 @@ static void adt7475_remove_files(struct i2c_client *client, static int adt7475_probe(struct i2c_client *client, const str...
b2ae8f87f48d40b720ec011499e99bdf5c519c82
Analyze and fix the following issue in the Linux kernel code: hwmon: (smm665) fix checkpatch issues
Problem Details: fixed: WARNING: please, no spaces at the start of a line #379: FILE: smm665.c:379: + static ssize_t smm665_show_##what(struct device *dev, \$ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/smm665.c b/drivers/hwmon/smm665.c index 411638181fd8..1b4301f93787 100644 --- a/drivers/hwmon/smm665.c +++ b/drivers/hwmon/smm665.c @@ -376,7 +376,7 @@ static ssize_t smm665_show_input(struct device *dev, } #define SMM665_SHOW(what) \ - static ssize_t smm665_show_##what(struct de...
c9e1498a186b643fff21c5d5340a35fcf1151181
Analyze and fix the following issue in the Linux kernel code: hwmon: (sht15) fix checkpatch issues
Problem Details: fixed: WARNING: line over 80 characters #809: FILE: sht15.c:809: + /* If still not occurred or another handler has been scheduled */ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c index 91fdd1fe18b0..8b011d016621 100644 --- a/drivers/hwmon/sht15.c +++ b/drivers/hwmon/sht15.c @@ -806,7 +806,7 @@ static void sht15_bh_read_data(struct work_struct *work_s) */ atomic_set(&data->interrupt_handled, 0); enable_irq(gpio_to_irq(d...
0910b28ef44a0ef3653ac6a10ee8eab0acfe3f09
Analyze and fix the following issue in the Linux kernel code: hwmon: (ibmaem) fix checkpatch issues
Problem Details: fixed: WARNING: please, no space before tabs +{"power3_average", ^I aem2_show_pcap_value,^IPOWER_AUX},$ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/ibmaem.c b/drivers/hwmon/ibmaem.c index cc2981f749a6..37f17e0d9d5d 100644 --- a/drivers/hwmon/ibmaem.c +++ b/drivers/hwmon/ibmaem.c @@ -1045,7 +1045,7 @@ static struct aem_ro_sensor_template aem2_ro_sensors[] = { {"power6_average", aem2_show_pcap_value, POWER_CAP_MIN_WARNING}, {"p...
dcb7cb97bafff6c93b65626634f9c066436bf9d2
Analyze and fix the following issue in the Linux kernel code: hwmon: (ad7414) fix checkpatch issues
Problem Details: fixed: WARNING: simple_strtol is obsolete, use kstrtol instead #133: FILE: ad7414.c:133: + long temp = simple_strtol(buf, NULL, 10); Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/ad7414.c b/drivers/hwmon/ad7414.c index df29a7fff9e7..edbdb6d9a837 100644 --- a/drivers/hwmon/ad7414.c +++ b/drivers/hwmon/ad7414.c @@ -130,7 +130,11 @@ static ssize_t set_max_min(struct device *dev, struct ad7414_data *data = i2c_get_clientdata(client); int index = to_sensor_dev_...
e91aef22cdb9ca12099d6d21f88de5036fe26fb5
Analyze and fix the following issue in the Linux kernel code: hwmon: (ad7418) fix checkpatch issues
Problem Details: fixed: WARNING: simple_strtol is obsolete, use kstrtol instead + long temp = simple_strtol(buf, NULL, 10); ERROR: do not use assignment in if condition + if (!(data = kzalloc(sizeof(struct ad7418_data), GFP_KERNEL))) { ERROR: do not use assignment in if condition + if ((err = sysfs_create_group(&clie...
```diff diff --git a/drivers/hwmon/ad7418.c b/drivers/hwmon/ad7418.c index 8cb718ce8237..42461d1ff101 100644 --- a/drivers/hwmon/ad7418.c +++ b/drivers/hwmon/ad7418.c @@ -167,7 +167,11 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *devattr, struct sensor_device_attribute *attr = to_sensor_dev...
599654255d4a933e71641b5e3cb8ceb753830c5f
Analyze and fix the following issue in the Linux kernel code: hwmon: (w83l785ts) fix checkpatch issues
Problem Details: fixed: ERROR: trailing whitespace + $ WARNING: please, no spaces at the start of a line + $ not fixed (did not want to break url): WARNING: line over 80 characters + * http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83L785TS-S.pdf Signed-off-by: Frans Meulenbroeks <fransmeulenbroek...
```diff diff --git a/drivers/hwmon/w83l785ts.c b/drivers/hwmon/w83l785ts.c index 20781def65ed..edfc1ec7e77a 100644 --- a/drivers/hwmon/w83l785ts.c +++ b/drivers/hwmon/w83l785ts.c @@ -86,7 +86,7 @@ static struct w83l785ts_data *w83l785ts_update_device(struct device *dev); /* * Driver data (common to all clients) */...
a6100f6b49bf8e30c42add718db47f7c39392f5b
Analyze and fix the following issue in the Linux kernel code: hwmon: (wm831x-hwmon) fix checkpatch issues
Problem Details: fixed: WARNING: static const char * array should probably be static const char * const +static const char *input_names[] = { not fixed (will probably provide separate fix later) ERROR: Macros with multiple statements should be enclosed in a do - while loop +#define WM831X_NAMED_VOLTAGE(id, name) \ + W...
```diff diff --git a/drivers/hwmon/wm831x-hwmon.c b/drivers/hwmon/wm831x-hwmon.c index 9b598ed26020..23b44de76740 100644 --- a/drivers/hwmon/wm831x-hwmon.c +++ b/drivers/hwmon/wm831x-hwmon.c @@ -40,7 +40,7 @@ static ssize_t show_name(struct device *dev, return sprintf(buf, "wm831x\n"); } -static const char *input_...
839a9eefc918345ae7a7e8c6f583e2e653646d4d
Analyze and fix the following issue in the Linux kernel code: hwmon: fix checkpatch issues
Problem Details: fixed: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable +EXPORT_SYMBOL_GPL(hwmon_device_register); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable +EXPORT_SYMBOL_GPL(hwmon_device_unregister); Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks...
```diff diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index 6460487e41b5..b58a0ffbd3bd 100644 --- a/drivers/hwmon/hwmon.c +++ b/drivers/hwmon/hwmon.c @@ -55,6 +55,7 @@ struct device *hwmon_device_register(struct device *dev) return hwdev; } +EXPORT_SYMBOL_GPL(hwmon_device_register); /** * hwmon_d...
08f509077499907c8bae59818771ce18d3179aa9
Analyze and fix the following issue in the Linux kernel code: hwmon: (adm1029) fix checkpatch issues
Problem Details: fixed: ERROR: space prohibited after that open parenthesis '(' +#define DIV_FROM_REG(val) ( 1 << (((val) >> 6) - 1)) WARNING: simple_strtol is obsolete, use kstrtol instead + long val = simple_strtol(buf, NULL, 10); ERROR: do not use assignment in if condition + if ((err = sysfs_create_group(&client-...
```diff diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c index 0b8a3b145bd2..d789c334476b 100644 --- a/drivers/hwmon/adm1029.c +++ b/drivers/hwmon/adm1029.c @@ -78,7 +78,7 @@ static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, #define TEMP_FROM_REG(val) ((val) * 1000) -#d...
4d7c5d4f40246f0f50767a1fe6445e067a972c64
Analyze and fix the following issue in the Linux kernel code: hwmon: (g760a) fix checkpatch issues
Problem Details: fixed: ERROR: code indent should use tabs where possible + fan speed PWM controller chip$ ERROR: trailing whitespace + http://www.gmt.com.tw/product/datasheet/EDS-760A.pdf $ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@eri...
```diff diff --git a/drivers/hwmon/g760a.c b/drivers/hwmon/g760a.c index 781277ddbaa5..81b6e3533fd6 100644 --- a/drivers/hwmon/g760a.c +++ b/drivers/hwmon/g760a.c @@ -1,11 +1,11 @@ /* g760a - Driver for the Global Mixed-mode Technology Inc. G760A - fan speed PWM controller chip + fan speed PWM cont...
7b102ed66030a454eac1afce3af89eb3d03b0ce4
Analyze and fix the following issue in the Linux kernel code: hwmon: (i5k_amb) fix checkpatch issues
Problem Details: fixed: WARNING: simple_strtoul is obsolete, use kstrtoul instead + unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; WARNING: simple_strtoul is obsolete, use kstrtoul instead + unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; WARNING: simple_strtoul is obsolete, use kstrtoul instead ...
```diff diff --git a/drivers/hwmon/i5k_amb.c b/drivers/hwmon/i5k_amb.c index d22f241b6a67..a18882cc073d 100644 --- a/drivers/hwmon/i5k_amb.c +++ b/drivers/hwmon/i5k_amb.c @@ -159,8 +159,12 @@ static ssize_t store_amb_min(struct device *dev, { struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); stru...
600151b9de97bd580f9dc09199a10f0c2b65cb97
Analyze and fix the following issue in the Linux kernel code: hwmon: use DEFINE_PCI_DEVICE_TABLE
Problem Details: fix all checkpatch warnings about DEFINE_PCI_DEVICE_TABLE Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 41aa6a319870..aba29d63f195 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -205,7 +205,7 @@ static void __devexit k10temp_remove(struct pci_dev *pdev) pci_set_drvdata(pdev, NULL); } -static const struct pci_device_id...
7fe83ad877321f44c8141b8334bd2f6614deb739
Analyze and fix the following issue in the Linux kernel code: hwmon: remove () used with return
Problem Details: fix checkpatch ERROR: return is not a function, parentheses are not required Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon/atxp1.c index 33cc143b2069..805e3b1b5621 100644 --- a/drivers/hwmon/atxp1.c +++ b/drivers/hwmon/atxp1.c @@ -106,7 +106,7 @@ static struct atxp1_data * atxp1_update_device(struct device *dev) mutex_unlock(&data->update_lock); - return(data); + return data;...
a6bee4a5571d24b9ba7c98f6becc7c45312a537d
Analyze and fix the following issue in the Linux kernel code: hwmon: (amc6821) fix initialisation
Problem Details: fix checkpatch error: ERROR: do not initialise statics to 0 or NULL Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
```diff diff --git a/drivers/hwmon/amc6821.c b/drivers/hwmon/amc6821.c index 89a6b9da0ec3..4a4bfef3d976 100644 --- a/drivers/hwmon/amc6821.c +++ b/drivers/hwmon/amc6821.c @@ -47,7 +47,7 @@ static const unsigned short normal_i2c[] = {0x18, 0x19, 0x1a, 0x2c, 0x2d, 0x2e, * Insmod parameters */ -static int pwminv = 0...
3e85fc1b9fc1c7e20b9a01f2314bb633bb10501a
Analyze and fix the following issue in the Linux kernel code: [media] tda10071: fix the delivery system
Problem Details: Commit b2a29b578d9c21b2e5c88020f830d3c42115c51d sets accidentally supported delivery systems as DVB-T/T2 whilst it should be DVB-S/S2. Due to that frontend cannot be used at all. Reported-by: Jiří Zelenka <klacek@bubakov.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho ...
```diff diff --git a/drivers/media/dvb/frontends/tda10071.c b/drivers/media/dvb/frontends/tda10071.c index a99205026751..c21bc92d2811 100644 --- a/drivers/media/dvb/frontends/tda10071.c +++ b/drivers/media/dvb/frontends/tda10071.c @@ -1215,7 +1215,7 @@ error: EXPORT_SYMBOL(tda10071_attach); static struct dvb_fronte...
976af684bb7d2eb9e7dae7ae31d43843f0aa580b
Analyze and fix the following issue in the Linux kernel code: Documentation/powerpc/mpc52xx.txt: Checkpatch cleanup
Problem Details: Fix all trailing whitespace errors reported by checkpatch. Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Anatolij Gustschin <agust@denx.de>
```diff diff --git a/Documentation/powerpc/mpc52xx.txt b/Documentation/powerpc/mpc52xx.txt index 10dd4ab93b85..0d540a31ea1a 100644 --- a/Documentation/powerpc/mpc52xx.txt +++ b/Documentation/powerpc/mpc52xx.txt @@ -2,7 +2,7 @@ Linux 2.6.x on MPC52xx family ----------------------------- For the latest info, go to ht...
18d627113b830cda80792e96b28341bcd41cf40c
Analyze and fix the following issue in the Linux kernel code: firewire: prevent dropping of completed iso packet header data
Problem Details: The buffer for the header data of completed iso packets has a fixed size, so it is possible to configure a stream with a big interval between interrupt packets or with big headers so that this buffer would overflow. Previously, ohci.c would drop any data that would not fit, but this could make unsuspe...
```diff diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index f5f5a9706fcc..4cb27dc542ce 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -51,7 +51,7 @@ /* * ABI version history is documented in linux/firewire-cdev.h. */ -#define FW_CDEV_KERNEL_VERSION 4 +#...
93dc6107a76daed81c07f50215fa6ae77691634f
Analyze and fix the following issue in the Linux kernel code: Don't limit non-nested epoll paths
Problem Details: Commit 28d82dc1c4ed ("epoll: limit paths") that I did to limit the number of possible wakeup paths in epoll is causing a few applications to longer work (dovecot for one). The original patch is really about limiting the amount of epoll nesting (since epoll fds can be attached to other fds). Thus, we p...
```diff diff --git a/fs/eventpoll.c b/fs/eventpoll.c index ea54cdef04dd..4d9d3a45e356 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -988,6 +988,10 @@ static int path_count[PATH_ARR_SIZE]; static int path_count_inc(int nests) { + /* Allow an arbitrary number of depth 1 paths */ + if (nests == 0) + return 0; +...
9e984bc1dffd405138ff22356188b6a1677c64c8
Analyze and fix the following issue in the Linux kernel code: drm/i915: Don't do MTRR setup if PAT is enabled
Problem Details: Some newer BIOSes are shipping with all MTRRs already populated. These BIOSes are all on machines with sufficiently new CPUs that the referenced errata doesn't apply anyway, so just don't try to claim the MTRR. Signed-off-by: Adam Jackson <ajax@redhat.com> Bugzilla: https://bugs.freedesktop.org/show_...
```diff diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index fa5c276b7992..ee7775c55450 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -43,6 +43,7 @@ #include <linux/slab.h> #include <linux/module.h> #include <acpi/video.h> +#include <asm/pat.h> ...
2f926eecdfb6138fef91683667fc915af5071fff
Analyze and fix the following issue in the Linux kernel code: arm/tegra: pcie: fix return value of function
Problem Details: In previous patch (arm/tegra: add timeout to PCIe PLL lock detection loop) tegra_pcie_enable_controller() function type has been changed from void to int, but the last return statement wasn't converted, so function returns undefined value. Fix it. Also while at it, address couple of minor concerns rai...
```diff diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index 0a1dec694394..91536996c3f0 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c @@ -639,10 +639,10 @@ static int tegra_pcie_enable_controller(void) pads_writel(0xfa5cfa5c, 0xc8); /* Wait for the PLL to lock */ -...
187e70a554e0f0717a65998bc9199945cbbd4692
Analyze and fix the following issue in the Linux kernel code: ib_srpt: Fix srpt_handle_cmd send_ioctx->ioctx_kref leak on exception
Problem Details: This patch addresses a bug in srpt_handle_cmd() failure handling where send_ioctx->kref is being leaked with the local extra reference after init, causing the expected kref_put() in srpt_handle_send_comp() to not be the final call to invoke srpt_put_send_ioctx_kref() -> transport_generic_free_cmd() and...
```diff diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 6735b63d96f0..c3cb907d8105 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c @@ -1757,6 +1757,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch, srp_cmd->...
ee9b866a3696ae434418348e2f499c41841366d4
Analyze and fix the following issue in the Linux kernel code: loopback: Fix transport_generic_allocate_tasks error handling
Problem Details: This patch addresses a tcm_loop bug with transport_generic_allocate_tasks() return checking in tcm_loop_submission_work() where other non zero return codes (including -EBUSY for reservation conflicts) are incorrectly falling through to transport_generic_map_mem_to_cmd() -> transport_handle_cdb_direct()...
```diff diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 22f4fe77237b..a9b4eeefe9fc 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c @@ -233,8 +233,7 @@ static void tcm_loop_submission_work(struct work_struct *work) TCM_LOGICAL_UNIT_...
9390f42546339cf111edd23c16d6cf74ca41974c
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Fix a few issues in filelayout_commit_pagelist
Problem Details: - Fix a race in which NFS_I(inode)->commits_outstanding could potentially go to zero (triggering a call to nfs_commit_clear_lock()) before we're done sending out all the commit RPC calls. - If nfs_commitdata_alloc fails, there is no reason why we shouldn't try to send off all the commits-to-ds. ...
```diff diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index c24e077c2820..e0bdbf4fe454 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c @@ -980,12 +980,14 @@ out_done: return rv; } -static int alloc_ds_commits(struct inode *inode, struct list_head *list) +static unsigned int +all...
8dd3775889345850ecddd689b5c200cdd91bd8c9
Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Clean ups and bugfixes for the pNFS read/writeback/commit code
Problem Details: Move more pnfs-isms out of the generic commit code. Bugfixes: - filelayout_scan_commit_lists doesn't need to get/put the lseg. In fact since it is run under the inode->i_lock, the lseg_put() can deadlock. - Ensure that we distinguish between what needs to be done for commit-to-data server and ...
```diff diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 04a914704e7b..2476dc69365f 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -308,8 +308,6 @@ extern void nfs_pageio_reset_read_mds(struct nfs_pageio_descriptor *pgio); extern void nfs_readdata_release(struct nfs_read_data *rdata); /* write.c ...
7c801160be0adf826b7b792ee4eaf6a3ae47569d
Analyze and fix the following issue in the Linux kernel code: powerpc/44x: The bug fixed support for APM821xx SoC and Bluestone board
Problem Details: This patch consists of: - Fix the pvr mask for checking pvr in cputable.c - Fix the cpu name as consistent with cpu name is describled in dts file Signed-off-by: Vinh Nguyen Huu Tuong <vhtnguyen@apm.com> Signed-off-by: Josh Boyer <jwboyer@gmail.com>
```diff diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 81db9e2a8a20..87353baf21fb 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c @@ -1816,7 +1816,7 @@ static struct cpu_spec __initdata cpu_specs[] = { .platform = "ppc440", }, { /* 464 in APM8...
a7611e84bd06c70c8b0cd88cd1e474c3c42fee3e
Analyze and fix the following issue in the Linux kernel code: firewire: cdev: fix IR multichannel event documentation
Problem Details: State more precisely when fw_cdev_event_iso_interrupt_mc is sent. While the comment tried to reflect an amibuity in the OHCI specification, there is only one method that is useful in practice, and this also matches all the hardware implementations I've tested. Signed-off-by: Clemens Ladisch <clemens@l...
```diff diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 357dbfc2829e..cc1b570a2eb3 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h @@ -267,9 +267,8 @@ struct fw_cdev_event_iso_interrupt { * * This event is sent in multichannel contexts (context type ...
0c0efbacab8d70700d13301e0ae7975783c0cb0a
Analyze and fix the following issue in the Linux kernel code: firewire: ohci: fix too-early completion of IR multichannel buffers
Problem Details: handle_ir_buffer_fill() assumed that a completed descriptor would be indicated by a non-zero transfer_status (as in most other descriptors). However, this field is written by the controller as soon as (the end of) the first packet has been written into the buffer. As a consequence, if we happen to run...
```diff diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 384b5b08126c..e52615a14382 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -2751,7 +2751,7 @@ static int handle_ir_buffer_fill(struct context *context, container_of(context, struct iso_context, context); u32 buffer_d...
c98291ee1ceac03912e24b3219fa6e7dc0d52f5e
Analyze and fix the following issue in the Linux kernel code: fcoe: use CHECKSUM_UNNECESSARY instead of CHECKSUM_PARTIAL on tx
Problem Details: Fix a bug when using 'ethtool -K ethx tx off' to turn off tx ip checksum, FCoE CRC offload should not be impacte. The skb_checksum_help() is needed only if it's not FCoE traffic for ip checksum, regardless of ethtool toggling the tx ip checksum on or off. Instead of using CHECKSUM_PARTIAL, we will use ...
```diff diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index e9599600aa23..c164890224d2 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -1498,7 +1498,7 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp) /* crc offload */ if (likely(lport->crc_offload)) {...
0646819cd31786f4b024d0056f73adf460be40aa
Analyze and fix the following issue in the Linux kernel code: net: do not do gso for CHECKSUM_UNNECESSARY in netif_needs_gso
Problem Details: This is related to fixing the bug of dropping FCoE frames when disabling tx ip checksum by 'ethtool -K ethx tx off'. The FCoE protocol stack driver would use CHECKSUM_UNNECESSARY on tx path instead of CHECKSUM_PARTIAL (as indicated in the 2/2 of this series). To do so, netif_needs_gso() has to be chang...
```diff diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0eac07c95255..c1b2b5ff7890 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -2636,7 +2636,8 @@ static inline int netif_needs_gso(struct sk_buff *skb, netdev_features_t features) { return skb_is_gso(skb) && (!s...
c29f40ca19b8ca284a2d1415e26b802bc9b2fb67
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix issues with SR-IOV loopback when flow control is disabled
Problem Details: This patch allows us to avoid a Tx hang when SR-IOV is enabled. This hang can be triggered by sending small packets at a rate that was triggering Rx missed errors from the adapter while the internal Tx switch and at least one VF are enabled. This was all due to the fact that under heavy stress the Rx...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index 383b9413292e..7d81bee4f681 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c @@ -2011,13 +2011,20 @@ s32 ixgbe_fc_enable_generic(s...
a16a1647fa6b6783c2e91623e72e86f0c2adac5e
Analyze and fix the following issue in the Linux kernel code: netfilter: ctnetlink: fix race between delete and timeout expiration
Problem Details: Kerin Millar reported hardlockups while running `conntrackd -c' in a busy firewall. That system (with several processors) was acting as backup in a primary-backup setup. After several tries, I found a race condition between the deletion operation of ctnetlink and timeout expiration. This patch fixes t...
```diff diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 10687692831e..b49da6c925b3 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -943,20 +943,21 @@ ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb, } } ...
126a3fd251b244eabd9ab9dcb32b8b6f999c1b91
Analyze and fix the following issue in the Linux kernel code: eni: fix driver remove function and driver probe error path.
Problem Details: - add eni_do_release() to balance eni_do_init - turn the zeroes DMA area into a per device data Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index 485a11a6de96..6ff612d099c3 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c @@ -156,9 +156,6 @@ static int tx_complete = 0,dma_complete = 0,queued = 0,requeued = 0, static struct atm_dev *eni_boards = NULL; -static u32 *cpu_zeroes = NULL; /* al...
043916608c4b309e98a1650520ed4e88ec5e9123
Analyze and fix the following issue in the Linux kernel code: Input: kxtj9 - who_am_i check value and initial data rate fixes
Problem Details: Several fixes based on customer feedback: * WHO_AM_I value has changed since preliminary parts used for initial testing; * Output of le16_to_cpu must be saved to memory before shifting to preserve sign; * Initial data rate was not extracted from data control register init. This was causing the...
```diff diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c index 783597a9a64a..21edaba489be 100644 --- a/drivers/input/misc/kxtj9.c +++ b/drivers/input/misc/kxtj9.c @@ -41,6 +41,14 @@ #define PC1_ON (1 << 7) /* Data ready funtion enable bit: set during probe if using irq mode */ #define DRDYE (...
06d6c1087605b38342eb20e74b0cacb8b71f5086
Analyze and fix the following issue in the Linux kernel code: netxen: qlogic ethernet : Fix endian bug.
Problem Details: Change the datatype of "ip_addr" to __be32 as 'ip' should be in big endian format. Adapter needs "ip address" in big endian format stored at lower 32bit of req.word[1]. netxen_config_ipaddr() now receives 'ip' in big endian format. To satisfy adapter's need, use memcpy() to copy byte by byte of 'ip' i...
```diff diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic.h b/drivers/net/ethernet/qlogic/netxen/netxen_nic.h index 2eeac32f7fdd..b5de8a7b90f1 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic.h +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic.h @@ -954,7 +954,7 @@ typedef struct nx_mac_list_s { ...
c577923756b7fe9071f28a76b66b83b306d1d001
Analyze and fix the following issue in the Linux kernel code: ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.
Problem Details: ip6_mc_find_dev_rcu() is called with rcu_read_lock(), so don't need to dev_hold(). With dev_hold(), not corresponding dev_put(), will lead to leak. [ bug introduced in 96b52e61be1 (ipv6: mcast: RCU conversions) ] Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Acked-by: Eric Dumazet <eric.dumazet@...
```diff diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index b853f06cc148..16c33e308121 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -257,7 +257,6 @@ static struct inet6_dev *ip6_mc_find_dev_rcu(struct net *net, if (rt) { dev = rt->dst.dev; - dev_hold(dev); dst_release(&rt->dst); } } el...
d7178c79d9b7c5518f9943188091a75fc6ce0675
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix NULL pointer dereference in nilfs_load_super_block()
Problem Details: According to the report from Slicky Devil, nilfs caused kernel oops at nilfs_load_super_block function during mount after he shrank the partition without resizing the filesystem: BUG: unable to handle kernel NULL pointer dereference at 00000048 IP: [<d0d7a08e>] nilfs_load_super_block+0x17e/0x280 [ni...
```diff diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c index 8a759016c2e3..501b7f8b739f 100644 --- a/fs/nilfs2/the_nilfs.c +++ b/fs/nilfs2/the_nilfs.c @@ -521,6 +521,7 @@ static int nilfs_load_super_block(struct the_nilfs *nilfs, brelse(sbh[1]); sbh[1] = NULL; sbp[1] = NULL; + valid[1] = 0; swp...
3d777a64066f3b9db8a94834aaed6a9cf09808fd
Analyze and fix the following issue in the Linux kernel code: nilfs2: clamp ns_r_segments_percentage to [1, 99]
Problem Details: ns_r_segments_percentage is read from the disk. Bogus or malicious value could cause integer overflow and malfunction due to meaningless disk usage calculation. This patch reports error when mounting such bogus volumes. Signed-off-by: Haogang Chen <haogangchen@gmail.com> Signed-off-by: Ryusuke Konis...
```diff diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c index d32714094375..8a759016c2e3 100644 --- a/fs/nilfs2/the_nilfs.c +++ b/fs/nilfs2/the_nilfs.c @@ -409,6 +409,12 @@ static int nilfs_store_disk_layout(struct the_nilfs *nilfs, nilfs->ns_first_data_block = le64_to_cpu(sbp->s_first_data_block); nilfs...
c0173863528a8c9212c53e080d63a1aaae5ef4f4
Analyze and fix the following issue in the Linux kernel code: afs: Remote abort can cause BUG in rxrpc code
Problem Details: When writing files to afs I sometimes hit a BUG: kernel BUG at fs/afs/rxrpc.c:179! With a backtrace of: afs_free_call afs_make_call afs_fs_store_data afs_vnode_store_data afs_write_back_from_locked_page afs_writepages_region afs_writepages The cause is: ASSERT(skb_queue_empty(&call->rx_que...
```diff diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index e45a323aebb4..8ad8c2a0703a 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c @@ -314,6 +314,7 @@ int afs_make_call(struct in_addr *addr, struct afs_call *call, gfp_t gfp, struct msghdr msg; struct kvec iov[1]; int ret; + struct sk_buff *skb; _enter("%x...
2c724fb92732c0b2a5629eb8af74e82eb62ac947
Analyze and fix the following issue in the Linux kernel code: afs: Read of file returns EBADMSG
Problem Details: A read of a large file on an afs mount failed: # cat junk.file > /dev/null cat: junk.file: Bad message Looking at the trace, call->offset wrapped since it is only an unsigned short. In afs_extract_data: _enter("{%u},{%zu},%d,,%zu", call->offset, len, last, count); ... if (call->offs...
```diff diff --git a/fs/afs/internal.h b/fs/afs/internal.h index d2b0888126d4..a306bb6d88d9 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -109,7 +109,7 @@ struct afs_call { unsigned reply_size; /* current size of reply */ unsigned first_offset; /* offset into mapping[first] */ unsigned last_to; /* ...
96939e79b0d8571f557bf4d7f0f933282401342b
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: mpc8548cds - fix alias in mpc8548si-pre.dtsi
Problem Details: Correct ethernet1 and add ethernet2 and ethernet3. Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/boot/dts/fsl/mpc8548si-pre.dtsi b/arch/powerpc/boot/dts/fsl/mpc8548si-pre.dtsi index 289f1218d755..720422d83529 100644 --- a/arch/powerpc/boot/dts/fsl/mpc8548si-pre.dtsi +++ b/arch/powerpc/boot/dts/fsl/mpc8548si-pre.dtsi @@ -43,7 +43,9 @@ serial0 = &serial0; serial1 = &serial1; ...
ad68ee016d928975161f82619410296af8eba2e8
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: mpc85xxcds - Fix PCI I/O space resource of PCI bridge
Problem Details: There is a PCI bridge(Tsi310) between the MPC8548 and a VIA southbridge chip. The bootloader sets the PCI bridge to open a window from 0x0000 to 0x1fff on the PCI I/O space. But the kernel can't set the I/O resource. In the routine pci_read_bridge_io(), if the base which is read from PCI_IO_BASE is eq...
```diff diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 02d97e31c18c..766b2150e480 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c @@ -3,7 +3,7 @@ * * Maintained by Kumar Gala (see MAINTAINERS for contact...
65533bbf63b4f37723fdfedc73d0653958973323
Analyze and fix the following issue in the Linux kernel code: PM / Domains: Fix hibernation restore of devices, v2
Problem Details: During resume from hibernation pm_genpd_restore_noirq() should only power off domains whose suspend_power_off flags are set once and not every time it is called for a device in the given domain. Moreover, it shouldn't decrement genpd->suspended_count, because that field is not touched during device fre...
```diff diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index e79228c597f1..84f4beefa4f8 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -764,8 +764,10 @@ static int pm_genpd_prepare(struct device *dev) genpd_acquire_lock(genpd); - if (genpd->prepared_count++ =...
cc85b20780562d404e18a47b9b55b4a5102ae53e
Analyze and fix the following issue in the Linux kernel code: PM / Domains: Fix handling of wakeup devices during system resume
Problem Details: During system suspend pm_genpd_suspend_noirq() checks if the given device is in a wakeup path (i.e. it appears to be needed for one or more wakeup devices to work or is a wakeup device itself) and if it needs to be "active" for wakeup to work. If that is the case, the function returns 0 without increm...
```diff diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index d2c03239abcf..e79228c597f1 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -890,7 +890,8 @@ static int pm_genpd_resume_noirq(struct device *dev) if (IS_ERR(genpd)) return -EINVAL; - if (genpd->suspe...
c7b738351ba92f48b943ac59aff6b5b0f17f37c9
Analyze and fix the following issue in the Linux kernel code: x86, efi: Fix pointer math issue in handle_ramdisks()
Problem Details: "filename" is a efi_char16_t string so this check for reaching the end of the array doesn't work. We need to cast the pointer to (u8 *) before doing the math. This patch changes the "filename" to "filename_16" to avoid confusion in the future. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> ...
```diff diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index fec216f4fbc3..0cdfc0d2315e 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -539,7 +539,7 @@ static efi_status_t handle_ramdisks(efi_loaded_image_t *image, struct initrd *initrd; e...
095e7f780be59f3adb4d39ac3cb8d3665b3f2347
Analyze and fix the following issue in the Linux kernel code: mfd: Fix compilation error in tps65910.h
Problem Details: 'struct gpio_chip' is declared in include/asm-generic/gpio.h which is included by include/linux/gpio.h. However without including gpio.h, TPS65910.h declares a member of this type as part of 'struct tps65910' declaration. This causes compilation error, if gpio.h is not included before including tps659...
```diff diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h index b9aceb5c1221..0148c8049ca4 100644 --- a/include/linux/mfd/tps65910.h +++ b/include/linux/mfd/tps65910.h @@ -17,6 +17,8 @@ #ifndef __LINUX_MFD_TPS65910_H #define __LINUX_MFD_TPS65910_H +#include <linux/gpio.h> + /* TPS chip id li...
5d40433ee66d860f119ce2bf3181764b1fd88e2e
Analyze and fix the following issue in the Linux kernel code: powerpc/dts: fix the compatible string of sec 4.0
Problem Details: Fix the compatible string of sec 4.0 to match with CAAM driver according to Documentation/devicetree/bindings/crypto/fsl-sec4.txt Signed-off-by: Liu Shuo <shuo.liu@freescale.com> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
```diff diff --git a/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi index bf957a7fca2a..d4c9d5daab21 100644 --- a/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi +++ b/arch/powerpc/boot/dts/fsl/pq3-sec4.4-0.dtsi @@ -33,32 +33,32 @@ */ crypto@30000 { - compatible = "fsl,sec4.4...
e4399461bdf4d230129c99f785ebe6814269427b
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Fix compiler error with THIS_MODULE and related
Problem Details: CC arch/powerpc/sysdev/fsl_85xx_l2ctlr.o arch/powerpc/sysdev/fsl_85xx_l2ctlr.c:209:13: error: 'THIS_MODULE' undeclared here (not in a function) arch/powerpc/sysdev/fsl_85xx_l2ctlr.c:229:20: error: expected declaration specifiers or '...' before string constant cc1: warnings being treated as errors...
```diff diff --git a/arch/powerpc/sysdev/fsl_85xx_cache_sram.c b/arch/powerpc/sysdev/fsl_85xx_cache_sram.c index 116415899176..37a69097e022 100644 --- a/arch/powerpc/sysdev/fsl_85xx_cache_sram.c +++ b/arch/powerpc/sysdev/fsl_85xx_cache_sram.c @@ -24,6 +24,7 @@ */ #include <linux/kernel.h> +#include <linux/export.h...
1ee4af86fa16d636dfd1a6f2e7fc70f34b5eb9b1
Analyze and fix the following issue in the Linux kernel code: powerpc/83xx: mpc836x - fix failed phy detection for ucc ethernet on MDS
Problem Details: The mpc836x_mds platform has been broken since the commit 6fe3264945ee63292cdfb27b6e95bc52c603bb09 "netdev/phy: Use mdiobus_read() so that proper locks are taken" which caused the fsl_pq_mdio TBI autoprobe to oops. The oops was "fixed" in commit 28d8ea2d568534026ccda3e8936f5ea1e04a86a1 "fsl_pq_...
```diff diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts index c0e450a551bf..81dd513d6308 100644 --- a/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts @@ -405,6 +405,10 @@ reg = <0x1>; device_type = "ethernet-phy"; }; + tbi-phy@...
16fbcc3b1139e90fe560fde5619169db74dc02c2
Analyze and fix the following issue in the Linux kernel code: regulator: Fix up a confusing dev_warn when DT lookup fails
Problem Details: of_parse_phandle() returns NULL either if the property name itself does not exist or if it (exists and) does not reference a valid phandle. Giving out a warn like the one below (that the property references an invalid phandle) can be confusing when the property itself does not exist in the node. Fix it...
```diff diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b97c4a256636..fc4ccf880cbc 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -148,7 +148,7 @@ static struct device_node *of_get_regulator(struct device *dev, const char *supp regnode = of_parse_phandle(dev->of_node, p...
4c19ea453d81cf8bd9bd446e6b129998f79997e7
Analyze and fix the following issue in the Linux kernel code: perf stat: Fix event grouping on forked task
Problem Details: When event group is enabled for forked task (i.e. no target task was specified) all events were disabled and marked ->enable_on_exec. However they are not counted at all since only group leader will be enabled on exec actually. So the result looked like below: $ ./perf stat --group -- sleep 1 Perfo...
```diff diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index ea40e4e8b227..c941bb640f49 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -296,7 +296,7 @@ static int create_perf_stat_counter(struct perf_evsel *evsel, if (system_wide) return perf_evsel__open_per_cpu(evsel...
618dd15d216915df04fe3baa93123179b1c887c5
Analyze and fix the following issue in the Linux kernel code: mfd: wm8994: Fix register default for WM1811 AntiPOP2
Problem Details: Should be all bits clear. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
```diff diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c index bd50d806770a..f00427d93f24 100644 --- a/drivers/mfd/wm8994-regmap.c +++ b/drivers/mfd/wm8994-regmap.c @@ -59,7 +59,7 @@ static struct reg_default wm1811_defaults[] = { { 0x0036, 0x0000 }, /* R54 - Speaker Mixer */ { 0x0037, 0x...
e131fbda56131bf85a7d66834596be603eee7720
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: fix typo in p1010rdb.dtsi
Problem Details: Fix typo introduced by "powerpc: Add TBI PHY node to first MDIO bus" from Andy Fleming. It's device_type rather than device-type, which causes the mdio probe to fail thus making all gianfar ethernet interfaces unusable. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Kumar Gal...
```diff diff --git a/arch/powerpc/boot/dts/p1010rdb.dtsi b/arch/powerpc/boot/dts/p1010rdb.dtsi index 1c41ef0c817c..49776143a1b8 100644 --- a/arch/powerpc/boot/dts/p1010rdb.dtsi +++ b/arch/powerpc/boot/dts/p1010rdb.dtsi @@ -196,7 +196,7 @@ }; tbi-phy@3 { - device-type = "tbi-phy"; + device_type = "tbi-phy"; ...
2a2383dab097823d68accce65da043402bdeb57b
Analyze and fix the following issue in the Linux kernel code: powerpc/srio: Fix the compile errors when building with 64bit
Problem Details: For the file "arch/powerpc/sysdev/fsl_rmu.c", there will be some compile errors while using the corenet64_smp_defconfig: .../fsl_rmu.c:315: error: cast from pointer to integer of different size .../fsl_rmu.c:320: error: cast to pointer from integer of different size .../fsl_rmu.c:320: error: cast to p...
```diff diff --git a/arch/powerpc/sysdev/fsl_rmu.c b/arch/powerpc/sysdev/fsl_rmu.c index 15485789e9db..14bd5221f28a 100644 --- a/arch/powerpc/sysdev/fsl_rmu.c +++ b/arch/powerpc/sysdev/fsl_rmu.c @@ -100,14 +100,8 @@ #define DOORBELL_DSR_TE 0x00000080 #define DOORBELL_DSR_QFI 0x00000010 #define DOORBELL_DSR_DIQI 0x0...
b6c46dcf61173999d95597bea87628cc08b359fb
Analyze and fix the following issue in the Linux kernel code: powerpc/srio: Fix the relocation errors when building with 64bit
Problem Details: For the file "arch/powerpc/sysdev/fsl_rio.c", there will be some relocation errors while using the corenet64_smp_defconfig: WARNING: modpost: Found 6 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' GEN .version CHK include/generated/...
```diff diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index a4c4f4a932d8..5b6f556094dd 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c @@ -66,8 +66,8 @@ " li %0,%3\n" \ " b 2b\n" \ ".section __ex_table,\"a\"\n" \ - " .align 2\n" \ - " .long ...
350eba43fca735733a51185f26bdc30899c64a20
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix build with CONFIG_PM=n
Problem Details: Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index b064e595bb60..33a9946b492c 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -5043,6 +5043,11 @@ static void stac92xx_set_power_state(struct hda_codec *codec, hda_nid_t fg, afg_power_state); ...
313162d0b83836e2f57e51b9b8650fb4b9c396ea
Analyze and fix the following issue in the Linux kernel code: device.h: audit and cleanup users in main include dir
Problem Details: The <linux/device.h> header includes a lot of stuff, and it in turn gets a lot of use just for the basic "struct device" which appears so often. Clean up the users as follows: 1) For those headers only needing "struct device" as a pointer in fcn args, replace the include with exactly that. 2) For he...
```diff diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h index 572f637299c9..9da37a45faf5 100644 --- a/include/linux/amba/pl022.h +++ b/include/linux/amba/pl022.h @@ -25,8 +25,6 @@ #ifndef _SSP_PL022_H #define _SSP_PL022_H -#include <linux/device.h> - /** * whether SSP is in loopback mode or ...
adfe39cd9195c35811e062578c4107db49d75436
Analyze and fix the following issue in the Linux kernel code: Revert "char: Fix typo in viotape.c"
Problem Details: This reverts commit a7ccf3775219bfcb2e0df73619abbe13abc6408f. It changes deprecated code that is being removed in powerpc tree. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 8b34c65511eb..ad6e64a2912d 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c @@ -976,7 +976,7 @@ int __init viotap_init(void) tape_class = class_create(THIS_MODULE, "tape"); if (IS_ERR(tape_class)) { - printk(VIOTAPE_KERN_W...
2de6d4a9e46c9bb038e9970628ed4b8e199ffda3
Analyze and fix the following issue in the Linux kernel code: drm: fix build with UDL if USB is a module
Problem Details: reported by sfr on -next merge. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 7f2029726db4..ed407cc7f26f 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -12,8 +12,9 @@ drm-y := drm_auth.o drm_buffer.o drm_bufs.o drm_cache.o \ drm_platform.o drm_sysfs.o drm_hashtab.o drm_mm.o \ drm_c...
3f658cde9401bd45429ee720cf2c69f0bc5547b9
Analyze and fix the following issue in the Linux kernel code: cdc_ncm: fix MTU and max_datagram_size handling
Problem Details: Changes/fixes: - inform device if max_datagram_size was changed by host - max_datagram_size can't be bigger MTU in ETH func descr - fix constants definitions to enable running CAIF service over NCM Tested on Intel/ARM. Reviewed-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Tested-by: Dmitry Ta...
```diff diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index a8e2a62c2958..f8f194658412 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -58,8 +58,8 @@ #define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10 /* Maximum NTB length */ -#define CDC_NCM_NTB_MAX_SIZE_TX 16384 /* bytes *...
b8fbaef586176f6abe0eb7887ddae66e99898b79
Analyze and fix the following issue in the Linux kernel code: wimax/i2400m: fix erroneous NETDEV_TX_BUSY use
Problem Details: A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY, since caller is going to reuse freed skb. In fact netif_tx_stop_queue() / netif_stop_queue() is needed before returning NETDEV_TX_BUSY or you can trigger a ksoftirqd fatal loop. In case of memory allocation error, only safe way i...
```diff diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c index 64a110604ad3..63e4b709efa9 100644 --- a/drivers/net/wimax/i2400m/netdev.c +++ b/drivers/net/wimax/i2400m/netdev.c @@ -367,38 +367,28 @@ netdev_tx_t i2400m_hard_start_xmit(struct sk_buff *skb, { struct i2400m *i2400m = ne...
bb6d5e76fb4fba9aa36726db41404512f3286c0f
Analyze and fix the following issue in the Linux kernel code: net/hyperv: fix erroneous NETDEV_TX_BUSY use
Problem Details: A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY, since caller is going to reuse freed skb. This is mostly a revert of commit bf769375c (staging: hv: fix the return status of netvsc_start_xmit()) In fact netif_tx_stop_queue() / netif_stop_queue() is needed before returning NETDE...
```diff diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index bf01841bda5b..610860f28968 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -166,7 +166,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net) dev_kfree_skb(skb)...
c0ea452e422a1fc78ec8c639df64012d0b8dbb4a
Analyze and fix the following issue in the Linux kernel code: bnx2x: fix memory leak in bnx2x_init_firmware()
Problem Details: When cycling the interface down and up, bnx2x_init_firmware() knows that the firmware is already loaded, but nevertheless it allocates certain arrays anew (init_data, init_ops, init_ops_offsets, iro_arr). The old arrays are leaked. Fix the leaks by returning early if the firmware was already loaded. B...
```diff diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 00ff62f92858..b69f8762b339 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -10824,38 +10824,36 @@ do { \ int b...
127d0a198a310970b31866af8bbb6d4b1068e546
Analyze and fix the following issue in the Linux kernel code: bnx2x: fix a crash on corrupt firmware file
Problem Details: If the requested firmware is deemed corrupt and then released, reset the pointer to NULL in order to avoid double-freeing it in bnx2x_release_firmware() or dereferencing it in bnx2x_init_firmware(). Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Si...
```diff diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 254521319150..00ff62f92858 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -10901,6 +10901,7 @@ init_ops_alloc_err: kfr...
122bdf67f15a22bcabf6c2cab3a545d17ccf68dc
Analyze and fix the following issue in the Linux kernel code: ipv6: fix icmp6_dst_alloc()
Problem Details: commit 87a115783 ( ipv6: Move xfrm_lookup() call down into icmp6_dst_alloc().) forgot to convert one error path, leading to crashes in mld_sendpack() Many thanks to Dave Jones for providing a very complete bug report. Reported-by: Dave Jones <davej@redhat.com> Signed-off-by: Eric Dumazet <eric.dumaze...
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 8c2e3ab58f2a..22b766407de1 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1077,7 +1077,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct net *net = dev_net(dev); if (unlikely(!idev)) - return NULL; + return ERR_PTR(-ENO...
d34b7d452397d16a895b9a0eddcf6b69f46074d2
Analyze and fix the following issue in the Linux kernel code: ARM: orion: spi: remove enable_clock_fix which is not used
Problem Details: Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jason Cooper <jason@lakedaemon.net> Acked-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index 13448c832c44..e496f799b7a9 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c @@ -359,11 +359,6 @@ static int orion_spi_setup(struct spi_device *spi) orion_spi = spi_master_get_devdata(spi->master); - /* Fix ac timing if ...
281689051a628e5341ce1efcfafde9d60f2f6fbb
Analyze and fix the following issue in the Linux kernel code: target: remove obvious warnings
Problem Details: Get rid of a bunch of write-only variables. In a number of cases I suspect actual bugs to be present, so I left all of those for a second look. (nab: fix lio-core patch fuzz) Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
```diff diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index d3b54ecbfcda..b8fbc299d4ef 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -1469,14 +1469,12 @@ static int iscsit_handle_nop_out( unsigned char *ping_data = NULL; int cm...
f2083241f23722207676025abbb45a301d412e69
Analyze and fix the following issue in the Linux kernel code: target: Use array_zalloc for device_list
Problem Details: Turns an order-8 allocation into slab-sized ones, thereby preventing allocation failures with memory fragmentation. This likely saves memory as well, as the slab allocator can pack objects more tightly than the buddy allocator. (nab: Fix lio-core patch fuzz) Signed-off-by: Joern Engel <joern@logfs.o...
```diff diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index fd7f17c303a7..3be7279865b1 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -72,7 +72,7 @@ int transport_lookup_cmd_lun(struct se_cmd *se_cmd, u32 unpacked_lun) } spin_...
b168fe8cfe530daabbdf632af4554600006a81a9
Analyze and fix the following issue in the Linux kernel code: target: Fix sense code for unsupported SERVICE ACTION IN
Problem Details: If we don't handle a given service action, we're supposed to return INVALID FIELD IN CDB, since we do handle the SERVICE ACTION IN opcode. Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
```diff diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index ba8eb8373032..4a112b6c7f27 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -2942,7 +2942,7 @@ static int transport_generic_cmd_sequencer( pr_err("Unsupport...
4a649903f91232d02284d53724b0a45728111767
Analyze and fix the following issue in the Linux kernel code: rtc: Provide flag for rtc devices that don't support UIE
Problem Details: Richard Weinberger noticed that on some RTC hardware that doesn't support UIE mode, due to coarse granular alarms (like 1minute resolution), the current virtualized RTC support doesn't properly error out when UIE is enabled. Instead the current code queues an alarm for the next second, but it won't fi...
```diff diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index dc87eda65814..eb415bd76494 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -458,6 +458,11 @@ int rtc_update_irq_enable(struct rtc_device *rtc, unsigned int enabled) if (rtc->uie_rtctimer.enabled == enabled) goto out;...
f695cf94837de53864180400cbac42cfa370426f
Analyze and fix the following issue in the Linux kernel code: time: Fix change_clocksource locking
Problem Details: change_clocksource() fails to grab locks or call timekeeping_update(), which leaves a race window for time inconsistencies. This adds proper locking and a call to timekeeping_update() to fix this. CC: Andy Lutomirski <luto@amacapital.net> CC: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John S...
```diff diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 403c2a092830..b53da5ecbea2 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -448,9 +448,12 @@ EXPORT_SYMBOL(timekeeping_inject_offset); static int change_clocksource(void *data) { struct clocksource *new, *old;...
a939e817aa7e199d2fff05a67cb745be32dd5c2d
Analyze and fix the following issue in the Linux kernel code: time: x86: Fix race switching from vsyscall to non-vsyscall clock
Problem Details: When switching from a vsyscall capable to a non-vsyscall capable clocksource, there was a small race, where the last vsyscall gettimeofday before the switch might return a invalid time value using the new non-vsyscall enabled clocksource values after the switch is complete. This is due to the vsyscall...
```diff diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c index 6bc0e723b6e8..7eeb1f6188ee 100644 --- a/arch/x86/vdso/vclock_gettime.c +++ b/arch/x86/vdso/vclock_gettime.c @@ -70,14 +70,26 @@ notrace static long vdso_fallback_gettime(long clock, struct timespec *ts) return ret; } +notrac...
cf2b94daab9f3d21b0a393bef91292622f6a8ca4
Analyze and fix the following issue in the Linux kernel code: drivers/video/backlight/s6e63m0.c: fix corruption storing gamma mode
Problem Details: strict_strtoul() writes a long but ->gamma_mode only has space to store an int, so on 64 bit systems we end up scribbling over ->gamma_table_count as well. I've changed it to use kstrtouint() instead. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Inki Dae <inki.dae@samsung.com> Si...
```diff diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index e132157d8545..516db703dd24 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c @@ -690,7 +690,7 @@ static ssize_t s6e63m0_sysfs_store_gamma_mode(struct device *dev, struct backlight_devi...
4c57c7e4af71afd4e9f93af01738eb1216ed270e
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: fix link to Gustavo Padovans tree
Problem Details: Gustavo's tree is called just bluetooth.git and not bluetooth-2.6.git anymore. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: "Gustavo F. Padovan" <padovan@profusion.mobi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linu...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 15b41141d17b..8dc270c5ff28 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1517,7 +1517,7 @@ M: Gustavo Padovan <gustavo@padovan.org> M: Johan Hedberg <johan.hedberg@gmail.com> L: linux-bluetooth@vger.kernel.org W: http://www.bluez.org/ -T: git git://git.kernel.org...
9bbad7da76b3dd578fb55c862624366a8c9ccd22
Analyze and fix the following issue in the Linux kernel code: rapidio/tsi721: fix bug in register offset definitions
Problem Details: Fix indexed register offset definitions that use decimal (wrong) instead of hexadecimal (correct) notation for indexing multipliers. Incorrect definitions do not affect Tsi721 driver in its current default configuration because it uses only IDB queue 0. Loss of inbound doorbell functionality should b...
```diff diff --git a/drivers/rapidio/devices/tsi721.h b/drivers/rapidio/devices/tsi721.h index 822e54c394d5..1c226b31af13 100644 --- a/drivers/rapidio/devices/tsi721.h +++ b/drivers/rapidio/devices/tsi721.h @@ -118,34 +118,34 @@ #define TSI721_IDB_ENTRY_SIZE 64 -#define TSI721_IDQ_CTL(x) (0x20000 + (x) * 1000) +#d...
59927fb984de1703c67bc640c3e522d8b5276c73
Analyze and fix the following issue in the Linux kernel code: memcg: free mem_cgroup by RCU to fix oops
Problem Details: After fixing the GPF in mem_cgroup_lru_del_list(), three times one machine running a similar load (moving and removing memcgs while swapping) has oopsed in mem_cgroup_zone_nr_lru_pages(), when retrieving memcg zone numbers for get_scan_count() for shrink_mem_cgroup_zone(): this is where a struct mem_cg...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index d0e57a3cda18..58a08fc7414a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -230,10 +230,30 @@ struct mem_cgroup { * the counter to account for memory usage */ struct res_counter res; - /* - * the counter to account for mem+swap usage. - */ - s...
296736552fb30a183b8c4635a6cd94f2cb74aa82
Analyze and fix the following issue in the Linux kernel code: Staging: android: ram_console.c:
Problem Details: Fix build error when CONFIG_PRINTK is not selected. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/android/ram_console.c b/drivers/staging/android/ram_console.c index 2918bc19f294..ce140ffc54ea 100644 --- a/drivers/staging/android/ram_console.c +++ b/drivers/staging/android/ram_console.c @@ -85,6 +85,10 @@ static int __init ram_console_module_init(void) return platform_driver_p...
01e8ec4417d3c484986af0adaa0ae6632e0a59cd
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix power4/970 idle code regression with lockdep
Problem Details: in commit 7230c5644188cd9e3fb380cc97dde00c464a3ba7 "powerpc: Rework lazy-interrupt handling" I introduced a regression, accidentally calling irq tracing twice and not properly restoring a clobbered register (r7) later used for writing to the MSR. This caused lockups when booting on a G5 with lockdep ...
```diff diff --git a/arch/powerpc/kernel/idle_power4.S b/arch/powerpc/kernel/idle_power4.S index d8cdba4c28b2..2c71b0fc9f91 100644 --- a/arch/powerpc/kernel/idle_power4.S +++ b/arch/powerpc/kernel/idle_power4.S @@ -50,9 +50,9 @@ END_FTR_SECTION_IFCLR(CPU_FTR_CAN_NAP) addi r1,r1,128 ld r0,16(r1) mtlr r0 + mfmsr...
bf3a85be67068a0f55804349e6e1dce80008c45c
Analyze and fix the following issue in the Linux kernel code: staging: vme: fix section mismatches in linux-next 20120314
Problem Details: pio2_gpio_init() annotated with __init, but called by pio2_probe() which is annotated __devinit. pio2_gpio_exit() is annotated __exit, but is called by pio2_probe() and by pio2_remove() which is annotated __devexit. Signed-off-by: Gerard Snitselaar <dev@snitselaar.org> Signed-off-by: Greg Kroah-Hartma...
```diff diff --git a/drivers/staging/vme/devices/vme_pio2.h b/drivers/staging/vme/devices/vme_pio2.h index 3c5931364535..72d9ce0bcb45 100644 --- a/drivers/staging/vme/devices/vme_pio2.h +++ b/drivers/staging/vme/devices/vme_pio2.h @@ -243,7 +243,7 @@ struct pio2_card { int pio2_cntr_reset(struct pio2_card *); int p...
a078c6d0e6288fad6d83fb6d5edd91ddb7b6ab33
Analyze and fix the following issue in the Linux kernel code: ntp: Fix integer overflow when setting time
Problem Details: 'long secs' is passed as divisor to div_s64, which accepts a 32bit divisor. On 64bit machines that value is trimmed back from 8 bytes back to 4, causing a divide by zero when the number is bigger than (1 << 32) - 1 and all 32 lower bits are 0. Use div64_long() instead. Signed-off-by: Sasha Levin <lev...
```diff diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 17fb1b9807d0..6e039b144daf 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -289,7 +289,7 @@ static inline s64 ntp_update_offset_fll(s64 offset64, long secs) time_status |= STA_MODE; - return div_s64(offset64 << (NTP_SCALE_SHIFT - SHIFT_FLL...
4a4c61b7ce26bfc9d49ea4bd121d52114bad9f99
Analyze and fix the following issue in the Linux kernel code: TTY: Wrong unicode value copied in con_set_unimap()
Problem Details: Bugzilla 40012: PIO_UNIMAP bug: error updating Unicode-to-font map https://bugzilla.kernel.org/show_bug.cgi?id=40012 The unicode font map for the virtual console is a 32x32x64 table which allocates rows dynamically as entries are added. The unicode value increases sequentially and should count all en...
```diff diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c index a0f3d6c4d39d..8308fc7cdc26 100644 --- a/drivers/tty/vt/consolemap.c +++ b/drivers/tty/vt/consolemap.c @@ -516,6 +516,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) int err = 0, err1, i; struct u...
f30d500f809eca67a21704347ab14bb35877b5ee
Analyze and fix the following issue in the Linux kernel code: xfs: fix inode lookup race
Problem Details: When we get concurrent lookups of the same inode that is not in the per-AG inode cache, there is a race condition that triggers warnings in unlock_new_inode() indicating that we are initialising an inode that isn't in a the correct state for a new inode. When we do an inode lookup via a file handle or...
```diff diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index af3f30a3d9c2..a98cb4524e6c 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c @@ -349,9 +349,20 @@ xfs_iget_cache_miss( BUG(); } - spin_lock(&pag->pag_ici_lock); + /* + * These values must be set before inserting the inode into the radix + *...