summaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2020-10-15Merge tag 'staging-5.10-rc1' of ↵Linus Torvalds199-5187/+4875
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging / IIO driver updates from Greg KH: "Here is the large set of staging and IIO driver updates for 5.10-rc1. Included in here are: - new IIO drivers - new IIO driver frameworks - various IIO driver fixes and updates - IIO device tree conversions to yaml - so many minor staging driver coding style cleanups - most cdev driver moved out of staging - no staging drivers added or removed Full details are in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (476 commits) staging: comedi: check validity of wMaxPacketSize of usb endpoints found staging: wfx: improve robustness of wfx_get_hw_rate() staging: wfx: drop unicode characters from strings staging: wfx: gpiod_get_value() can return an error staging: wfx: increase robustness of hif_generic_confirm() staging: wfx: wfx_init_common() returns NULL on error staging: wfx: standardize the error when vif does not exist staging: wfx: check memory allocation staging: wfx: improve error handling of hif_join() staging: dpaa2-switch: add a dpaa2_switch prefix to all functions in ethsw.c staging: dpaa2-switch: add a dpaa2_switch_ prefix to all functions in ethsw-ethtool.c staging: rtl8188eu: Fix long lines dt-bindings: staging: wfx: silabs,wfx yaml conversion staging: wfx: update copyrights dates staging: wfx: fix QoS priority for slow buses staging: wfx: fix BA sessions for older firmwares staging: wfx: remove remaining code of 'secure link' feature staging: wfx: fix handling of MMIC error staging: vchiq: Fix list_for_each exit tests staging: greybus: use __force when assigning __u8 value to snd_ctl_elem_type_t ...
2020-10-14Merge tag 'spdx-5.10-rc1' of ↵Linus Torvalds2-3/+2
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx Pull SPDX updates from Greg KH: "Here are some SPDX-specific changes for 5.10-rc1. They include: - driver fixes to make spdxcheck.pl work properly - add GFDL licenses as "deprecated" but required due to some of our documentation using them - add Zlib license as "deprecated" but required because we have code with this license in the tree. - convert some drivers to have SPDX identifiers that previously didn't have them. All have been in linux-next for a very long time with no reported issues" * tag 'spdx-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: scripts/spdxcheck.py: handle license identifiers in XML comments net/mlx5: IPsec: make spdxcheck.py happy LICENSES/deprecated: add Zlib license text LICENSE: add GFDL deprecated licenses net/qla3xxx: Convert to SPDX license identifiers net/qlge: Convert to SPDX license identifiers net/qlcnic: Convert to SPDX license identifiers scsi/qla2xxx: Convert to SPDX license identifiers scsi/qla4xxx: Convert to SPDX license identifiers
2020-10-13Merge tag 'media/v5.10-1' of ↵Linus Torvalds162-10150/+10745
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - the usbvision driver was dropped from staging - the Zoran driver were re-added at staging. It gained lots of improvements, and was converted to use videobuf2 API - a new virtual driver (vidtv) was added in order to allow testing the digital TV framework and APIs - the media uAPI documentation gained a glossary with commonly used terms, helping to simplify some parts of the docs - more cleanups at the atomisp driver - Mediatek VPU gained support for MT8183 - added support for codecs with supports doing colorspace conversion (CSC) - support for CSC API was added at vivid and rksip1 drivers - added a helper core support and uAPI for better supporting H.264 codecs - added support for Renesas R8A774E1 - use the new SPDX GFDL-1.1-no-invariants-or-later license on media uAPI docs, instead of a license text - Venus driver has gained VP9 codec support - lots of other cleanups and driver improvements * tag 'media/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (555 commits) media: dvb-frontends/drxk_hard.c: fix uninitialized variable warning media: tvp7002: fix uninitialized variable warning media: s5k5baf: drop 'data' field in struct s5k5baf_fw media: dt-bindings: media: venus: Add an optional power domain for perf voting media: rcar-vin: rcar-dma: Fix setting VNIS_REG for RAW8 formats media: staging: rkisp1: uapi: Do not use BIT() macro media: v4l2-mem2mem: Fix spurious v4l2_m2m_buf_done media: usbtv: Fix refcounting mixup media: zoran.rst: place it at the right place this time media: add Zoran cardlist media: admin-guide: update cardlists media: siano: rename a duplicated card string media: zoran: move documentation file to the right place media: atomisp: fixes build breakage for ISP2400 due to a cleanup media: zoran: fix mixed case on vars media: zoran: get rid of an unused var media: zoran: use upper case for card types media: zoran: fix sparse warnings media: zoran: fix smatch warning media: zoran: update TODO ...
2020-10-13Merge branch 'linus' of ↵Linus Torvalds6-237/+55
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Allow DRBG testing through user-space af_alg - Add tcrypt speed testing support for keyed hashes - Add type-safe init/exit hooks for ahash Algorithms: - Mark arc4 as obsolete and pending for future removal - Mark anubis, khazad, sead and tea as obsolete - Improve boot-time xor benchmark - Add OSCCA SM2 asymmetric cipher algorithm and use it for integrity Drivers: - Fixes and enhancement for XTS in caam - Add support for XIP8001B hwrng in xiphera-trng - Add RNG and hash support in sun8i-ce/sun8i-ss - Allow imx-rngc to be used by kernel entropy pool - Use crypto engine in omap-sham - Add support for Ingenic X1830 with ingenic" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (205 commits) X.509: Fix modular build of public_key_sm2 crypto: xor - Remove unused variable count in do_xor_speed X.509: fix error return value on the failed path crypto: bcm - Verify GCM/CCM key length in setkey crypto: qat - drop input parameter from adf_enable_aer() crypto: qat - fix function parameters descriptions crypto: atmel-tdes - use semicolons rather than commas to separate statements crypto: drivers - use semicolons rather than commas to separate statements hwrng: mxc-rnga - use semicolons rather than commas to separate statements hwrng: iproc-rng200 - use semicolons rather than commas to separate statements hwrng: stm32 - use semicolons rather than commas to separate statements crypto: xor - use ktime for template benchmarking crypto: xor - defer load time benchmark to a later time crypto: hisilicon/zip - fix the uninitalized 'curr_qm_qp_num' crypto: hisilicon/zip - fix the return value when device is busy crypto: hisilicon/zip - fix zero length input in GZIP decompress crypto: hisilicon/zip - fix the uncleared debug registers lib/mpi: Fix unused variable warnings crypto: x86/poly1305 - Remove assignments with no effect hwrng: npcm - modify readl to readb ...
2020-10-10staging: comedi: check validity of wMaxPacketSize of usb endpoints foundAnant Thazhemadam1-0/+3
While finding usb endpoints in vmk80xx_find_usb_endpoints(), check if wMaxPacketSize = 0 for the endpoints found. Some devices have isochronous endpoints that have wMaxPacketSize = 0 (as required by the USB-2 spec). However, since this doesn't apply here, wMaxPacketSize = 0 can be considered to be invalid. Reported-by: syzbot+009f546aa1370056b1c2@syzkaller.appspotmail.com Tested-by: syzbot+009f546aa1370056b1c2@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201010082933.5417-1-anant.thazhemadam@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10staging: wfx: improve robustness of wfx_get_hw_rate()Jérôme Pouiller1-0/+4
Smatch complains: data_tx.c:37 wfx_get_hw_rate() warn: constraint '(struct ieee80211_supported_band)->bitrates' overflow 'band->bitrates' 0 <= abs_rl '0-127' user_rl '' required = '(struct ieee80211_supported_band)->n_bitrates' 23 struct ieee80211_supported_band *band; 24 25 if (rate->idx < 0) 26 return -1; 27 if (rate->flags & IEEE80211_TX_RC_MCS) { 28 if (rate->idx > 7) { 29 WARN(1, "wrong rate->idx value: %d", rate->idx); 30 return -1; 31 } 32 return rate->idx + 14; 33 } 34 // WFx only support 2GHz, else band information should be retrieved 35 // from ieee80211_tx_info 36 band = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; 37 return band->bitrates[rate->idx].hw_value; Add a simple check to make Smatch happy. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201009171307.864608-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10staging: wfx: drop unicode characters from stringsJérôme Pouiller1-1/+1
Smatch complains: hif_rx.c:235 hif_generic_indication() warn: format string contains non-ascii character '\xc2' hif_rx.c:235 hif_generic_indication() warn: format string contains non-ascii character '\xb0' 234 if (!wfx_api_older_than(wdev, 1, 4)) 235 dev_info(wdev->dev, "Rx test ongoing. Temperature: %d°C\n", ^ 236 body->data.rx_stats.current_temp); So, replace the unicode character. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201009171307.864608-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10staging: wfx: gpiod_get_value() can return an errorJérôme Pouiller2-3/+3
Smatch complains: hif_rx.c:98 hif_wakeup_indication() warn: 'gpiod_get_value(wdev->pdata.gpio_wakeup)' returns positive and negative bh.c:24 device_wakeup() warn: 'gpiod_get_value_cansleep(wdev->pdata.gpio_wakeup)' returns positive and negative Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201009171307.864608-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10staging: wfx: increase robustness of hif_generic_confirm()Jérôme Pouiller1-2/+2
Smatch complains: drivers/staging/wfx/hif_rx.c:26 hif_generic_confirm() warn: negative user subtract: 0-u16max - 4 20 static int hif_generic_confirm(struct wfx_dev *wdev, 21 const struct hif_msg *hif, const void *buf) 22 { 23 // All confirm messages start with status 24 int status = le32_to_cpup((__le32 *)buf); 25 int cmd = hif->id; 26 int len = le16_to_cpu(hif->len) - 4; // drop header ^^^^^ 27 28 WARN(!mutex_is_locked(&wdev->hif_cmd.lock), "data locking error"); In fact, rx_helper() already make the necessary checks on the value of hif->len. Never mind, add an explicit check to make Smatch happy. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201009171307.864608-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10staging: wfx: wfx_init_common() returns NULL on errorJérôme Pouiller1-1/+1
Smatch complains: bus_spi.c:228 wfx_spi_probe() warn: 'bus->core' could be an error pointer bus_sdio.c:221 wfx_sdio_probe() warn: 'bus->core' could be an error pointer bus->core contains the result of wfx_init_common(). With this patch, wfx_init_common() returns a valid pointer or NULL. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201009171307.864608-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10staging: wfx: standardize the error when vif does not existJérôme Pouiller3-11/+32
Smatch complains: drivers/staging/wfx/hif_rx.c:177 hif_scan_complete_indication() warn: potential NULL parameter dereference 'wvif' drivers/staging/wfx/data_tx.c:576 wfx_flush() warn: potential NULL parameter dereference 'wvif' Indeed, if the vif id returned by the device does not exist anymore, wdev_to_wvif() could return NULL. In add, the error is not handled uniformly in the code, sometime a WARN() is displayed but code continue, sometime a dev_warn() is displayed, sometime it is just not tested, ... This patch standardize that. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201009171307.864608-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10staging: wfx: check memory allocationJérôme Pouiller1-1/+7
Smatch complains: main.c:228 wfx_send_pdata_pds() warn: potential NULL parameter dereference 'tmp_buf' 227 tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL); 228 ret = wfx_send_pds(wdev, tmp_buf, pds->size); ^^^^^^^ 229 kfree(tmp_buf); Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201009171307.864608-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10staging: wfx: improve error handling of hif_join()Jérôme Pouiller1-1/+3
Smatch complains: hif_tx.c:319 hif_join() error: we previously assumed 'channel' could be null (see line 315) 311 if (!hif) 312 return -ENOMEM; 313 body->infrastructure_bss_mode = !conf->ibss_joined; 314 body->short_preamble = conf->use_short_preamble; 315 if (channel && channel->flags & IEEE80211_CHAN_NO_IR) ^^^^^^^ 316 body->probe_for_join = 0; 317 else 318 body->probe_for_join = 1; 319 body->channel_number = channel->hw_value; ^^^^^^^^^^^^^^^^^ 320 body->beacon_interval = cpu_to_le32(conf->beacon_int); 321 body->basic_rate_set = Indeed, channel can't be NULL (else I would have seen plenty of Ooops this past year). This patch explicitly claims this restriction. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201009171307.864608-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10staging: dpaa2-switch: add a dpaa2_switch prefix to all functions in ethsw.cIoana Ciornei1-220/+219
Some static functions in the dpaa2-switch driver don't have a distinct prefix and this is becoming an inconvenience when looking at, for example, a perf top output and trying to determine easily which entries are dpaa2 switch related. Ammend this by adding the prefix to all the functions. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/20201009153000.14550-3-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-10staging: dpaa2-switch: add a dpaa2_switch_ prefix to all functions in ↵Ioana Ciornei3-29/+30
ethsw-ethtool.c Some static functions in the dpaa2-switch driver don't have a distinct prefix and this is becoming an inconvenience when looking at, for example, a perf top output and trying to determine easily which entries are dpaa2 switch related. Ammend this by adding the prefix to all the functions. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Link: https://lore.kernel.org/r/20201009153000.14550-2-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-09staging: rtl8188eu: Fix long linesFan Fei1-23/+51
This patch fix long lines found by checkpatch. Signed-off-by: Fan Fei <ffclaire1224@gmail.com> Link: https://lore.kernel.org/r/20201008185524.brl467kucslxoxci@ubuntu-T470 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-08media: staging: rkisp1: uapi: Do not use BIT() macroNiklas Söderlund1-22/+22
The BIT() macro is not available to uAPI headers, replace the few usages of it by open coding it. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Acked-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-07dt-bindings: staging: wfx: silabs,wfx yaml conversionJérôme Pouiller2-96/+125
The device can be connected on SPI or on SDIO. The original file described the two options separately. So, most of the file had to be rewritten in order to match with the Yaml requirements. Some device requirements are still written in the comments since they cannot been expressed with the current scheme (e.g. reg must be set to 1 with SDIO, interrupt is mandatory with SPI, reset-gpio in SPI is replaced by mmc-pwrseq in SDIO, etc...). The examples provided have also been reworked in order to make dt_binding_check happy. Finally, also fix typo in the name of the file (siliabs instead of silabs) Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201007101943.749898-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-07staging: wfx: update copyrights datesJérôme Pouiller33-33/+33
Most of the files have been modified in 2020, so update the copyright notices. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201007101943.749898-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-07staging: wfx: fix QoS priority for slow busesJérôme Pouiller2-2/+13
The device is in charge of respecting the QoS constraints. The driver have to ensure that all the queues contain data and the device choose the right queue to send. The things starts to be more difficult when the bandwidth of the bus is lower than the bandwidth of the WiFi. The device quickly sends the frames of the highest priority queue. Then, it starts to send frames from a lower priority queue. Though, there are still some high priority frames waiting in the driver. To work around this problem, this patch add some priorities to each queue. The weigh of the queue was (roughly) calculated experimentally by checking the speed ratio of each queue when the bus does not limit the traffic: - Be/Bk -> 20Mbps/10Mbps - Vi/Be -> 36Mbps/180Kbps - Vo/Be -> 35Mbps/600Kbps - Vi/Vo -> 24Mbps/12Mbps So, if we fix the weigh of the Background to 1, the weight of Best Effort should be 2. The weight of Video should be 116. However, since there is only 32 queues, it make no sense to use a value greater than 64[1]. And finally, the weight of the Voice is set to 128. [1] Because of this approximation, with very slow bus, we can still observe frame starvation when we measure the speed ratio of Vi/Be. It is around 35Mbps/1Mbps (instead of 36Mbps/180Kbps). However, it is still in accepted error range. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201007101943.749898-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-07staging: wfx: fix BA sessions for older firmwaresJérôme Pouiller1-0/+3
Firmwares with API < 3.6 do not forward DELBA requests. Thus, when a Block Ack session is restarted, the reordering buffer is not flushed and the received sequence number is not contiguous. Therefore, mac80211 starts to wait some missing frames that it will never receive. This patch disables the reordering buffer for old firmware. It is harmless when the network is unencrypted. When the network is encrypted, the non-contiguous frames will be thrown away by the TKIP/CCMP replay protection. So, the user will observe some packet loss with UDP and performance drop with TCP. Fixes: e5da5fbd7741 ("staging: wfx: fix CCMP/TKIP replay protection") Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201007101943.749898-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-07staging: wfx: remove remaining code of 'secure link' featureJérôme Pouiller2-19/+0
Commit e8d607ce0c81 ("staging: wfx: drop 'secure link' feature") had removed the 'secure link' feature. However, a few lines of codes were yet here. Fixes: e8d607ce0c81 ("staging: wfx: drop 'secure link' feature") Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201007101943.749898-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-07staging: wfx: fix handling of MMIC errorJérôme Pouiller1-1/+1
As expected, when the device detect a MMIC error, it returns a specific status. However, it also strip IV from the frame (don't ask me why). So, with the current code, mac80211 detects a corrupted frame and it drops it before it handle the MMIC error. The expected behavior would be to detect MMIC error then to renegotiate the EAP session. So, this patch correctly informs mac80211 that IV is not available. So, mac80211 correctly takes into account the MMIC error. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20201007101943.749898-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-06staging: vchiq: Fix list_for_each exit testsDan Carpenter1-5/+7
After a list_for_each_entry() loop, the list iterator is always non-NULL so these conditions don't work. If the "waiter" is not found then this results in an out of bounds access. I have fixed it by introducing a new "found" variable. In one case, I used an else statement for readability. Fixes: 46e4b9ec4fa4 ("staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20201006134748.GA2076872@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: greybus: use __force when assigning __u8 value to snd_ctl_elem_type_tCoiby Xu1-1/+1
(struct gb_audio_ctl_elem_info*)->type has the type of __u8 so there is no concern about the byte order. __force is safe to use. Found by sparse, $ make C=2 drivers/staging/greybus/ drivers/staging/greybus/audio_topology.c:185:24: warning: cast to restricted snd_ctl_elem_type_t Suggested-by: Alex Elder <elder@linaro.org> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20201002233057.74462-3-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: greybus: codecs: use SNDRV_PCM_FMTBIT_S16_LE for format bitmaskCoiby Xu1-2/+2
snd_soc_pcm_stream.formats should use the bitmask SNDRV_PCM_FMTBIT_* instead of the sequential integers SNDRV_PCM_FORMAT_* as explained by commit e712bfca1ac1f63f622f87c2f33b57608f2a4d19 ("ASoC: codecs: use SNDRV_PCM_FMTBIT_* for format bitmask"). Found by sparse, $ make C=2 drivers/staging/greybus/ drivers/staging/greybus/audio_codec.c:691:36: warning: incorrect type in initializer (different base types) drivers/staging/greybus/audio_codec.c:691:36: expected unsigned long long [usertype] formats drivers/staging/greybus/audio_codec.c:691:36: got restricted snd_pcm_format_t [usertype] drivers/staging/greybus/audio_codec.c:701:36: warning: incorrect type in initializer (different base types) drivers/staging/greybus/audio_codec.c:701:36: expected unsigned long long [usertype] formats drivers/staging/greybus/audio_codec.c:701:36: got restricted snd_pcm_format_t [usertype] Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20201002233057.74462-2-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: greybus: fix warnings about endianness detected by sparseCoiby Xu2-12/+12
This patch fix the following warnings from sparse, $ make C=2 drivers/staging/greybus/ drivers/staging/greybus/audio_module.c:222:25: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_module.c:222:25: expected restricted __le16 [usertype] data_cport drivers/staging/greybus/audio_module.c:222:25: got unsigned short [usertype] intf_cport_id drivers/staging/greybus/audio_topology.c:460:40: warning: restricted __le32 degrades to integer drivers/staging/greybus/audio_topology.c:691:41: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:691:41: expected unsigned int access drivers/staging/greybus/audio_topology.c:691:41: got restricted __le32 [usertype] access drivers/staging/greybus/audio_topology.c:746:44: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:746:44: expected unsigned int drivers/staging/greybus/audio_topology.c:746:44: got restricted __le32 drivers/staging/greybus/audio_topology.c:748:52: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:748:52: expected unsigned int drivers/staging/greybus/audio_topology.c:748:52: got restricted __le32 drivers/staging/greybus/audio_topology.c:802:42: warning: restricted __le32 degrades to integer drivers/staging/greybus/audio_topology.c:805:50: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:805:50: expected restricted __le32 drivers/staging/greybus/audio_topology.c:805:50: got unsigned int drivers/staging/greybus/audio_topology.c:814:50: warning: restricted __le32 degrades to integer drivers/staging/greybus/audio_topology.c:817:58: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:817:58: expected restricted __le32 drivers/staging/greybus/audio_topology.c:817:58: got unsigned int drivers/staging/greybus/audio_topology.c:889:25: warning: incorrect type in assignment (different base types) drivers/staging/greybus/audio_topology.c:889:25: expected unsigned int access drivers/staging/greybus/audio_topology.c:889:25: got restricted __le32 [usertype] access Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20201002233057.74462-1-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: r8188eu: remove unnecessary type casts (struct wlan_bssid_ex *)Ivan Safonov5-20/+20
Reduce line length, simplify refactoring. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20201004060921.8908-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: rtl8723bs: replace _cancel_timer with del_timer_syncRoss Schmidt4-24/+4
Replace _cancel_timer with API function del_timer_sync. One instance of del_timer_sync is moved and an unnecessary pair of spin locks are removed. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20201004011743.10750-8-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: rtl8723bs: replace RTW_GET_BE16 with get_unaligned_be16Ross Schmidt4-6/+6
Replace RTW_GET_BE16 macro with get_unlaligned_be16. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20201004011743.10750-7-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: rtl8723bs: replace RTW_GET_LE16 with get_unaligned_le16Ross Schmidt4-9/+9
Replace RTW_GET_LE16 macro with get_unaligned_le16. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20201004011743.10750-6-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: rtl8723bs: replace RTW_GET_BE24 with get_unaligned_be24Ross Schmidt2-4/+2
Replace RTW_GET_BE24 macro with get_unaligned_be24. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20201004011743.10750-5-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: rtl8723bs: remove unused macrosRoss Schmidt1-57/+0
Remove several macros in osdep_service.h because they are not used. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20201004011743.10750-4-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: rtl8723bs: replace _RND8 with round_up()Ross Schmidt2-12/+1
Use round_up instead of inline _RND8. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20201004011743.10750-3-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: rtl8723bs: replace _RND4 with round_up()Ross Schmidt3-13/+2
Use round_up instead of inline _RND4. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20201004011743.10750-2-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: rtl8723bs: replace RND4 with round_up()Ross Schmidt4-9/+8
Use round_up instead of define RND4. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20201004011743.10750-1-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-05staging: qlge: fix build breakage with dumping enabledCoiby Xu3-24/+32
This fixes commit 0107635e15ac ("staging: qlge: replace pr_err with netdev_err") which introduced an build breakage of missing `struct ql_adapter *qdev` for some functions and a warning of type mismatch with dumping enabled, i.e., $ make CFLAGS_MODULE="-DQL_ALL_DUMP -DQL_OB_DUMP -DQL_CB_DUMP \ -DQL_IB_DUMP -DQL_REG_DUMP -DQL_DEV_DUMP" M=drivers/staging/qlge qlge_dbg.c: In function ‘ql_dump_ob_mac_rsp’: qlge_dbg.c:2051:13: error: ‘qdev’ undeclared (first use in this function); did you mean ‘cdev’? 2051 | netdev_err(qdev->ndev, "%s\n", __func__); | ^~~~ qlge_dbg.c: In function ‘ql_dump_routing_entries’: qlge_dbg.c:1435:10: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘int’ [-Wformat=] 1435 | "%s: Routing Mask %d = 0x%.08x\n", | ~^ | | | char * | %d 1436 | i, value); | ~ | | | int qlge_dbg.c:1435:37: warning: format ‘%x’ expects a matching ‘unsigned int’ argument [-Wformat=] 1435 | "%s: Routing Mask %d = 0x%.08x\n", | ~~~~^ | | | unsigned int Note that now ql_dump_rx_ring/ql_dump_tx_ring won't check if the passed parameter is a null pointer. Fixes: 0107635e15ac ("staging: qlge: replace pr_err with netdev_err") Reported-by: Benjamin Poirier <benjamin.poirier@gmail.com> Suggested-by: Benjamin Poirier <benjamin.poirier@gmail.com> Reviewed-by: Benjamin Poirier <benjamin.poirier@gmail.com> Signed-off-by: Coiby Xu <coiby.xu@gmail.com> Link: https://lore.kernel.org/r/20201002235941.77062-1-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-04media: zoran.rst: place it at the right place this timeMauro Carvalho Chehab1-1/+1
I was too quick moving zoran.rst... it ends that the original patch didn't do the right thing and forgot to update the files that references it. Fix it. Fixes: 6b90346919d4 ("media: zoran: move documentation file to the right place") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-04Merge tag 'v5.9-rc7' into patchworkMauro Carvalho Chehab4-34/+22
Linux 5.9-rc7 * tag 'v5.9-rc7': (683 commits) Linux 5.9-rc7 mm/thp: Split huge pmds/puds if they're pinned when fork() mm: Do early cow for pinned pages during fork() for ptes mm/fork: Pass new vma pointer into copy_page_range() mm: Introduce mm_struct.has_pinned mm: validate pmd after splitting mm: don't rely on system state to detect hot-plug operations mm: replace memmap_context by meminit_context arch/x86/lib/usercopy_64.c: fix __copy_user_flushcache() cache writeback lib/memregion.c: include memregion.h lib/string.c: implement stpcpy mm/migrate: correct thp migration stats mm/gup: fix gup_fast with dynamic page table folding mm: memcontrol: fix missing suffix of workingset_restore mm, THP, swap: fix allocating cluster for swapfile by mistake mm: slab: fix potential double free in ___cache_free Documentation/llvm: Fix clang target examples io_uring: ensure async buffered read-retry is setup properly KVM: SVM: Add a dedicated INVD intercept routine io_uring: don't unconditionally set plug->nowait = true ...
2020-10-01media: atomisp: fixes build breakage for ISP2400 due to a cleanupMauro Carvalho Chehab1-3/+11
A temporary var needed for building with ISP2400 was removed by accident on a cleanup patch. Fix the breakage. Fixes: 852a53a02cf0 ("media: atomisp: get rid of unused vars") Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: fix mixed case on varsMauro Carvalho Chehab10-350/+350
Use this small script to replace CamelCase and wrong case on vars: <script> FILES=$(find "$1" -type f|grep -e '.c$' -e '.h$') CAMEL_VARS=$(cat tags|perl -ne 'print "$1\n" if (m/^(\w*[A-Z]\w*[a-z]\w*)\s/)') for i in $CAMEL_VARS; do new=$(perl -e ' my $s = $ARGV[0]; $s =~ s{([^a-zA-Z]?)([A-Z]*)([A-Z])([a-z]?)}{ my $fc = pos($s)==0; my ($p0,$p1,$p2,$p3) = ($1,lc$2,lc$3,$4); my $t = $p0 || $fc ? $p0 : '_'; $t .= $p3 ? $p1 ? "${p1}_$p2$p3" : "$p2$p3" : "$p1$p2"; $t; }ge; print $s;' "$i") for j in $FILES; do sed -E "s,\b$i\b,$new,g" -i $j done done for i in $(git grep "#define zr" drivers/staging/media/zoran/*.[ch]|perl -ne 'print "$1\n" if (m/#define\s+(zr\S+)/)'); do j=$(echo $i|tr [a-z] [A-Z]); sed "s,\b$i\b,$j,g" -i drivers/staging/media/zoran/*.[ch]; done </script> This should solve almost all warnings reported by checkpatch.pl in strict mode. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: get rid of an unused varMauro Carvalho Chehab1-1/+0
The jpeg_error in lowercase is not used anywhere. Drop it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01media: zoran: use upper case for card typesMauro Carvalho Chehab2-14/+14
Don't mix case there: let's just use uppercase, as this is the common pattern for such define-like enums. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-10-01staging: rtl8188eu: clean up indent style issueMichael Straube1-1/+1
Replace spaces with tab to clear checkpatch error. ERROR: code indent should use tabs where possible Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200929062847.23985-8-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01staging: rtl8188eu: remove unused variable ratelenMichael Straube3-7/+5
After the removal of cckrates_included() and cckrates_only_included() from rtw_wlan_util.c the variable/parameter 'ratelen' is unused now. Remove it from update_wireless_mode() and judge_network_type(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200929062847.23985-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01staging: rtl8188eu: remove cckrates{only}_included()Michael Straube2-33/+4
In rtw_ieee80211.c there are rtw_is_cckrates_included() and rtw_is_cckratesonly_included() which have the same functionality as cckrates_included() and cckrates_only_included() defined in rtw_wlan_util.c. Remove the functions from rtw_wlan_util.c and use those from rtw_ieee80211.c. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200929062847.23985-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01staging: rtl8188eu: rename struct field bUsed -> usedMichael Straube3-5/+5
Rename field of struct rt_pmkid_list to avoid camel case. bUsed -> used Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200929062847.23985-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01staging: rtl8188eu: use ETH_ALENMichael Straube1-1/+1
Use ETH_ALEN instead of hard coded array size. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200929062847.23985-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01staging: rtl8188eu: rename struct field Bssid -> bssidMichael Straube3-6/+6
Rename field of struct rt_pmkid_list to avoid camel case. Bssid -> bssid Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200929062847.23985-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01staging: rtl8188eu: clean up comparsions to NULLMichael Straube1-4/+4
Clean up remaining comparsions to NULL reported by checkpatch. x == NULL -> !x x != NULL -> x Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200929062847.23985-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>