Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'staging-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging and IIO driver fixes from Greg KH:
"Here are some small staging and iio driver fixes for reported issues
for 4.9-rc3. Nothing major, the "largest" being a lustre fix for a
sysfs file that was obviously wrong, and had never been tested, so it
was moved to debugfs as that is where it belongs. The others are small
bug fixes for reported issues with various staging or iio drivers.

All have been in linux-next for a while with no reported issues"

* tag 'staging-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
greybus: fix a leak on error in gb_module_create()
greybus: es2: fix error return code in ap_probe()
greybus: arche-platform: Add missing of_node_put() in arche_platform_change_state()
staging: android: ion: Fix error handling in ion_query_heaps()
iio: accel: sca3000_core: avoid potentially uninitialized variable
iio:chemical:atlas-ph-sensor: Fix use of 32 bit int to hold 16 bit big endian value
staging/lustre/llite: Move unstable_stats from sysfs to debugfs
Staging: wilc1000: Fix kernel Oops on opening the device
staging: android/ion: testing the wrong variable
Staging: greybus: uart: Use gbphy_dev->dev instead of bundle->dev
Staging: greybus: gpio: Use gbphy_dev->dev instead of bundle->dev
iio: adc: ti-adc081c: Select IIO_TRIGGERED_BUFFER to prevent build errors
iio: maxim_thermocouple: Align 16 bit big endian value of raw reads

