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 'char-misc-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
"Here are a number of small char/misc and iio driver fixes for
6.10-rc4. Included in here are the following:

- iio driver fixes for a bunch of reported problems.

- mei driver fixes for a number of reported issues.

- amiga parport driver build fix.

- .editorconfig fix that was causing lots of unintended whitespace
changes to happen to files when they were being edited. Unless we
want to sweep the whole tree and remove all trailing whitespace at
once, this is needed for the .editorconfig file to be able to be
used at all. This change is required because the original
submitters never touched older files in the tree.

- jfs bugfix for a buffer overflow

The jfs bugfix is in here as I didn't know where else to put it, and
it's been ignored for a while as the filesystem seems to be abandoned
and I'm tired of seeing the same issue reported in multiple places.

All of these have been in linux-next with no reported issues"

* tag 'char-misc-6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (25 commits)
.editorconfig: remove trim_trailing_whitespace option
jfs: xattr: fix buffer overflow for invalid xattr
misc: microchip: pci1xxxx: Fix a memory leak in the error handling of gp_aux_bus_probe()
misc: microchip: pci1xxxx: fix double free in the error handling of gp_aux_bus_probe()
parport: amiga: Mark driver struct with __refdata to prevent section mismatch
mei: vsc: Fix wrong invocation of ACPI SID method
mei: vsc: Don't stop/restart mei device during system suspend/resume
mei: me: release irq in mei_me_pci_resume error path
mei: demote client disconnect warning on suspend to debug
iio: inkern: fix channel read regression
iio: imu: inv_mpu6050: stabilized timestamping in interrupt
iio: adc: ad7173: Fix sampling frequency setting
iio: adc: ad7173: Clear append status bit
iio: imu: inv_icm42600: delete unneeded update watermark call
iio: imu: inv_icm42600: stabilized timestamp in interrupt
iio: invensense: fix odr switching to same value
iio: adc: ad7173: Remove index from temp channel
iio: adc: ad7173: Add ad7173_device_info names
iio: adc: ad7173: fix buffers enablement for ad7176-2
iio: temperature: mlx90635: Fix ERR_PTR dereference in mlx90635_probe()
...

