diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-10-16 04:05:53 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-10-16 04:05:53 -0400 |
commit | 263c43a4479ecce52c0fdc84b4620e146263d549 (patch) | |
tree | b29ad7d94892be7a40524400481f71a1c075a167 /drivers/staging | |
parent | 873ee9ed2c020b59e22a5082f73fc2960ec959bf (diff) | |
parent | d0e639c9e06d44e713170031fe05fb60ebe680af (diff) |
Merge tag 'v3.12-rc4' into devel
Linux 3.12-rc4
Diffstat (limited to 'drivers/staging')
41 files changed, 104 insertions, 106 deletions
diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index a84aab47a113..f73287eab373 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig | |||
@@ -96,6 +96,15 @@ config COMEDI_SKEL | |||
96 | To compile this driver as a module, choose M here: the module will be | 96 | To compile this driver as a module, choose M here: the module will be |
97 | called skel. | 97 | called skel. |
98 | 98 | ||
99 | config COMEDI_SSV_DNP | ||
100 | tristate "SSV Embedded Systems DIL/Net-PC support" | ||
101 | depends on X86_32 || COMPILE_TEST | ||
102 | ---help--- | ||
103 | Enable support for SSV Embedded Systems DIL/Net-PC | ||
104 | |||
105 | To compile this driver as a module, choose M here: the module will be | ||
106 | called ssv_dnp. | ||
107 | |||
99 | endif # COMEDI_MISC_DRIVERS | 108 | endif # COMEDI_MISC_DRIVERS |
100 | 109 | ||
101 | menuconfig COMEDI_ISA_DRIVERS | 110 | menuconfig COMEDI_ISA_DRIVERS |
@@ -386,6 +395,14 @@ config COMEDI_DMM32AT | |||
386 | To compile this driver as a module, choose M here: the module will be | 395 | To compile this driver as a module, choose M here: the module will be |
387 | called dmm32at. | 396 | called dmm32at. |
388 | 397 | ||
398 | config COMEDI_UNIOXX5 | ||
399 | tristate "Fastwel UNIOxx-5 analog and digital io board support" | ||
400 | ---help--- | ||
401 | Enable support for Fastwel UNIOxx-5 (analog and digital i/o) boards | ||
402 | |||
403 | To compile this driver as a module, choose M here: the module will be | ||
404 | called unioxx5. | ||
405 | |||
389 | config COMEDI_FL512 | 406 | config COMEDI_FL512 |
390 | tristate "FL512 ISA card support" | 407 | tristate "FL512 ISA card support" |
391 | ---help--- | 408 | ---help--- |
@@ -855,14 +872,6 @@ config COMEDI_DYNA_PCI10XX | |||
855 | To compile this driver as a module, choose M here: the module will be | 872 | To compile this driver as a module, choose M here: the module will be |
856 | called dyna_pci10xx. | 873 | called dyna_pci10xx. |
857 | 874 | ||
858 | config COMEDI_UNIOXX5 | ||
859 | tristate "Fastwel UNIOxx-5 analog and digital io board support" | ||
860 | ---help--- | ||
861 | Enable support for Fastwel UNIOxx-5 (analog and digital i/o) boards | ||
862 | |||
863 | To compile this driver as a module, choose M here: the module will be | ||
864 | called unioxx5. | ||
865 | |||
866 | config COMEDI_GSC_HPDI | 875 | config COMEDI_GSC_HPDI |
867 | tristate "General Standards PCI-HPDI32 / PMC-HPDI32 support" | 876 | tristate "General Standards PCI-HPDI32 / PMC-HPDI32 support" |
868 | select COMEDI_FC | 877 | select COMEDI_FC |
@@ -1085,14 +1094,6 @@ config COMEDI_S626 | |||
1085 | To compile this driver as a module, choose M here: the module will be | 1094 | To compile this driver as a module, choose M here: the module will be |
1086 | called s626. | 1095 | called s626. |
1087 | 1096 | ||
1088 | config COMEDI_SSV_DNP | ||
1089 | tristate "SSV Embedded Systems DIL/Net-PC support" | ||
1090 | ---help--- | ||
1091 | Enable support for SSV Embedded Systems DIL/Net-PC | ||
1092 | |||
1093 | To compile this driver as a module, choose M here: the module will be | ||
1094 | called ssv_dnp. | ||
1095 | |||
1096 | config COMEDI_MITE | 1097 | config COMEDI_MITE |
1097 | depends on HAS_DMA | 1098 | depends on HAS_DMA |
1098 | tristate | 1099 | tristate |
diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c index 3ba4c5712dff..853f62b2b1a9 100644 --- a/drivers/staging/comedi/drivers/ni_65xx.c +++ b/drivers/staging/comedi/drivers/ni_65xx.c | |||
@@ -369,28 +369,23 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev, | |||
369 | { | 369 | { |
370 | const struct ni_65xx_board *board = comedi_board(dev); | 370 | const struct ni_65xx_board *board = comedi_board(dev); |
371 | struct ni_65xx_private *devpriv = dev->private; | 371 | struct ni_65xx_private *devpriv = dev->private; |
372 | unsigned base_bitfield_channel; | 372 | int base_bitfield_channel; |
373 | const unsigned max_ports_per_bitfield = 5; | ||
374 | unsigned read_bits = 0; | 373 | unsigned read_bits = 0; |
375 | unsigned j; | 374 | int last_port_offset = ni_65xx_port_by_channel(s->n_chan - 1); |
375 | int port_offset; | ||
376 | 376 | ||
377 | base_bitfield_channel = CR_CHAN(insn->chanspec); | 377 | base_bitfield_channel = CR_CHAN(insn->chanspec); |
378 | for (j = 0; j < max_ports_per_bitfield; ++j) { | 378 | for (port_offset = ni_65xx_port_by_channel(base_bitfield_channel); |
379 | const unsigned port_offset = | 379 | port_offset <= last_port_offset; port_offset++) { |
380 | ni_65xx_port_by_channel(base_bitfield_channel) + j; | 380 | unsigned port = sprivate(s)->base_port + port_offset; |
381 | const unsigned port = | 381 | int base_port_channel = port_offset * ni_65xx_channels_per_port; |
382 | sprivate(s)->base_port + port_offset; | ||
383 | unsigned base_port_channel; | ||
384 | unsigned port_mask, port_data, port_read_bits; | 382 | unsigned port_mask, port_data, port_read_bits; |
385 | int bitshift; | 383 | int bitshift = base_port_channel - base_bitfield_channel; |
386 | if (port >= ni_65xx_total_num_ports(board)) | 384 | |
385 | if (bitshift >= 32) | ||
387 | break; | 386 | break; |
388 | base_port_channel = port_offset * ni_65xx_channels_per_port; | ||
389 | port_mask = data[0]; | 387 | port_mask = data[0]; |
390 | port_data = data[1]; | 388 | port_data = data[1]; |
391 | bitshift = base_port_channel - base_bitfield_channel; | ||
392 | if (bitshift >= 32 || bitshift <= -32) | ||
393 | break; | ||
394 | if (bitshift > 0) { | 389 | if (bitshift > 0) { |
395 | port_mask >>= bitshift; | 390 | port_mask >>= bitshift; |
396 | port_data >>= bitshift; | 391 | port_data >>= bitshift; |
diff --git a/drivers/staging/dgap/dgap_driver.c b/drivers/staging/dgap/dgap_driver.c index 724a685753dd..40ef785a0428 100644 --- a/drivers/staging/dgap/dgap_driver.c +++ b/drivers/staging/dgap/dgap_driver.c | |||
@@ -474,7 +474,7 @@ static void dgap_cleanup_board(struct board_t *brd) | |||
474 | 474 | ||
475 | DGAP_LOCK(dgap_global_lock, flags); | 475 | DGAP_LOCK(dgap_global_lock, flags); |
476 | brd->msgbuf = NULL; | 476 | brd->msgbuf = NULL; |
477 | printk(brd->msgbuf_head); | 477 | printk("%s", brd->msgbuf_head); |
478 | kfree(brd->msgbuf_head); | 478 | kfree(brd->msgbuf_head); |
479 | brd->msgbuf_head = NULL; | 479 | brd->msgbuf_head = NULL; |
480 | DGAP_UNLOCK(dgap_global_lock, flags); | 480 | DGAP_UNLOCK(dgap_global_lock, flags); |
@@ -628,7 +628,7 @@ static int dgap_found_board(struct pci_dev *pdev, int id) | |||
628 | DPR_INIT(("dgap_scan(%d) - printing out the msgbuf\n", i)); | 628 | DPR_INIT(("dgap_scan(%d) - printing out the msgbuf\n", i)); |
629 | DGAP_LOCK(dgap_global_lock, flags); | 629 | DGAP_LOCK(dgap_global_lock, flags); |
630 | brd->msgbuf = NULL; | 630 | brd->msgbuf = NULL; |
631 | printk(brd->msgbuf_head); | 631 | printk("%s", brd->msgbuf_head); |
632 | kfree(brd->msgbuf_head); | 632 | kfree(brd->msgbuf_head); |
633 | brd->msgbuf_head = NULL; | 633 | brd->msgbuf_head = NULL; |
634 | DGAP_UNLOCK(dgap_global_lock, flags); | 634 | DGAP_UNLOCK(dgap_global_lock, flags); |
@@ -955,25 +955,28 @@ static void dgap_mbuf(struct board_t *brd, const char *fmt, ...) { | |||
955 | char buf[1024]; | 955 | char buf[1024]; |
956 | int i; | 956 | int i; |
957 | unsigned long flags; | 957 | unsigned long flags; |
958 | size_t length; | ||
958 | 959 | ||
959 | DGAP_LOCK(dgap_global_lock, flags); | 960 | DGAP_LOCK(dgap_global_lock, flags); |
960 | 961 | ||
961 | /* Format buf using fmt and arguments contained in ap. */ | 962 | /* Format buf using fmt and arguments contained in ap. */ |
962 | va_start(ap, fmt); | 963 | va_start(ap, fmt); |
963 | i = vsprintf(buf, fmt, ap); | 964 | i = vsnprintf(buf, sizeof(buf), fmt, ap); |
964 | va_end(ap); | 965 | va_end(ap); |
965 | 966 | ||
966 | DPR((buf)); | 967 | DPR((buf)); |
967 | 968 | ||
968 | if (!brd || !brd->msgbuf) { | 969 | if (!brd || !brd->msgbuf) { |
969 | printk(buf); | 970 | printk("%s", buf); |
970 | DGAP_UNLOCK(dgap_global_lock, flags); | 971 | DGAP_UNLOCK(dgap_global_lock, flags); |
971 | return; | 972 | return; |
972 | } | 973 | } |
973 | 974 | ||
974 | memcpy(brd->msgbuf, buf, strlen(buf)); | 975 | length = strlen(buf) + 1; |
975 | brd->msgbuf += strlen(buf); | 976 | if (brd->msgbuf - brd->msgbuf_head < length) |
976 | *brd->msgbuf = 0; | 977 | length = brd->msgbuf - brd->msgbuf_head; |
978 | memcpy(brd->msgbuf, buf, length); | ||
979 | brd->msgbuf += length; | ||
977 | 980 | ||
978 | DGAP_UNLOCK(dgap_global_lock, flags); | 981 | DGAP_UNLOCK(dgap_global_lock, flags); |
979 | } | 982 | } |
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index f8c1e22585d6..71d2b83cc3a1 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c | |||
@@ -454,7 +454,7 @@ static void dgnc_cleanup_board(struct board_t *brd) | |||
454 | 454 | ||
455 | DGNC_LOCK(dgnc_global_lock, flags); | 455 | DGNC_LOCK(dgnc_global_lock, flags); |
456 | brd->msgbuf = NULL; | 456 | brd->msgbuf = NULL; |
457 | printk(brd->msgbuf_head); | 457 | printk("%s", brd->msgbuf_head); |
458 | kfree(brd->msgbuf_head); | 458 | kfree(brd->msgbuf_head); |
459 | brd->msgbuf_head = NULL; | 459 | brd->msgbuf_head = NULL; |
460 | DGNC_UNLOCK(dgnc_global_lock, flags); | 460 | DGNC_UNLOCK(dgnc_global_lock, flags); |
@@ -710,7 +710,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) | |||
710 | DPR_INIT(("dgnc_scan(%d) - printing out the msgbuf\n", i)); | 710 | DPR_INIT(("dgnc_scan(%d) - printing out the msgbuf\n", i)); |
711 | DGNC_LOCK(dgnc_global_lock, flags); | 711 | DGNC_LOCK(dgnc_global_lock, flags); |
712 | brd->msgbuf = NULL; | 712 | brd->msgbuf = NULL; |
713 | printk(brd->msgbuf_head); | 713 | printk("%s", brd->msgbuf_head); |
714 | kfree(brd->msgbuf_head); | 714 | kfree(brd->msgbuf_head); |
715 | brd->msgbuf_head = NULL; | 715 | brd->msgbuf_head = NULL; |
716 | DGNC_UNLOCK(dgnc_global_lock, flags); | 716 | DGNC_UNLOCK(dgnc_global_lock, flags); |
diff --git a/drivers/staging/iio/Kconfig b/drivers/staging/iio/Kconfig index db4d6dc03243..b36feb080cba 100644 --- a/drivers/staging/iio/Kconfig +++ b/drivers/staging/iio/Kconfig | |||
@@ -37,7 +37,7 @@ config IIO_SIMPLE_DUMMY_EVENTS | |||
37 | 37 | ||
38 | config IIO_SIMPLE_DUMMY_BUFFER | 38 | config IIO_SIMPLE_DUMMY_BUFFER |
39 | boolean "Buffered capture support" | 39 | boolean "Buffered capture support" |
40 | depends on IIO_KFIFO_BUF | 40 | select IIO_KFIFO_BUF |
41 | help | 41 | help |
42 | Add buffered data capture to the simple dummy driver. | 42 | Add buffered data capture to the simple dummy driver. |
43 | 43 | ||
diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c index 351936c3efd6..e4998e4d4434 100644 --- a/drivers/staging/iio/light/isl29018.c +++ b/drivers/staging/iio/light/isl29018.c | |||
@@ -563,6 +563,7 @@ static int isl29018_probe(struct i2c_client *client, | |||
563 | mutex_init(&chip->lock); | 563 | mutex_init(&chip->lock); |
564 | 564 | ||
565 | chip->lux_scale = 1; | 565 | chip->lux_scale = 1; |
566 | chip->lux_uscale = 0; | ||
566 | chip->range = 1000; | 567 | chip->range = 1000; |
567 | chip->adc_bit = 16; | 568 | chip->adc_bit = 16; |
568 | chip->suspended = false; | 569 | chip->suspended = false; |
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c index d2748c329eae..c3f3f539e787 100644 --- a/drivers/staging/iio/magnetometer/hmc5843.c +++ b/drivers/staging/iio/magnetometer/hmc5843.c | |||
@@ -229,7 +229,7 @@ static int hmc5843_read_measurement(struct iio_dev *indio_dev, | |||
229 | if (result < 0) | 229 | if (result < 0) |
230 | return -EINVAL; | 230 | return -EINVAL; |
231 | 231 | ||
232 | *val = result; | 232 | *val = sign_extend32(result, 15); |
233 | return IIO_VAL_INT; | 233 | return IIO_VAL_INT; |
234 | } | 234 | } |
235 | 235 | ||
diff --git a/drivers/staging/iio/meter/ade7854-spi.c b/drivers/staging/iio/meter/ade7854-spi.c index a802cf2491d6..4c6d2041260b 100644 --- a/drivers/staging/iio/meter/ade7854-spi.c +++ b/drivers/staging/iio/meter/ade7854-spi.c | |||
@@ -299,7 +299,7 @@ static int ade7854_spi_probe(struct spi_device *spi) | |||
299 | if (ret) | 299 | if (ret) |
300 | iio_device_free(indio_dev); | 300 | iio_device_free(indio_dev); |
301 | 301 | ||
302 | return 0; | 302 | return ret; |
303 | } | 303 | } |
304 | 304 | ||
305 | static int ade7854_spi_remove(struct spi_device *spi) | 305 | static int ade7854_spi_remove(struct spi_device *spi) |
diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 47c5888461ff..a2e52a0c53c9 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c | |||
@@ -41,7 +41,6 @@ struct imx_drm_device { | |||
41 | struct list_head encoder_list; | 41 | struct list_head encoder_list; |
42 | struct list_head connector_list; | 42 | struct list_head connector_list; |
43 | struct mutex mutex; | 43 | struct mutex mutex; |
44 | int references; | ||
45 | int pipes; | 44 | int pipes; |
46 | struct drm_fbdev_cma *fbhelper; | 45 | struct drm_fbdev_cma *fbhelper; |
47 | }; | 46 | }; |
@@ -241,8 +240,6 @@ struct drm_device *imx_drm_device_get(void) | |||
241 | } | 240 | } |
242 | } | 241 | } |
243 | 242 | ||
244 | imxdrm->references++; | ||
245 | |||
246 | return imxdrm->drm; | 243 | return imxdrm->drm; |
247 | 244 | ||
248 | unwind_crtc: | 245 | unwind_crtc: |
@@ -280,8 +277,6 @@ void imx_drm_device_put(void) | |||
280 | list_for_each_entry(enc, &imxdrm->encoder_list, list) | 277 | list_for_each_entry(enc, &imxdrm->encoder_list, list) |
281 | module_put(enc->owner); | 278 | module_put(enc->owner); |
282 | 279 | ||
283 | imxdrm->references--; | ||
284 | |||
285 | mutex_unlock(&imxdrm->mutex); | 280 | mutex_unlock(&imxdrm->mutex); |
286 | } | 281 | } |
287 | EXPORT_SYMBOL_GPL(imx_drm_device_put); | 282 | EXPORT_SYMBOL_GPL(imx_drm_device_put); |
@@ -485,7 +480,7 @@ int imx_drm_add_crtc(struct drm_crtc *crtc, | |||
485 | 480 | ||
486 | mutex_lock(&imxdrm->mutex); | 481 | mutex_lock(&imxdrm->mutex); |
487 | 482 | ||
488 | if (imxdrm->references) { | 483 | if (imxdrm->drm->open_count) { |
489 | ret = -EBUSY; | 484 | ret = -EBUSY; |
490 | goto err_busy; | 485 | goto err_busy; |
491 | } | 486 | } |
@@ -564,7 +559,7 @@ int imx_drm_add_encoder(struct drm_encoder *encoder, | |||
564 | 559 | ||
565 | mutex_lock(&imxdrm->mutex); | 560 | mutex_lock(&imxdrm->mutex); |
566 | 561 | ||
567 | if (imxdrm->references) { | 562 | if (imxdrm->drm->open_count) { |
568 | ret = -EBUSY; | 563 | ret = -EBUSY; |
569 | goto err_busy; | 564 | goto err_busy; |
570 | } | 565 | } |
@@ -709,7 +704,7 @@ int imx_drm_add_connector(struct drm_connector *connector, | |||
709 | 704 | ||
710 | mutex_lock(&imxdrm->mutex); | 705 | mutex_lock(&imxdrm->mutex); |
711 | 706 | ||
712 | if (imxdrm->references) { | 707 | if (imxdrm->drm->open_count) { |
713 | ret = -EBUSY; | 708 | ret = -EBUSY; |
714 | goto err_busy; | 709 | goto err_busy; |
715 | } | 710 | } |
diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c index 2f44d56700af..776d3632dc7d 100644 --- a/drivers/staging/line6/toneport.c +++ b/drivers/staging/line6/toneport.c | |||
@@ -244,13 +244,17 @@ static int snd_toneport_source_put(struct snd_kcontrol *kcontrol, | |||
244 | struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol); | 244 | struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol); |
245 | struct usb_line6_toneport *toneport = | 245 | struct usb_line6_toneport *toneport = |
246 | (struct usb_line6_toneport *)line6pcm->line6; | 246 | (struct usb_line6_toneport *)line6pcm->line6; |
247 | unsigned int source; | ||
247 | 248 | ||
248 | if (ucontrol->value.enumerated.item[0] == toneport->source) | 249 | source = ucontrol->value.enumerated.item[0]; |
250 | if (source >= ARRAY_SIZE(toneport_source_info)) | ||
251 | return -EINVAL; | ||
252 | if (source == toneport->source) | ||
249 | return 0; | 253 | return 0; |
250 | 254 | ||
251 | toneport->source = ucontrol->value.enumerated.item[0]; | 255 | toneport->source = source; |
252 | toneport_send_cmd(toneport->line6.usbdev, | 256 | toneport_send_cmd(toneport->line6.usbdev, |
253 | toneport_source_info[toneport->source].code, 0x0000); | 257 | toneport_source_info[source].code, 0x0000); |
254 | return 1; | 258 | return 1; |
255 | } | 259 | } |
256 | 260 | ||
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index 086ca3d7241b..26b49a24b3df 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | |||
@@ -1802,7 +1802,7 @@ kiblnd_recv (lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed, | |||
1802 | int | 1802 | int |
1803 | kiblnd_thread_start(int (*fn)(void *arg), void *arg, char *name) | 1803 | kiblnd_thread_start(int (*fn)(void *arg), void *arg, char *name) |
1804 | { | 1804 | { |
1805 | struct task_struct *task = kthread_run(fn, arg, name); | 1805 | struct task_struct *task = kthread_run(fn, arg, "%s", name); |
1806 | 1806 | ||
1807 | if (IS_ERR(task)) | 1807 | if (IS_ERR(task)) |
1808 | return PTR_ERR(task); | 1808 | return PTR_ERR(task); |
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c index 2c581b7fa8ad..68a4f52ec998 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | |||
@@ -1005,7 +1005,7 @@ ksocknal_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) | |||
1005 | int | 1005 | int |
1006 | ksocknal_thread_start(int (*fn)(void *arg), void *arg, char *name) | 1006 | ksocknal_thread_start(int (*fn)(void *arg), void *arg, char *name) |
1007 | { | 1007 | { |
1008 | struct task_struct *task = kthread_run(fn, arg, name); | 1008 | struct task_struct *task = kthread_run(fn, arg, "%s", name); |
1009 | 1009 | ||
1010 | if (IS_ERR(task)) | 1010 | if (IS_ERR(task)) |
1011 | return PTR_ERR(task); | 1011 | return PTR_ERR(task); |
diff --git a/drivers/staging/lustre/lustre/Kconfig b/drivers/staging/lustre/lustre/Kconfig index 4e898e491860..2156a44d0740 100644 --- a/drivers/staging/lustre/lustre/Kconfig +++ b/drivers/staging/lustre/lustre/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config LUSTRE_FS | 1 | config LUSTRE_FS |
2 | tristate "Lustre file system client support" | 2 | tristate "Lustre file system client support" |
3 | depends on INET && m | 3 | depends on INET && m && !MIPS && !XTENSA && !SUPERH |
4 | select LNET | 4 | select LNET |
5 | select CRYPTO | 5 | select CRYPTO |
6 | select CRYPTO_CRC32 | 6 | select CRYPTO_CRC32 |
@@ -52,7 +52,7 @@ config LUSTRE_DEBUG_EXPENSIVE_CHECK | |||
52 | config LUSTRE_TRANSLATE_ERRNOS | 52 | config LUSTRE_TRANSLATE_ERRNOS |
53 | bool | 53 | bool |
54 | depends on LUSTRE_FS && !X86 | 54 | depends on LUSTRE_FS && !X86 |
55 | default true | 55 | default y |
56 | 56 | ||
57 | config LUSTRE_LLITE_LLOOP | 57 | config LUSTRE_LLITE_LLOOP |
58 | bool "Lustre virtual block device" | 58 | bool "Lustre virtual block device" |
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index 3916bda3004c..a100a0b96381 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | |||
@@ -800,9 +800,9 @@ static int ldlm_bl_thread_start(struct ldlm_bl_pool *blp) | |||
800 | 800 | ||
801 | init_completion(&bltd.bltd_comp); | 801 | init_completion(&bltd.bltd_comp); |
802 | bltd.bltd_num = atomic_read(&blp->blp_num_threads); | 802 | bltd.bltd_num = atomic_read(&blp->blp_num_threads); |
803 | snprintf(bltd.bltd_name, sizeof(bltd.bltd_name) - 1, | 803 | snprintf(bltd.bltd_name, sizeof(bltd.bltd_name), |
804 | "ldlm_bl_%02d", bltd.bltd_num); | 804 | "ldlm_bl_%02d", bltd.bltd_num); |
805 | task = kthread_run(ldlm_bl_thread_main, &bltd, bltd.bltd_name); | 805 | task = kthread_run(ldlm_bl_thread_main, &bltd, "%s", bltd.bltd_name); |
806 | if (IS_ERR(task)) { | 806 | if (IS_ERR(task)) { |
807 | CERROR("cannot start LDLM thread ldlm_bl_%02d: rc %ld\n", | 807 | CERROR("cannot start LDLM thread ldlm_bl_%02d: rc %ld\n", |
808 | atomic_read(&blp->blp_num_threads), PTR_ERR(task)); | 808 | atomic_read(&blp->blp_num_threads), PTR_ERR(task)); |
diff --git a/drivers/staging/lustre/lustre/libcfs/workitem.c b/drivers/staging/lustre/lustre/libcfs/workitem.c index 462172d1a756..1a55c81892e0 100644 --- a/drivers/staging/lustre/lustre/libcfs/workitem.c +++ b/drivers/staging/lustre/lustre/libcfs/workitem.c | |||
@@ -397,7 +397,7 @@ cfs_wi_sched_create(char *name, struct cfs_cpt_table *cptab, | |||
397 | sched->ws_name, sched->ws_nthreads); | 397 | sched->ws_name, sched->ws_nthreads); |
398 | } | 398 | } |
399 | 399 | ||
400 | task = kthread_run(cfs_wi_scheduler, sched, name); | 400 | task = kthread_run(cfs_wi_scheduler, sched, "%s", name); |
401 | if (!IS_ERR(task)) { | 401 | if (!IS_ERR(task)) { |
402 | nthrs--; | 402 | nthrs--; |
403 | continue; | 403 | continue; |
diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c index 2644edf438c1..c8b43442dc74 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c | |||
@@ -1387,7 +1387,7 @@ echo_copyout_lsm (struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob) | |||
1387 | if (nob > ulsm_nob) | 1387 | if (nob > ulsm_nob) |
1388 | return (-EINVAL); | 1388 | return (-EINVAL); |
1389 | 1389 | ||
1390 | if (copy_to_user (ulsm, lsm, sizeof(ulsm))) | 1390 | if (copy_to_user (ulsm, lsm, sizeof(*ulsm))) |
1391 | return (-EFAULT); | 1391 | return (-EFAULT); |
1392 | 1392 | ||
1393 | for (i = 0; i < lsm->lsm_stripe_count; i++) { | 1393 | for (i = 0; i < lsm->lsm_stripe_count; i++) { |
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pinger.c b/drivers/staging/lustre/lustre/ptlrpc/pinger.c index 227a0ae9593b..5dec771d70ee 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pinger.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pinger.c | |||
@@ -383,8 +383,8 @@ int ptlrpc_start_pinger(void) | |||
383 | 383 | ||
384 | /* CLONE_VM and CLONE_FILES just avoid a needless copy, because we | 384 | /* CLONE_VM and CLONE_FILES just avoid a needless copy, because we |
385 | * just drop the VM and FILES in cfs_daemonize_ctxt() right away. */ | 385 | * just drop the VM and FILES in cfs_daemonize_ctxt() right away. */ |
386 | rc = PTR_ERR(kthread_run(ptlrpc_pinger_main, | 386 | rc = PTR_ERR(kthread_run(ptlrpc_pinger_main, &pinger_thread, |
387 | &pinger_thread, pinger_thread.t_name)); | 387 | "%s", pinger_thread.t_name)); |
388 | if (IS_ERR_VALUE(rc)) { | 388 | if (IS_ERR_VALUE(rc)) { |
389 | CERROR("cannot start thread: %d\n", rc); | 389 | CERROR("cannot start thread: %d\n", rc); |
390 | return rc; | 390 | return rc; |
diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c index fbdeff65d059..89c9be96f454 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | |||
@@ -615,7 +615,7 @@ int ptlrpcd_start(int index, int max, const char *name, struct ptlrpcd_ctl *pc) | |||
615 | init_completion(&pc->pc_starting); | 615 | init_completion(&pc->pc_starting); |
616 | init_completion(&pc->pc_finishing); | 616 | init_completion(&pc->pc_finishing); |
617 | spin_lock_init(&pc->pc_lock); | 617 | spin_lock_init(&pc->pc_lock); |
618 | strncpy(pc->pc_name, name, sizeof(pc->pc_name) - 1); | 618 | strlcpy(pc->pc_name, name, sizeof(pc->pc_name)); |
619 | pc->pc_set = ptlrpc_prep_set(); | 619 | pc->pc_set = ptlrpc_prep_set(); |
620 | if (pc->pc_set == NULL) | 620 | if (pc->pc_set == NULL) |
621 | GOTO(out, rc = -ENOMEM); | 621 | GOTO(out, rc = -ENOMEM); |
@@ -638,7 +638,7 @@ int ptlrpcd_start(int index, int max, const char *name, struct ptlrpcd_ctl *pc) | |||
638 | GOTO(out, rc); | 638 | GOTO(out, rc); |
639 | } | 639 | } |
640 | 640 | ||
641 | task = kthread_run(ptlrpcd, pc, pc->pc_name); | 641 | task = kthread_run(ptlrpcd, pc, "%s", pc->pc_name); |
642 | if (IS_ERR(task)) | 642 | if (IS_ERR(task)) |
643 | GOTO(out, rc = PTR_ERR(task)); | 643 | GOTO(out, rc = PTR_ERR(task)); |
644 | 644 | ||
@@ -745,7 +745,7 @@ static int ptlrpcd_init(void) | |||
745 | if (ptlrpcds == NULL) | 745 | if (ptlrpcds == NULL) |
746 | GOTO(out, rc = -ENOMEM); | 746 | GOTO(out, rc = -ENOMEM); |
747 | 747 | ||
748 | snprintf(name, 15, "ptlrpcd_rcv"); | 748 | snprintf(name, sizeof(name), "ptlrpcd_rcv"); |
749 | set_bit(LIOD_RECOVERY, &ptlrpcds->pd_thread_rcv.pc_flags); | 749 | set_bit(LIOD_RECOVERY, &ptlrpcds->pd_thread_rcv.pc_flags); |
750 | rc = ptlrpcd_start(-1, nthreads, name, &ptlrpcds->pd_thread_rcv); | 750 | rc = ptlrpcd_start(-1, nthreads, name, &ptlrpcds->pd_thread_rcv); |
751 | if (rc < 0) | 751 | if (rc < 0) |
@@ -764,7 +764,7 @@ static int ptlrpcd_init(void) | |||
764 | * unnecessary dependency. But how to distribute async RPCs load | 764 | * unnecessary dependency. But how to distribute async RPCs load |
765 | * among all the ptlrpc daemons becomes another trouble. */ | 765 | * among all the ptlrpc daemons becomes another trouble. */ |
766 | for (i = 0; i < nthreads; i++) { | 766 | for (i = 0; i < nthreads; i++) { |
767 | snprintf(name, 15, "ptlrpcd_%d", i); | 767 | snprintf(name, sizeof(name), "ptlrpcd_%d", i); |
768 | rc = ptlrpcd_start(i, nthreads, name, &ptlrpcds->pd_threads[i]); | 768 | rc = ptlrpcd_start(i, nthreads, name, &ptlrpcds->pd_threads[i]); |
769 | if (rc < 0) | 769 | if (rc < 0) |
770 | GOTO(out, rc); | 770 | GOTO(out, rc); |
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c index e90c8fb7da6a..6547f46a7729 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | |||
@@ -59,8 +59,8 @@ | |||
59 | ****************************************/ | 59 | ****************************************/ |
60 | 60 | ||
61 | 61 | ||
62 | #define PTRS_PER_PAGE (PAGE_CACHE_SIZE / sizeof(void *)) | 62 | #define POINTERS_PER_PAGE (PAGE_CACHE_SIZE / sizeof(void *)) |
63 | #define PAGES_PER_POOL (PTRS_PER_PAGE) | 63 | #define PAGES_PER_POOL (POINTERS_PER_PAGE) |
64 | 64 | ||
65 | #define IDLE_IDX_MAX (100) | 65 | #define IDLE_IDX_MAX (100) |
66 | #define IDLE_IDX_WEIGHT (3) | 66 | #define IDLE_IDX_WEIGHT (3) |
diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c index ac8b5fd2300b..acf75f3873d1 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/service.c +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c | |||
@@ -2718,15 +2718,15 @@ int ptlrpc_start_thread(struct ptlrpc_service_part *svcpt, int wait) | |||
2718 | spin_unlock(&svcpt->scp_lock); | 2718 | spin_unlock(&svcpt->scp_lock); |
2719 | 2719 | ||
2720 | if (svcpt->scp_cpt >= 0) { | 2720 | if (svcpt->scp_cpt >= 0) { |
2721 | snprintf(thread->t_name, PTLRPC_THR_NAME_LEN, "%s%02d_%03d", | 2721 | snprintf(thread->t_name, sizeof(thread->t_name), "%s%02d_%03d", |
2722 | svc->srv_thread_name, svcpt->scp_cpt, thread->t_id); | 2722 | svc->srv_thread_name, svcpt->scp_cpt, thread->t_id); |
2723 | } else { | 2723 | } else { |
2724 | snprintf(thread->t_name, PTLRPC_THR_NAME_LEN, "%s_%04d", | 2724 | snprintf(thread->t_name, sizeof(thread->t_name), "%s_%04d", |
2725 | svc->srv_thread_name, thread->t_id); | 2725 | svc->srv_thread_name, thread->t_id); |
2726 | } | 2726 | } |
2727 | 2727 | ||
2728 | CDEBUG(D_RPCTRACE, "starting thread '%s'\n", thread->t_name); | 2728 | CDEBUG(D_RPCTRACE, "starting thread '%s'\n", thread->t_name); |
2729 | rc = PTR_ERR(kthread_run(ptlrpc_main, thread, thread->t_name)); | 2729 | rc = PTR_ERR(kthread_run(ptlrpc_main, thread, "%s", thread->t_name)); |
2730 | if (IS_ERR_VALUE(rc)) { | 2730 | if (IS_ERR_VALUE(rc)) { |
2731 | CERROR("cannot start thread '%s': rc %d\n", | 2731 | CERROR("cannot start thread '%s': rc %d\n", |
2732 | thread->t_name, rc); | 2732 | thread->t_name, rc); |
diff --git a/drivers/staging/octeon-usb/cvmx-usb.c b/drivers/staging/octeon-usb/cvmx-usb.c index d7b3c82b5ead..45dfe94199ae 100644 --- a/drivers/staging/octeon-usb/cvmx-usb.c +++ b/drivers/staging/octeon-usb/cvmx-usb.c | |||
@@ -604,7 +604,7 @@ int cvmx_usb_initialize(struct cvmx_usb_state *state, int usb_port_number, | |||
604 | } | 604 | } |
605 | } | 605 | } |
606 | 606 | ||
607 | memset(usb, 0, sizeof(usb)); | 607 | memset(usb, 0, sizeof(*usb)); |
608 | usb->init_flags = flags; | 608 | usb->init_flags = flags; |
609 | 609 | ||
610 | /* Initialize the USB state structure */ | 610 | /* Initialize the USB state structure */ |
diff --git a/drivers/staging/octeon/ethernet-mem.c b/drivers/staging/octeon/ethernet-mem.c index 78b6cb743769..199059d64c9b 100644 --- a/drivers/staging/octeon/ethernet-mem.c +++ b/drivers/staging/octeon/ethernet-mem.c | |||
@@ -48,13 +48,8 @@ static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements) | |||
48 | while (freed) { | 48 | while (freed) { |
49 | 49 | ||
50 | struct sk_buff *skb = dev_alloc_skb(size + 256); | 50 | struct sk_buff *skb = dev_alloc_skb(size + 256); |
51 | if (unlikely(skb == NULL)) { | 51 | if (unlikely(skb == NULL)) |
52 | pr_warning | ||
53 | ("Failed to allocate skb for hardware pool %d\n", | ||
54 | pool); | ||
55 | break; | 52 | break; |
56 | } | ||
57 | |||
58 | skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f)); | 53 | skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f)); |
59 | *(struct sk_buff **)(skb->data - sizeof(void *)) = skb; | 54 | *(struct sk_buff **)(skb->data - sizeof(void *)) = skb; |
60 | cvmx_fpa_free(skb->data, pool, DONT_WRITEBACK(size / 128)); | 55 | cvmx_fpa_free(skb->data, pool, DONT_WRITEBACK(size / 128)); |
diff --git a/drivers/staging/octeon/ethernet-rgmii.c b/drivers/staging/octeon/ethernet-rgmii.c index d8f5f694ec35..ea53af30dfa7 100644 --- a/drivers/staging/octeon/ethernet-rgmii.c +++ b/drivers/staging/octeon/ethernet-rgmii.c | |||
@@ -373,9 +373,7 @@ int cvm_oct_rgmii_init(struct net_device *dev) | |||
373 | * Enable interrupts on inband status changes | 373 | * Enable interrupts on inband status changes |
374 | * for this port. | 374 | * for this port. |
375 | */ | 375 | */ |
376 | gmx_rx_int_en.u64 = | 376 | gmx_rx_int_en.u64 = 0; |
377 | cvmx_read_csr(CVMX_GMXX_RXX_INT_EN | ||
378 | (index, interface)); | ||
379 | gmx_rx_int_en.s.phy_dupx = 1; | 377 | gmx_rx_int_en.s.phy_dupx = 1; |
380 | gmx_rx_int_en.s.phy_link = 1; | 378 | gmx_rx_int_en.s.phy_link = 1; |
381 | gmx_rx_int_en.s.phy_spd = 1; | 379 | gmx_rx_int_en.s.phy_spd = 1; |
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index 34afc16bc493..e14a1bb04361 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c | |||
@@ -303,6 +303,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) | |||
303 | if (backlog > budget * cores_in_use && napi != NULL) | 303 | if (backlog > budget * cores_in_use && napi != NULL) |
304 | cvm_oct_enable_one_cpu(); | 304 | cvm_oct_enable_one_cpu(); |
305 | } | 305 | } |
306 | rx_count++; | ||
306 | 307 | ||
307 | skb_in_hw = USE_SKBUFFS_IN_HW && work->word2.s.bufs == 1; | 308 | skb_in_hw = USE_SKBUFFS_IN_HW && work->word2.s.bufs == 1; |
308 | if (likely(skb_in_hw)) { | 309 | if (likely(skb_in_hw)) { |
@@ -336,9 +337,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) | |||
336 | */ | 337 | */ |
337 | skb = dev_alloc_skb(work->len); | 338 | skb = dev_alloc_skb(work->len); |
338 | if (!skb) { | 339 | if (!skb) { |
339 | printk_ratelimited("Port %d failed to allocate " | ||
340 | "skbuff, packet dropped\n", | ||
341 | work->ipprt); | ||
342 | cvm_oct_free_work(work); | 340 | cvm_oct_free_work(work); |
343 | continue; | 341 | continue; |
344 | } | 342 | } |
@@ -429,7 +427,6 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) | |||
429 | #endif | 427 | #endif |
430 | } | 428 | } |
431 | netif_receive_skb(skb); | 429 | netif_receive_skb(skb); |
432 | rx_count++; | ||
433 | } else { | 430 | } else { |
434 | /* Drop any packet received for a device that isn't up */ | 431 | /* Drop any packet received for a device that isn't up */ |
435 | /* | 432 | /* |
diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index 3605c5da822d..6fc77428e83a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c | |||
@@ -157,8 +157,8 @@ _func_enter_; | |||
157 | 157 | ||
158 | *frlen = *frlen + (len + 2); | 158 | *frlen = *frlen + (len + 2); |
159 | 159 | ||
160 | return pbuf + len + 2; | ||
161 | _func_exit_; | 160 | _func_exit_; |
161 | return pbuf + len + 2; | ||
162 | } | 162 | } |
163 | 163 | ||
164 | inline u8 *rtw_set_ie_ch_switch (u8 *buf, u32 *buf_len, u8 ch_switch_mode, | 164 | inline u8 *rtw_set_ie_ch_switch (u8 *buf, u32 *buf_len, u8 ch_switch_mode, |
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 8b2ba26ba38d..4b2eb8e9b562 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | |||
@@ -1827,13 +1827,13 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra | |||
1827 | 1827 | ||
1828 | #ifdef CONFIG_88EU_P2P | 1828 | #ifdef CONFIG_88EU_P2P |
1829 | 1829 | ||
1830 | static int get_reg_classes_full_count(struct p2p_channels channel_list) | 1830 | static int get_reg_classes_full_count(struct p2p_channels *channel_list) |
1831 | { | 1831 | { |
1832 | int cnt = 0; | 1832 | int cnt = 0; |
1833 | int i; | 1833 | int i; |
1834 | 1834 | ||
1835 | for (i = 0; i < channel_list.reg_classes; i++) { | 1835 | for (i = 0; i < channel_list->reg_classes; i++) { |
1836 | cnt += channel_list.reg_class[i].channels; | 1836 | cnt += channel_list->reg_class[i].channels; |
1837 | } | 1837 | } |
1838 | 1838 | ||
1839 | return cnt; | 1839 | return cnt; |
@@ -2065,7 +2065,7 @@ void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr) | |||
2065 | /* + number of channels in all classes */ | 2065 | /* + number of channels in all classes */ |
2066 | len_channellist_attr = 3 | 2066 | len_channellist_attr = 3 |
2067 | + (1 + 1) * (u16)(pmlmeext->channel_list.reg_classes) | 2067 | + (1 + 1) * (u16)(pmlmeext->channel_list.reg_classes) |
2068 | + get_reg_classes_full_count(pmlmeext->channel_list); | 2068 | + get_reg_classes_full_count(&pmlmeext->channel_list); |
2069 | 2069 | ||
2070 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); | 2070 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); |
2071 | p2pielen += 2; | 2071 | p2pielen += 2; |
@@ -2437,7 +2437,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame | |||
2437 | /* + number of channels in all classes */ | 2437 | /* + number of channels in all classes */ |
2438 | len_channellist_attr = 3 | 2438 | len_channellist_attr = 3 |
2439 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes | 2439 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes |
2440 | + get_reg_classes_full_count(pmlmeext->channel_list); | 2440 | + get_reg_classes_full_count(&pmlmeext->channel_list); |
2441 | 2441 | ||
2442 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); | 2442 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); |
2443 | 2443 | ||
@@ -2859,7 +2859,7 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr) | |||
2859 | /* + number of channels in all classes */ | 2859 | /* + number of channels in all classes */ |
2860 | len_channellist_attr = 3 | 2860 | len_channellist_attr = 3 |
2861 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes | 2861 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes |
2862 | + get_reg_classes_full_count(pmlmeext->channel_list); | 2862 | + get_reg_classes_full_count(&pmlmeext->channel_list); |
2863 | 2863 | ||
2864 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); | 2864 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); |
2865 | 2865 | ||
@@ -3120,7 +3120,7 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo | |||
3120 | /* + number of channels in all classes */ | 3120 | /* + number of channels in all classes */ |
3121 | len_channellist_attr = 3 | 3121 | len_channellist_attr = 3 |
3122 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes | 3122 | + (1 + 1) * (u16)pmlmeext->channel_list.reg_classes |
3123 | + get_reg_classes_full_count(pmlmeext->channel_list); | 3123 | + get_reg_classes_full_count(&pmlmeext->channel_list); |
3124 | 3124 | ||
3125 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); | 3125 | *(__le16 *)(p2pie + p2pielen) = cpu_to_le16(len_channellist_attr); |
3126 | p2pielen += 2; | 3126 | p2pielen += 2; |
diff --git a/drivers/staging/rtl8188eu/core/rtw_mp.c b/drivers/staging/rtl8188eu/core/rtw_mp.c index c7ff2e4d1f23..9832dcbbd07f 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mp.c +++ b/drivers/staging/rtl8188eu/core/rtw_mp.c | |||
@@ -907,7 +907,7 @@ u32 mp_query_psd(struct adapter *pAdapter, u8 *data) | |||
907 | sscanf(data, "pts =%d, start =%d, stop =%d", &psd_pts, &psd_start, &psd_stop); | 907 | sscanf(data, "pts =%d, start =%d, stop =%d", &psd_pts, &psd_start, &psd_stop); |
908 | } | 908 | } |
909 | 909 | ||
910 | _rtw_memset(data, '\0', sizeof(data)); | 910 | _rtw_memset(data, '\0', sizeof(*data)); |
911 | 911 | ||
912 | i = psd_start; | 912 | i = psd_start; |
913 | while (i < psd_stop) { | 913 | while (i < psd_stop) { |
diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c index 013ea487e7ac..8018edd3d42e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c | |||
@@ -631,7 +631,7 @@ void WMMOnAssocRsp(struct adapter *padapter) | |||
631 | inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3; | 631 | inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3; |
632 | 632 | ||
633 | if (pregpriv->wifi_spec == 1) { | 633 | if (pregpriv->wifi_spec == 1) { |
634 | u32 j, tmp, change_inx; | 634 | u32 j, tmp, change_inx = false; |
635 | 635 | ||
636 | /* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */ | 636 | /* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */ |
637 | for (i = 0; i < 4; i++) { | 637 | for (i = 0; i < 4; i++) { |
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c index 9c2e7a20c09e..ec0028d4e61a 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | |||
@@ -57,7 +57,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter) | |||
57 | u8 cut_ver, fab_ver; | 57 | u8 cut_ver, fab_ver; |
58 | 58 | ||
59 | /* Init Value */ | 59 | /* Init Value */ |
60 | _rtw_memset(dm_odm, 0, sizeof(dm_odm)); | 60 | _rtw_memset(dm_odm, 0, sizeof(*dm_odm)); |
61 | 61 | ||
62 | dm_odm->Adapter = Adapter; | 62 | dm_odm->Adapter = Adapter; |
63 | 63 | ||
diff --git a/drivers/staging/rtl8188eu/include/odm.h b/drivers/staging/rtl8188eu/include/odm.h index 2bfe72841921..4787bacdcad8 100644 --- a/drivers/staging/rtl8188eu/include/odm.h +++ b/drivers/staging/rtl8188eu/include/odm.h | |||
@@ -1010,7 +1010,7 @@ enum dm_dig_op { | |||
1010 | #define DM_false_ALARM_THRESH_LOW 400 | 1010 | #define DM_false_ALARM_THRESH_LOW 400 |
1011 | #define DM_false_ALARM_THRESH_HIGH 1000 | 1011 | #define DM_false_ALARM_THRESH_HIGH 1000 |
1012 | 1012 | ||
1013 | #define DM_DIG_MAX_NIC 0x3e | 1013 | #define DM_DIG_MAX_NIC 0x4e |
1014 | #define DM_DIG_MIN_NIC 0x1e /* 0x22/0x1c */ | 1014 | #define DM_DIG_MIN_NIC 0x1e /* 0x22/0x1c */ |
1015 | 1015 | ||
1016 | #define DM_DIG_MAX_AP 0x32 | 1016 | #define DM_DIG_MAX_AP 0x32 |
diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h index 52b280165a92..555c801d2ded 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h | |||
@@ -188,7 +188,7 @@ enum ChannelPlan { | |||
188 | 188 | ||
189 | struct txpowerinfo24g { | 189 | struct txpowerinfo24g { |
190 | u8 IndexCCK_Base[MAX_RF_PATH][MAX_CHNL_GROUP_24G]; | 190 | u8 IndexCCK_Base[MAX_RF_PATH][MAX_CHNL_GROUP_24G]; |
191 | u8 IndexBW40_Base[MAX_RF_PATH][MAX_CHNL_GROUP_24G-1]; | 191 | u8 IndexBW40_Base[MAX_RF_PATH][MAX_CHNL_GROUP_24G]; |
192 | /* If only one tx, only BW20 and OFDM are used. */ | 192 | /* If only one tx, only BW20 and OFDM are used. */ |
193 | s8 CCK_Diff[MAX_RF_PATH][MAX_TX_COUNT]; | 193 | s8 CCK_Diff[MAX_RF_PATH][MAX_TX_COUNT]; |
194 | s8 OFDM_Diff[MAX_RF_PATH][MAX_TX_COUNT]; | 194 | s8 OFDM_Diff[MAX_RF_PATH][MAX_TX_COUNT]; |
diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h index a96b018e5e6a..853ab80a2b86 100644 --- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | |||
@@ -870,6 +870,7 @@ static struct fwevent wlanevents[] = { | |||
870 | {0, NULL}, | 870 | {0, NULL}, |
871 | {0, NULL}, | 871 | {0, NULL}, |
872 | {0, &rtw_cpwm_event_callback}, | 872 | {0, &rtw_cpwm_event_callback}, |
873 | {0, NULL}, | ||
873 | }; | 874 | }; |
874 | 875 | ||
875 | #endif/* _RTL_MLME_EXT_C_ */ | 876 | #endif/* _RTL_MLME_EXT_C_ */ |
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index cd4100fb3645..95953ebc0279 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | |||
@@ -6973,7 +6973,7 @@ static int rtw_mp_ctx(struct net_device *dev, | |||
6973 | stop = strncmp(extra, "stop", 4); | 6973 | stop = strncmp(extra, "stop", 4); |
6974 | sscanf(extra, "count =%d, pkt", &count); | 6974 | sscanf(extra, "count =%d, pkt", &count); |
6975 | 6975 | ||
6976 | _rtw_memset(extra, '\0', sizeof(extra)); | 6976 | _rtw_memset(extra, '\0', sizeof(*extra)); |
6977 | 6977 | ||
6978 | if (stop == 0) { | 6978 | if (stop == 0) { |
6979 | bStartTest = 0; /* To set Stop */ | 6979 | bStartTest = 0; /* To set Stop */ |
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index d3078d200e50..9ca3180ebaa0 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c | |||
@@ -54,6 +54,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = { | |||
54 | /*=== Customer ID ===*/ | 54 | /*=== Customer ID ===*/ |
55 | /****** 8188EUS ********/ | 55 | /****** 8188EUS ********/ |
56 | {USB_DEVICE(0x8179, 0x07B8)}, /* Abocom - Abocom */ | 56 | {USB_DEVICE(0x8179, 0x07B8)}, /* Abocom - Abocom */ |
57 | {USB_DEVICE(0x2001, 0x330F)}, /* DLink DWA-125 REV D1 */ | ||
57 | {} /* Terminating entry */ | 58 | {} /* Terminating entry */ |
58 | }; | 59 | }; |
59 | 60 | ||
diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c index 5bc361b16d4c..56144014b7c9 100644 --- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c +++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c | |||
@@ -37,6 +37,8 @@ rt_status SendTxCommandPacket(struct net_device *dev, void *pData, u32 DataLen) | |||
37 | /* Get TCB and local buffer from common pool. | 37 | /* Get TCB and local buffer from common pool. |
38 | (It is shared by CmdQ, MgntQ, and USB coalesce DataQ) */ | 38 | (It is shared by CmdQ, MgntQ, and USB coalesce DataQ) */ |
39 | skb = dev_alloc_skb(USB_HWDESC_HEADER_LEN + DataLen + 4); | 39 | skb = dev_alloc_skb(USB_HWDESC_HEADER_LEN + DataLen + 4); |
40 | if (!skb) | ||
41 | return RT_STATUS_FAILURE; | ||
40 | memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev)); | 42 | memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev)); |
41 | tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); | 43 | tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); |
42 | tcb_desc->queue_index = TXCMD_QUEUE; | 44 | tcb_desc->queue_index = TXCMD_QUEUE; |
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index dbf11ecb794e..19d3cf451b88 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c | |||
@@ -172,8 +172,8 @@ static u16 swGetOFDMControlRate(struct vnt_private *pDevice, u16 wRateIdx) | |||
172 | if (!CARDbIsOFDMinBasicRate(pDevice)) { | 172 | if (!CARDbIsOFDMinBasicRate(pDevice)) { |
173 | DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO | 173 | DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO |
174 | "swGetOFDMControlRate:(NO OFDM) %d\n", wRateIdx); | 174 | "swGetOFDMControlRate:(NO OFDM) %d\n", wRateIdx); |
175 | if (wRateIdx > RATE_24M) | 175 | if (wRateIdx > RATE_24M) |
176 | wRateIdx = RATE_24M; | 176 | wRateIdx = RATE_24M; |
177 | return wRateIdx; | 177 | return wRateIdx; |
178 | } | 178 | } |
179 | 179 | ||
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index d0cf7d8a20e5..8872e0f84f40 100644 --- a/drivers/staging/vt6656/iwctl.c +++ b/drivers/staging/vt6656/iwctl.c | |||
@@ -1634,6 +1634,9 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info, | |||
1634 | if (pMgmt == NULL) | 1634 | if (pMgmt == NULL) |
1635 | return -EFAULT; | 1635 | return -EFAULT; |
1636 | 1636 | ||
1637 | if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) | ||
1638 | return -ENODEV; | ||
1639 | |||
1637 | buf = kzalloc(sizeof(struct viawget_wpa_param), GFP_KERNEL); | 1640 | buf = kzalloc(sizeof(struct viawget_wpa_param), GFP_KERNEL); |
1638 | if (buf == NULL) | 1641 | if (buf == NULL) |
1639 | return -ENOMEM; | 1642 | return -ENOMEM; |
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 536971786ae8..6f9d28182445 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c | |||
@@ -1098,6 +1098,8 @@ static int device_close(struct net_device *dev) | |||
1098 | memset(pMgmt->abyCurrBSSID, 0, 6); | 1098 | memset(pMgmt->abyCurrBSSID, 0, 6); |
1099 | pMgmt->eCurrState = WMAC_STATE_IDLE; | 1099 | pMgmt->eCurrState = WMAC_STATE_IDLE; |
1100 | 1100 | ||
1101 | pDevice->flags &= ~DEVICE_FLAGS_OPENED; | ||
1102 | |||
1101 | device_free_tx_bufs(pDevice); | 1103 | device_free_tx_bufs(pDevice); |
1102 | device_free_rx_bufs(pDevice); | 1104 | device_free_rx_bufs(pDevice); |
1103 | device_free_int_bufs(pDevice); | 1105 | device_free_int_bufs(pDevice); |
@@ -1109,7 +1111,6 @@ static int device_close(struct net_device *dev) | |||
1109 | usb_free_urb(pDevice->pInterruptURB); | 1111 | usb_free_urb(pDevice->pInterruptURB); |
1110 | 1112 | ||
1111 | BSSvClearNodeDBTable(pDevice, 0); | 1113 | BSSvClearNodeDBTable(pDevice, 0); |
1112 | pDevice->flags &=(~DEVICE_FLAGS_OPENED); | ||
1113 | 1114 | ||
1114 | DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_close2 \n"); | 1115 | DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_close2 \n"); |
1115 | 1116 | ||
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index fb743a8811bb..14f3e852215d 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c | |||
@@ -148,6 +148,8 @@ static void *s_vGetFreeContext(struct vnt_private *pDevice) | |||
148 | DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n"); | 148 | DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n"); |
149 | 149 | ||
150 | for (ii = 0; ii < pDevice->cbTD; ii++) { | 150 | for (ii = 0; ii < pDevice->cbTD; ii++) { |
151 | if (!pDevice->apTD[ii]) | ||
152 | return NULL; | ||
151 | pContext = pDevice->apTD[ii]; | 153 | pContext = pDevice->apTD[ii]; |
152 | if (pContext->bBoolInUse == false) { | 154 | if (pContext->bBoolInUse == false) { |
153 | pContext->bBoolInUse = true; | 155 | pContext->bBoolInUse = true; |
diff --git a/drivers/staging/xillybus/xillybus_core.c b/drivers/staging/xillybus/xillybus_core.c index efc56987a60b..7db6f03a0054 100644 --- a/drivers/staging/xillybus/xillybus_core.c +++ b/drivers/staging/xillybus/xillybus_core.c | |||
@@ -2054,7 +2054,7 @@ static int xillybus_init_chrdev(struct xilly_endpoint *endpoint, | |||
2054 | NULL, | 2054 | NULL, |
2055 | MKDEV(major, i), | 2055 | MKDEV(major, i), |
2056 | NULL, | 2056 | NULL, |
2057 | devname); | 2057 | "%s", devname); |
2058 | 2058 | ||
2059 | if (IS_ERR(device)) { | 2059 | if (IS_ERR(device)) { |
2060 | pr_warn("xillybus: Failed to create %s " | 2060 | pr_warn("xillybus: Failed to create %s " |
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 91d94b564433..2c4ed52ca849 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c | |||
@@ -981,4 +981,3 @@ MODULE_PARM_DESC(num_devices, "Number of zram devices"); | |||
981 | MODULE_LICENSE("Dual BSD/GPL"); | 981 | MODULE_LICENSE("Dual BSD/GPL"); |
982 | MODULE_AUTHOR("Nitin Gupta <ngupta@vflare.org>"); | 982 | MODULE_AUTHOR("Nitin Gupta <ngupta@vflare.org>"); |
983 | MODULE_DESCRIPTION("Compressed RAM Block Device"); | 983 | MODULE_DESCRIPTION("Compressed RAM Block Device"); |
984 | MODULE_ALIAS("devname:zram"); | ||