+46 -38
+2
drivers/iio/adc/Kconfig
··· 437 437 config TI_ADC081C 438 438 tristate "Texas Instruments ADC081C/ADC101C/ADC121C family" 439 439 depends on I2C 440 + select IIO_BUFFER 441 + select IIO_TRIGGERED_BUFFER 440 442 help 441 443 If you say yes here you get support for Texas Instruments ADC081C, 442 444 ADC101C and ADC121C ADC chips.
+4 -3
drivers/iio/chemical/atlas-ph-sensor.c
··· 213 213 struct device *dev = &data->client->dev; 214 214 int ret; 215 215 unsigned int val; 216 + __be16 rval; 216 217 217 - ret = regmap_bulk_read(data->regmap, ATLAS_REG_EC_PROBE, &val, 2); 218 + ret = regmap_bulk_read(data->regmap, ATLAS_REG_EC_PROBE, &rval, 2); 218 219 if (ret) 219 220 return ret; 220 221 221 - dev_info(dev, "probe set to K = %d.%.2d", be16_to_cpu(val) / 100, 222 - be16_to_cpu(val) % 100); 222 + val = be16_to_cpu(rval); 223 + dev_info(dev, "probe set to K = %d.%.2d", val / 100, val % 100); 223 224 224 225 ret = regmap_read(data->regmap, ATLAS_REG_EC_CALIB_STATUS, &val); 225 226 if (ret)
+9 -7
drivers/iio/temperature/maxim_thermocouple.c
··· 123 123 { 124 124 unsigned int storage_bytes = data->chip->read_size; 125 125 unsigned int shift = chan->scan_type.shift + (chan->address * 8); 126 - unsigned int buf; 126 + __be16 buf16; 127 + __be32 buf32; 127 128 int ret; 128 - 129 - ret = spi_read(data->spi, (void *) &buf, storage_bytes); 130 - if (ret) 131 - return ret; 132 129 133 130 switch (storage_bytes) { 134 131 case 2: 135 - *val = be16_to_cpu(buf); 132 + ret = spi_read(data->spi, (void *)&buf16, storage_bytes); 133 + *val = be16_to_cpu(buf16); 136 134 break; 137 135 case 4: 138 - *val = be32_to_cpu(buf); 136 + ret = spi_read(data->spi, (void *)&buf32, storage_bytes); 137 + *val = be32_to_cpu(buf32); 139 138 break; 140 139 } 140 + 141 + if (ret) 142 + return ret; 141 143 142 144 /* check to be sure this is a valid reading */ 143 145 if (*val & data->chip->status_bit)
+4 -2
drivers/staging/android/ion/ion.c
··· 1187 1187 hdata.type = heap->type; 1188 1188 hdata.heap_id = heap->id; 1189 1189 1190 - ret = copy_to_user(&buffer[cnt], 1191 - &hdata, sizeof(hdata)); 1190 + if (copy_to_user(&buffer[cnt], &hdata, sizeof(hdata))) { 1191 + ret = -EFAULT; 1192 + goto out; 1193 + } 1192 1194 1193 1195 cnt++; 1194 1196 if (cnt >= max_cnt)
+1 -1
drivers/staging/android/ion/ion_of.c
··· 107 107 108 108 heap_pdev = of_platform_device_create(node, heaps[i].name, 109 109 &pdev->dev); 110 - if (!pdev) 110 + if (!heap_pdev) 111 111 return ERR_PTR(-ENOMEM); 112 112 heap_pdev->dev.platform_data = &heaps[i]; 113 113
+1
drivers/staging/greybus/arche-platform.c
··· 128 128 pdev = of_find_device_by_node(np); 129 129 if (!pdev) { 130 130 pr_err("arche-platform device not found\n"); 131 + of_node_put(np); 131 132 return -ENODEV; 132 133 } 133 134
+2 -1
drivers/staging/greybus/es2.c
··· 1548 1548 INIT_LIST_HEAD(&es2->arpcs); 1549 1549 spin_lock_init(&es2->arpc_lock); 1550 1550 1551 - if (es2_arpc_in_enable(es2)) 1551 + retval = es2_arpc_in_enable(es2); 1552 + if (retval) 1552 1553 goto error; 1553 1554 1554 1555 retval = gb_hd_add(hd);
+2 -4
drivers/staging/greybus/gpio.c
··· 702 702 ret = gb_gpio_irqchip_add(gpio, irqc, 0, 703 703 handle_level_irq, IRQ_TYPE_NONE); 704 704 if (ret) { 705 - dev_err(&connection->bundle->dev, 706 - "failed to add irq chip: %d\n", ret); 705 + dev_err(&gbphy_dev->dev, "failed to add irq chip: %d\n", ret); 707 706 goto exit_line_free; 708 707 } 709 708 710 709 ret = gpiochip_add(gpio); 711 710 if (ret) { 712 - dev_err(&connection->bundle->dev, 713 - "failed to add gpio chip: %d\n", ret); 711 + dev_err(&gbphy_dev->dev, "failed to add gpio chip: %d\n", ret); 714 712 goto exit_gpio_irqchip_remove; 715 713 } 716 714
+1 -1
drivers/staging/greybus/module.c
··· 127 127 return module; 128 128 129 129 err_put_interfaces: 130 - for (--i; i > 0; --i) 130 + for (--i; i >= 0; --i) 131 131 gb_interface_put(module->interfaces[i]); 132 132 133 133 put_device(&module->dev);
+1 -1
drivers/staging/greybus/uart.c
··· 888 888 minor = alloc_minor(gb_tty); 889 889 if (minor < 0) { 890 890 if (minor == -ENOSPC) { 891 - dev_err(&connection->bundle->dev, 891 + dev_err(&gbphy_dev->dev, 892 892 "no more free minor numbers\n"); 893 893 retval = -ENODEV; 894 894 } else {
+2
drivers/staging/iio/accel/sca3000_core.c
··· 468 468 case SCA3000_MEAS_MODE_OP_2: 469 469 *base_freq = info->option_mode_2_freq; 470 470 break; 471 + default: 472 + ret = -EINVAL; 471 473 } 472 474 error_ret: 473 475 return ret;
+17 -17
drivers/staging/lustre/lustre/llite/lproc_llite.c
··· 871 871 } 872 872 LUSTRE_RW_ATTR(xattr_cache); 873 873 874 - static ssize_t unstable_stats_show(struct kobject *kobj, 875 - struct attribute *attr, 876 - char *buf) 874 + static int ll_unstable_stats_seq_show(struct seq_file *m, void *v) 877 875 { 878 - struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, 879 - ll_kobj); 876 + struct super_block *sb = m->private; 877 + struct ll_sb_info *sbi = ll_s2sbi(sb); 880 878 struct cl_client_cache *cache = sbi->ll_cache; 881 879 long pages; 882 880 int mb; ··· 882 884 pages = atomic_long_read(&cache->ccc_unstable_nr); 883 885 mb = (pages * PAGE_SIZE) >> 20; 884 886 885 - return sprintf(buf, "unstable_check: %8d\n" 886 - "unstable_pages: %12ld\n" 887 - "unstable_mb: %8d\n", 888 - cache->ccc_unstable_check, pages, mb); 887 + seq_printf(m, 888 + "unstable_check: %8d\n" 889 + "unstable_pages: %12ld\n" 890 + "unstable_mb: %8d\n", 891 + cache->ccc_unstable_check, pages, mb); 892 + 893 + return 0; 889 894 } 890 895 891 - static ssize_t unstable_stats_store(struct kobject *kobj, 892 - struct attribute *attr, 893 - const char *buffer, 894 - size_t count) 896 + static ssize_t ll_unstable_stats_seq_write(struct file *file, 897 + const char __user *buffer, 898 + size_t count, loff_t *off) 895 899 { 896 - struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, 897 - ll_kobj); 900 + struct super_block *sb = ((struct seq_file *)file->private_data)->private; 901 + struct ll_sb_info *sbi = ll_s2sbi(sb); 898 902 char kernbuf[128]; 899 903 int val, rc; 900 904 ··· 922 922 923 923 return count; 924 924 } 925 - LUSTRE_RW_ATTR(unstable_stats); 925 + LPROC_SEQ_FOPS(ll_unstable_stats); 926 926 927 927 static ssize_t root_squash_show(struct kobject *kobj, struct attribute *attr, 928 928 char *buf) ··· 995 995 /* { "filegroups", lprocfs_rd_filegroups, 0, 0 }, */ 996 996 { "max_cached_mb", &ll_max_cached_mb_fops, NULL }, 997 997 { "statahead_stats", &ll_statahead_stats_fops, NULL, 0 }, 998 + { "unstable_stats", &ll_unstable_stats_fops, NULL }, 998 999 { "sbi_flags", &ll_sbi_flags_fops, NULL, 0 }, 999 1000 { .name = "nosquash_nids", 1000 1001 .fops = &ll_nosquash_nids_fops }, ··· 1027 1026 &lustre_attr_max_easize.attr, 1028 1027 &lustre_attr_default_easize.attr, 1029 1028 &lustre_attr_xattr_cache.attr, 1030 - &lustre_attr_unstable_stats.attr, 1031 1029 &lustre_attr_root_squash.attr, 1032 1030 NULL, 1033 1031 };
-1
drivers/staging/wilc1000/host_interface.c
··· 3388 3388 3389 3389 clients_count++; 3390 3390 3391 - destroy_workqueue(hif_workqueue); 3392 3391 _fail_: 3393 3392 return result; 3394 3393 }