+100 -80
-3
.editorconfig
··· 5 5 [{*.{awk,c,dts,dtsi,dtso,h,mk,s,S},Kconfig,Makefile,Makefile.*}] 6 6 charset = utf-8 7 7 end_of_line = lf 8 - trim_trailing_whitespace = true 9 8 insert_final_newline = true 10 9 indent_style = tab 11 10 indent_size = 8 ··· 12 13 [*.{json,py,rs}] 13 14 charset = utf-8 14 15 end_of_line = lf 15 - trim_trailing_whitespace = true 16 16 insert_final_newline = true 17 17 indent_style = space 18 18 indent_size = 4 ··· 24 26 [*.yaml] 25 27 charset = utf-8 26 28 end_of_line = lf 27 - trim_trailing_whitespace = unset 28 29 insert_final_newline = true 29 30 indent_style = space 30 31 indent_size = 2
+1 -1
Documentation/devicetree/bindings/iio/dac/adi,ad3552r.yaml
··· 139 139 Voltage output range of the channel as <minimum, maximum> 140 140 Required connections: 141 141 Rfb1x for: 0 to 2.5 V; 0 to 3V; 0 to 5 V; 142 - Rfb2x for: 0 to 10 V; 2.5 to 7.5V; -5 to 5 V; 142 + Rfb2x for: 0 to 10 V; -2.5 to 7.5V; -5 to 5 V; 143 143 oneOf: 144 144 - items: 145 145 - const: 0
+19 -18
drivers/iio/adc/ad7173.c
··· 145 145 unsigned int id; 146 146 char *name; 147 147 bool has_temp; 148 + bool has_input_buf; 148 149 bool has_int_ref; 149 150 bool has_ref2; 150 151 u8 num_gpios; ··· 213 212 .num_configs = 4, 214 213 .num_gpios = 2, 215 214 .has_temp = true, 215 + .has_input_buf = true, 216 216 .has_int_ref = true, 217 217 .clock = 2 * HZ_PER_MHZ, 218 218 .sinc5_data_rates = ad7173_sinc5_data_rates, 219 219 .num_sinc5_data_rates = ARRAY_SIZE(ad7173_sinc5_data_rates), 220 220 }, 221 221 [ID_AD7172_4] = { 222 + .name = "ad7172-4", 222 223 .id = AD7172_4_ID, 223 224 .num_inputs = 9, 224 225 .num_channels = 8, 225 226 .num_configs = 8, 226 227 .num_gpios = 4, 227 228 .has_temp = false, 229 + .has_input_buf = true, 228 230 .has_ref2 = true, 229 231 .clock = 2 * HZ_PER_MHZ, 230 232 .sinc5_data_rates = ad7173_sinc5_data_rates, ··· 241 237 .num_configs = 8, 242 238 .num_gpios = 4, 243 239 .has_temp = true, 240 + .has_input_buf = true, 244 241 .has_int_ref = true, 245 242 .has_ref2 = true, 246 243 .clock = 2 * HZ_PER_MHZ, ··· 256 251 .num_configs = 4, 257 252 .num_gpios = 2, 258 253 .has_temp = true, 254 + .has_input_buf = true, 259 255 .has_int_ref = true, 260 256 .clock = 16 * HZ_PER_MHZ, 261 257 .sinc5_data_rates = ad7175_sinc5_data_rates, 262 258 .num_sinc5_data_rates = ARRAY_SIZE(ad7175_sinc5_data_rates), 263 259 }, 264 260 [ID_AD7175_8] = { 261 + .name = "ad7175-8", 265 262 .id = AD7175_8_ID, 266 263 .num_inputs = 17, 267 264 .num_channels = 16, 268 265 .num_configs = 8, 269 266 .num_gpios = 4, 270 267 .has_temp = true, 268 + .has_input_buf = true, 271 269 .has_int_ref = true, 272 270 .has_ref2 = true, 273 271 .clock = 16 * HZ_PER_MHZ, ··· 285 277 .num_configs = 4, 286 278 .num_gpios = 2, 287 279 .has_temp = false, 280 + .has_input_buf = false, 288 281 .has_int_ref = true, 289 282 .clock = 16 * HZ_PER_MHZ, 290 283 .sinc5_data_rates = ad7175_sinc5_data_rates, 291 284 .num_sinc5_data_rates = ARRAY_SIZE(ad7175_sinc5_data_rates), 292 285 }, 293 286 [ID_AD7177_2] = { 287 + .name = "ad7177-2", 294 288 .id = AD7177_ID, 295 289 .num_inputs = 5, 296 290 .num_channels = 4, 297 291 .num_configs = 4, 298 292 .num_gpios = 2, 299 293 .has_temp = true, 294 + .has_input_buf = true, 300 295 .has_int_ref = true, 301 296 .clock = 16 * HZ_PER_MHZ, 302 297 .odr_start_value = AD7177_ODR_START_VALUE, ··· 543 532 unsigned int interface_mode = st->interface_mode; 544 533 int ret; 545 534 535 + interface_mode &= ~AD7173_INTERFACE_DATA_STAT; 546 536 interface_mode |= AD7173_INTERFACE_DATA_STAT_EN(append); 547 537 ret = ad_sd_write_reg(&st->sd, AD7173_REG_INTERFACE_MODE, 2, interface_mode); 548 538 if (ret) ··· 717 705 { 718 706 struct ad7173_state *st = iio_priv(indio_dev); 719 707 struct ad7173_channel_config *cfg; 720 - unsigned int freq, i, reg; 708 + unsigned int freq, i; 721 709 int ret; 722 710 723 711 ret = iio_device_claim_direct_mode(indio_dev); ··· 733 721 734 722 cfg = &st->channels[chan->address].cfg; 735 723 cfg->odr = i; 736 - 737 - if (!cfg->live) 738 - break; 739 - 740 - ret = ad_sd_read_reg(&st->sd, AD7173_REG_FILTER(cfg->cfg_slot), 2, &reg); 741 - if (ret) 742 - break; 743 - reg &= ~AD7173_FILTER_ODR0_MASK; 744 - reg |= FIELD_PREP(AD7173_FILTER_ODR0_MASK, i); 745 - ret = ad_sd_write_reg(&st->sd, AD7173_REG_FILTER(cfg->cfg_slot), 2, reg); 724 + cfg->live = false; 746 725 break; 747 726 748 727 default: ··· 795 792 .type = IIO_VOLTAGE, 796 793 .indexed = 1, 797 794 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | 798 - BIT(IIO_CHAN_INFO_SCALE), 799 - .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ), 795 + BIT(IIO_CHAN_INFO_SCALE) | BIT(IIO_CHAN_INFO_SAMP_FREQ), 800 796 .scan_type = { 801 797 .sign = 'u', 802 798 .realbits = 24, ··· 806 804 807 805 static const struct iio_chan_spec ad7173_temp_iio_channel_template = { 808 806 .type = IIO_TEMP, 809 - .indexed = 1, 810 807 .channel = AD7173_AIN_TEMP_POS, 811 808 .channel2 = AD7173_AIN_TEMP_NEG, 812 809 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | 813 - BIT(IIO_CHAN_INFO_SCALE) | BIT(IIO_CHAN_INFO_OFFSET), 814 - .info_mask_shared_by_all = BIT(IIO_CHAN_INFO_SAMP_FREQ), 810 + BIT(IIO_CHAN_INFO_SCALE) | BIT(IIO_CHAN_INFO_OFFSET) | 811 + BIT(IIO_CHAN_INFO_SAMP_FREQ), 815 812 .scan_type = { 816 813 .sign = 'u', 817 814 .realbits = 24, ··· 933 932 AD7173_CH_ADDRESS(chan_arr[chan_index].channel, 934 933 chan_arr[chan_index].channel2); 935 934 chan_st_priv->cfg.bipolar = false; 936 - chan_st_priv->cfg.input_buf = true; 935 + chan_st_priv->cfg.input_buf = st->info->has_input_buf; 937 936 chan_st_priv->cfg.ref_sel = AD7173_SETUP_REF_SEL_INT_REF; 938 937 st->adc_mode |= AD7173_ADC_MODE_REF_EN; 939 938 ··· 990 989 991 990 chan_st_priv->ain = AD7173_CH_ADDRESS(ain[0], ain[1]); 992 991 chan_st_priv->chan_reg = chan_index; 993 - chan_st_priv->cfg.input_buf = true; 992 + chan_st_priv->cfg.input_buf = st->info->has_input_buf; 994 993 chan_st_priv->cfg.odr = 0; 995 994 996 995 chan_st_priv->cfg.bipolar = fwnode_property_read_bool(child, "bipolar");
+2 -2
drivers/iio/adc/ad9467.c
··· 243 243 } 244 244 245 245 static const struct iio_chan_spec ad9434_channels[] = { 246 - AD9467_CHAN(0, 0, 12, 'S'), 246 + AD9467_CHAN(0, 0, 12, 's'), 247 247 }; 248 248 249 249 static const struct iio_chan_spec ad9467_channels[] = { 250 - AD9467_CHAN(0, 0, 16, 'S'), 250 + AD9467_CHAN(0, 0, 16, 's'), 251 251 }; 252 252 253 253 static const struct ad9467_chip_info ad9467_chip_tbl = {
+5 -1
drivers/iio/common/inv_sensors/inv_sensors_timestamp.c
··· 60 60 int inv_sensors_timestamp_update_odr(struct inv_sensors_timestamp *ts, 61 61 uint32_t period, bool fifo) 62 62 { 63 + uint32_t mult; 64 + 63 65 /* when FIFO is on, prevent odr change if one is already pending */ 64 66 if (fifo && ts->new_mult != 0) 65 67 return -EAGAIN; 66 68 67 - ts->new_mult = period / ts->chip.clock_period; 69 + mult = period / ts->chip.clock_period; 70 + if (mult != ts->mult) 71 + ts->new_mult = mult; 68 72 69 73 return 0; 70 74 }
+1 -1
drivers/iio/dac/ad5592r-base.c
··· 415 415 s64 tmp = *val * (3767897513LL / 25LL); 416 416 *val = div_s64_rem(tmp, 1000000000LL, val2); 417 417 418 - return IIO_VAL_INT_PLUS_MICRO; 418 + return IIO_VAL_INT_PLUS_NANO; 419 419 } 420 420 421 421 mutex_lock(&st->lock);
+3 -2
drivers/iio/imu/bmi323/bmi323_core.c
··· 1391 1391 &data->buffer.channels, 1392 1392 ARRAY_SIZE(data->buffer.channels)); 1393 1393 if (ret) 1394 - return IRQ_NONE; 1394 + goto out; 1395 1395 } else { 1396 1396 for_each_set_bit(bit, indio_dev->active_scan_mask, 1397 1397 BMI323_CHAN_MAX) { ··· 1400 1400 &data->buffer.channels[index++], 1401 1401 BMI323_BYTES_PER_SAMPLE); 1402 1402 if (ret) 1403 - return IRQ_NONE; 1403 + goto out; 1404 1404 } 1405 1405 } 1406 1406 1407 1407 iio_push_to_buffers_with_timestamp(indio_dev, &data->buffer, 1408 1408 iio_get_time_ns(indio_dev)); 1409 1409 1410 + out: 1410 1411 iio_trigger_notify_done(indio_dev->trig); 1411 1412 1412 1413 return IRQ_HANDLED;
-4
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
··· 130 130 /* update data FIFO write */ 131 131 inv_sensors_timestamp_apply_odr(ts, 0, 0, 0); 132 132 ret = inv_icm42600_buffer_set_fifo_en(st, fifo_en | st->fifo.en); 133 - if (ret) 134 - goto out_unlock; 135 - 136 - ret = inv_icm42600_buffer_update_watermark(st); 137 133 138 134 out_unlock: 139 135 mutex_unlock(&st->lock);
+17 -2
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
··· 222 222 latency_accel = period_accel * wm_accel; 223 223 224 224 /* 0 value for watermark means that the sensor is turned off */ 225 + if (wm_gyro == 0 && wm_accel == 0) 226 + return 0; 227 + 225 228 if (latency_gyro == 0) { 226 229 watermark = wm_accel; 230 + st->fifo.watermark.eff_accel = wm_accel; 227 231 } else if (latency_accel == 0) { 228 232 watermark = wm_gyro; 233 + st->fifo.watermark.eff_gyro = wm_gyro; 229 234 } else { 230 235 /* compute the smallest latency that is a multiple of both */ 231 236 if (latency_gyro <= latency_accel) ··· 246 241 watermark = latency / period; 247 242 if (watermark < 1) 248 243 watermark = 1; 244 + /* update effective watermark */ 245 + st->fifo.watermark.eff_gyro = latency / period_gyro; 246 + if (st->fifo.watermark.eff_gyro < 1) 247 + st->fifo.watermark.eff_gyro = 1; 248 + st->fifo.watermark.eff_accel = latency / period_accel; 249 + if (st->fifo.watermark.eff_accel < 1) 250 + st->fifo.watermark.eff_accel = 1; 249 251 } 250 252 251 253 /* compute watermark value in bytes */ ··· 526 514 /* handle gyroscope timestamp and FIFO data parsing */ 527 515 if (st->fifo.nb.gyro > 0) { 528 516 ts = &gyro_st->ts; 529 - inv_sensors_timestamp_interrupt(ts, st->fifo.nb.gyro, 517 + inv_sensors_timestamp_interrupt(ts, st->fifo.watermark.eff_gyro, 530 518 st->timestamp.gyro); 531 519 ret = inv_icm42600_gyro_parse_fifo(st->indio_gyro); 532 520 if (ret) ··· 536 524 /* handle accelerometer timestamp and FIFO data parsing */ 537 525 if (st->fifo.nb.accel > 0) { 538 526 ts = &accel_st->ts; 539 - inv_sensors_timestamp_interrupt(ts, st->fifo.nb.accel, 527 + inv_sensors_timestamp_interrupt(ts, st->fifo.watermark.eff_accel, 540 528 st->timestamp.accel); 541 529 ret = inv_icm42600_accel_parse_fifo(st->indio_accel); 542 530 if (ret) ··· 588 576 { 589 577 unsigned int val; 590 578 int ret; 579 + 580 + st->fifo.watermark.eff_gyro = 1; 581 + st->fifo.watermark.eff_accel = 1; 591 582 592 583 /* 593 584 * Default FIFO configuration (bits 7 to 5)
+2
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.h
··· 32 32 struct { 33 33 unsigned int gyro; 34 34 unsigned int accel; 35 + unsigned int eff_gyro; 36 + unsigned int eff_accel; 35 37 } watermark; 36 38 size_t count; 37 39 struct {
+1
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c
··· 537 537 if (ret) 538 538 return ret; 539 539 540 + irq_type |= IRQF_ONESHOT; 540 541 return devm_request_threaded_irq(dev, irq, inv_icm42600_irq_timestamp, 541 542 inv_icm42600_irq_handler, irq_type, 542 543 "inv_icm42600", st);
-4
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
··· 130 130 /* update data FIFO write */ 131 131 inv_sensors_timestamp_apply_odr(ts, 0, 0, 0); 132 132 ret = inv_icm42600_buffer_set_fifo_en(st, fifo_en | st->fifo.en); 133 - if (ret) 134 - goto out_unlock; 135 - 136 - ret = inv_icm42600_buffer_update_watermark(st); 137 133 138 134 out_unlock: 139 135 mutex_unlock(&st->lock);
+2 -2
drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
··· 100 100 goto end_session; 101 101 /* Each FIFO data contains all sensors, so same number for FIFO and sensor data */ 102 102 fifo_period = NSEC_PER_SEC / INV_MPU6050_DIVIDER_TO_FIFO_RATE(st->chip_config.divider); 103 - inv_sensors_timestamp_interrupt(&st->timestamp, nb, pf->timestamp); 104 - inv_sensors_timestamp_apply_odr(&st->timestamp, fifo_period, nb, 0); 103 + inv_sensors_timestamp_interrupt(&st->timestamp, 1, pf->timestamp); 104 + inv_sensors_timestamp_apply_odr(&st->timestamp, fifo_period, 1, 0); 105 105 106 106 /* clear internal data buffer for avoiding kernel data leak */ 107 107 memset(data, 0, sizeof(data));
+1
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
··· 300 300 if (!st->trig) 301 301 return -ENOMEM; 302 302 303 + irq_type |= IRQF_ONESHOT; 303 304 ret = devm_request_threaded_irq(&indio_dev->dev, st->irq, 304 305 &inv_mpu6050_interrupt_timestamp, 305 306 &inv_mpu6050_interrupt_handle,
+1 -1
drivers/iio/inkern.c
··· 721 721 return ret; 722 722 *val *= scale; 723 723 724 - return 0; 724 + return ret; 725 725 } else { 726 726 ret = iio_channel_read(chan, val, NULL, IIO_CHAN_INFO_RAW); 727 727 if (ret < 0)
+5 -5
drivers/iio/pressure/bmp280-core.c
··· 1394 1394 1395 1395 /* 1396 1396 * Temperature is returned in Celsius degrees in fractional 1397 - * form down 2^16. We rescale by x1000 to return milli Celsius 1398 - * to respect IIO ABI. 1397 + * form down 2^16. We rescale by x1000 to return millidegrees 1398 + * Celsius to respect IIO ABI. 1399 1399 */ 1400 - *val = raw_temp * 1000; 1401 - *val2 = 16; 1402 - return IIO_VAL_FRACTIONAL_LOG2; 1400 + raw_temp = sign_extend32(raw_temp, 23); 1401 + *val = ((s64)raw_temp * 1000) / (1 << 16); 1402 + return IIO_VAL_INT; 1403 1403 } 1404 1404 1405 1405 static int bmp580_read_press(struct bmp280_data *data, int *val, int *val2)
+3 -3
drivers/iio/temperature/mlx90635.c
··· 947 947 "failed to allocate regmap\n"); 948 948 949 949 regmap_ee = devm_regmap_init_i2c(client, &mlx90635_regmap_ee); 950 - if (IS_ERR(regmap)) 951 - return dev_err_probe(&client->dev, PTR_ERR(regmap), 952 - "failed to allocate regmap\n"); 950 + if (IS_ERR(regmap_ee)) 951 + return dev_err_probe(&client->dev, PTR_ERR(regmap_ee), 952 + "failed to allocate EEPROM regmap\n"); 953 953 954 954 mlx90635 = iio_priv(indio_dev); 955 955 i2c_set_clientdata(client, indio_dev);
+7 -2
drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_gp.c
··· 69 69 70 70 aux_bus->aux_device_wrapper[1] = kzalloc(sizeof(*aux_bus->aux_device_wrapper[1]), 71 71 GFP_KERNEL); 72 - if (!aux_bus->aux_device_wrapper[1]) 73 - return -ENOMEM; 72 + if (!aux_bus->aux_device_wrapper[1]) { 73 + retval = -ENOMEM; 74 + goto err_aux_dev_add_0; 75 + } 74 76 75 77 retval = ida_alloc(&gp_client_ida, GFP_KERNEL); 76 78 if (retval < 0) ··· 113 111 114 112 err_aux_dev_add_1: 115 113 auxiliary_device_uninit(&aux_bus->aux_device_wrapper[1]->aux_dev); 114 + goto err_aux_dev_add_0; 116 115 117 116 err_aux_dev_init_1: 118 117 ida_free(&gp_client_ida, aux_bus->aux_device_wrapper[1]->aux_dev.id); ··· 123 120 124 121 err_aux_dev_add_0: 125 122 auxiliary_device_uninit(&aux_bus->aux_device_wrapper[0]->aux_dev); 123 + goto err_ret; 126 124 127 125 err_aux_dev_init_0: 128 126 ida_free(&gp_client_ida, aux_bus->aux_device_wrapper[0]->aux_dev.id); ··· 131 127 err_ida_alloc_0: 132 128 kfree(aux_bus->aux_device_wrapper[0]); 133 129 130 + err_ret: 134 131 return retval; 135 132 } 136 133
+1 -1
drivers/misc/mei/main.c
··· 329 329 } 330 330 331 331 if (!mei_cl_is_connected(cl)) { 332 - cl_err(dev, cl, "is not connected"); 332 + cl_dbg(dev, cl, "is not connected"); 333 333 rets = -ENODEV; 334 334 goto out; 335 335 }
+3 -1
drivers/misc/mei/pci-me.c
··· 385 385 } 386 386 387 387 err = mei_restart(dev); 388 - if (err) 388 + if (err) { 389 + free_irq(pdev->irq, dev); 389 390 return err; 391 + } 390 392 391 393 /* Start timer if stopped in suspend */ 392 394 schedule_delayed_work(&dev->timer_work, HZ);
+15 -24
drivers/misc/mei/platform-vsc.c
··· 399 399 400 400 static int mei_vsc_suspend(struct device *dev) 401 401 { 402 - struct mei_device *mei_dev = dev_get_drvdata(dev); 403 - struct mei_vsc_hw *hw = mei_dev_to_vsc_hw(mei_dev); 402 + struct mei_device *mei_dev; 403 + int ret = 0; 404 404 405 - mei_stop(mei_dev); 405 + mei_dev = dev_get_drvdata(dev); 406 + if (!mei_dev) 407 + return -ENODEV; 406 408 407 - mei_disable_interrupts(mei_dev); 409 + mutex_lock(&mei_dev->device_lock); 408 410 409 - vsc_tp_free_irq(hw->tp); 411 + if (!mei_write_is_idle(mei_dev)) 412 + ret = -EAGAIN; 410 413 411 - return 0; 414 + mutex_unlock(&mei_dev->device_lock); 415 + 416 + return ret; 412 417 } 413 418 414 419 static int mei_vsc_resume(struct device *dev) 415 420 { 416 - struct mei_device *mei_dev = dev_get_drvdata(dev); 417 - struct mei_vsc_hw *hw = mei_dev_to_vsc_hw(mei_dev); 418 - int ret; 421 + struct mei_device *mei_dev; 419 422 420 - ret = vsc_tp_request_irq(hw->tp); 421 - if (ret) 422 - return ret; 423 - 424 - ret = mei_restart(mei_dev); 425 - if (ret) 426 - goto err_free; 427 - 428 - /* start timer if stopped in suspend */ 429 - schedule_delayed_work(&mei_dev->timer_work, HZ); 423 + mei_dev = dev_get_drvdata(dev); 424 + if (!mei_dev) 425 + return -ENODEV; 430 426 431 427 return 0; 432 - 433 - err_free: 434 - vsc_tp_free_irq(hw->tp); 435 - 436 - return ret; 437 428 } 438 429 439 430 static DEFINE_SIMPLE_DEV_PM_OPS(mei_vsc_pm_ops, mei_vsc_suspend, mei_vsc_resume);
+1 -1
drivers/misc/mei/vsc-fw-loader.c
··· 252 252 { 253 253 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER }; 254 254 union acpi_object obj = { 255 - .type = ACPI_TYPE_INTEGER, 255 + .integer.type = ACPI_TYPE_INTEGER, 256 256 .integer.value = 1, 257 257 }; 258 258 struct acpi_object_list arg_list = {
+7 -1
drivers/parport/parport_amiga.c
··· 229 229 parport_put_port(port); 230 230 } 231 231 232 - static struct platform_driver amiga_parallel_driver = { 232 + /* 233 + * amiga_parallel_remove() lives in .exit.text. For drivers registered via 234 + * module_platform_driver_probe() this is ok because they cannot get unbound at 235 + * runtime. So mark the driver struct with __refdata to prevent modpost 236 + * triggering a section mismatch warning. 237 + */ 238 + static struct platform_driver amiga_parallel_driver __refdata = { 233 239 .remove_new = __exit_p(amiga_parallel_remove), 234 240 .driver = { 235 241 .name = "amiga-parallel",
+3 -1
fs/jfs/xattr.c
··· 557 557 558 558 size_check: 559 559 if (EALIST_SIZE(ea_buf->xattr) != ea_size) { 560 + int size = min_t(int, EALIST_SIZE(ea_buf->xattr), ea_size); 561 + 560 562 printk(KERN_ERR "ea_get: invalid extended attribute\n"); 561 563 print_hex_dump(KERN_ERR, "", DUMP_PREFIX_ADDRESS, 16, 1, 562 - ea_buf->xattr, ea_size, 1); 564 + ea_buf->xattr, size, 1); 563 565 ea_release(inode, ea_buf); 564 566 rc = -EIO; 565 567 goto clean_up;