aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2022-04-13drivers: staging: rtl8192bs: Fix deadlock in rtw_joinbss_event_prehandle()Duoming Zhou1-2/+4
There is a deadlock in rtw_joinbss_event_prehandle(), which is shown below: (Thread 1) | (Thread 2) | _set_timer() rtw_joinbss_event_prehandle()| mod_timer() spin_lock_bh() //(1) | (wait a time) ... | _rtw_join_timeout_handler() del_timer_sync() | spin_lock_bh() //(2) (wait timer to stop) | ... We hold pmlmepriv->lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need pmlmepriv->lock in position (2) of thread 2. As a result, rtw_joinbss_event_prehandle() will block forever. This patch extracts del_timer_sync() from the protection of spin_lock_bh(), which could let timer handler to obtain the needed lock. What`s more, we change spin_lock_bh() to spin_lock_irq() in _rtw_join_timeout_handler() in order to prevent deadlock. Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Link: https://lore.kernel.org/r/20220409064953.67420-1-duoming@zju.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13drivers: staging: rtl8723bs: Fix deadlock in rtw_surveydone_event_callback()Duoming Zhou1-2/+4
There is a deadlock in rtw_surveydone_event_callback(), which is shown below: (Thread 1) | (Thread 2) | _set_timer() rtw_surveydone_event_callback()| mod_timer() spin_lock_bh() //(1) | (wait a time) ... | rtw_scan_timeout_handler() del_timer_sync() | spin_lock_bh() //(2) (wait timer to stop) | ... We hold pmlmepriv->lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need pmlmepriv->lock in position (2) of thread 2. As a result, rtw_surveydone_event_callback() will block forever. This patch extracts del_timer_sync() from the protection of spin_lock_bh(), which could let timer handler to obtain the needed lock. What`s more, we change spin_lock_bh() in rtw_scan_timeout_handler() to spin_lock_irq(). Otherwise, spin_lock_bh() will also cause deadlock() in timer handler. Signed-off-by: Duoming Zhou <duoming@zju.edu.cn> Link: https://lore.kernel.org/r/20220409061836.60529-1-duoming@zju.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13staging: r8188eu: add space around operatorsMahak Gupta1-29/+29
Adhere to linux coding style. Reported by checkpatch: spaces preferred around that '{operator}'. Signed-off-by: Mahak Gupta <mahak_g@cs.iitr.ac.in> Link: https://lore.kernel.org/r/20220413054517.6343-1-mahak_g@cs.iitr.ac.in Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13staging: greybus: remove empty callback functionJaehee Park1-8/+0
Remove the optional remove callback for the soc_codec_dev_gbaudio structure. The only place it is referenced is snd_soc_component_remove() which is only called if the sound_component pointer is non-null. The null function pointers here can be optionally ommitted. When a sound component is registered this way, the remove callback is optional. We can safely remove the whole gbcodec_remove function, which used to be an empty function with a void return type. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Link: https://lore.kernel.org/r/12037ae2502ad7d0311bcdf2178c3d2156293236.1649824370.git.jhpark1013@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13staging: greybus: correct typo in commentJaehee Park1-1/+1
Correct a spelling typo from 'Atleast' to 'At least' in comment. Issue found by checkpatch. Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Link: https://lore.kernel.org/r/2feb03de97ca4dbd27c22cf40f8e185f7dfaae29.1649824370.git.jhpark1013@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13staging: r8188eu: remove else after return and break statementsMahak Gupta1-24/+17
Else is not necessary after return and break statements, hence remove it. Reported by checkpatch: WARNING: else is not generally useful after a break or return Signed-off-by: Mahak Gupta <mahak_g@cs.iitr.ac.in> Link: https://lore.kernel.org/r/20220413052759.4859-1-mahak_g@cs.iitr.ac.in Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-13staging: bcm2835-audio: remove compat ALSA cardAdrien Thierry2-104/+15
Remove compat ALSA card, which has overlapping functionality with the two other cards described by the driver (HDMI and headphones) This handles TODO item "Revisit multi-cards options and PCM route mixer control". Move the S/PDIF device that was part of the compat ALSA card to the HDMI card. Only enable headphones card by default, because HDMI breaks when using both vc4 and bcm2835-audio with HDMI card enabled. Signed-off-by: Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220408150359.26661-1-athierry@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging/rtl8192e,ieee80211: replace ps tasklet with workDavidlohr Bueso5-13/+20
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. rtllib_sta_ps() and ieee80211_sta_ps() will now run in process context and have further concurrency (tasklets being serialized among themselves), but this is done holding the ieee->lock, so it should be fine. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-7-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging/rtl8712: remove event_taskletDavidlohr Bueso1-1/+0
This is unused. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-6-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging/ks7010: replace SME taslet with workDavidlohr Bueso2-12/+11
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. The execution of the SME event will now occur in task context. There are, however, changes in concurrency. Workqueues, unlike tasklets, are not serialized among themselves and can run concurrently updating sme_i.qhead. However, the current code is already exposed in same ways, regardless of the deferral mechanism, in that hostif_sme_enqueue() does unserialized enqueues updating sme_i.qtail. Also get rid of the bogus (power save) tasklet enabling, as it is never disabled to begin with. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-5-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging/wlan-ng, prism2usb: replace completion_bh tasklet with workDavidlohr Bueso3-15/+15
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. The completion_bh tasklet will now run in process context and have further concurrency (tasklets being serialized among themselves), but this is done holding the ctlxq.lock, so it should be fine. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-4-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging/wlan-ng, prism2usb: replace reaper_bh tasklet with workDavidlohr Bueso3-9/+9
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. The reaper_bh tasklet will now run in process context and have further concurrency (tasklets being serialized among themselves), but this is done holding the ctlxq.lock, so it should be fine. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-3-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging/most, dim2: convert dim2_tasklet to threaded irqDavidlohr Bueso1-20/+9
Tasklets have long been deprecated as being too heavy on the system by running in irq context - and this is not a performance critical path. If a higher priority process wants to run, it must wait for the tasklet to finish before doing so. A more suitable equivalent is to converted to threaded irq instead and service channels in regular task context. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Link: https://lore.kernel.org/r/20220411151620.129178-2-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: vt6655: Remove macro PCAvDelayByIOPhilipp Hortmann2-14/+1
Remove do-while(0) and CamelCase macro PCAvDelayByIO as it is not accepted by checkpatch.pl As the macro is just used once with a constant <= 50 the functionality of the macro is implemented by using udelay() directly. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/e8267e7566d389f318a72d911083e52b02e37210.1649706687.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: rtl8712: efuse: code style - avoid macro argument precedence issuesAliya Rahmani1-2/+2
This patch fixes checkpatch warnings of precedence issues. Added parentheses around macro arguments 'offset' and 'word_en'. Signed-off-by: Aliya Rahmani <aliyarahmani786@gmail.com> Link: https://lore.kernel.org/r/20220412071456.40980-1-aliyarahmani786@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: improve timeout handling in efuse_read_phymap_from_txpktbufMartin Kaiser1-4/+3
Use the standard kernel functions to define and check the timeout in efuse_read_phymap_from_txpktbuf. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: improve timeout handling in iol_executeMartin Kaiser1-4/+3
Use the standard kernel functions to define and check the timeout in iol_execute. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: improve timeout handling in LPS_RF_ON_checkMartin Kaiser1-3/+2
Use the standard kernel functions to define and check the timeout in LPS_RF_ON_check. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: make LPS_RF_ON_check staticMartin Kaiser2-2/+1
LPS_RF_ON_check is used only in rtw_pwrctrl.c. Make it a static function. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: improve timeout handling in rtw_check_join_candidateMartin Kaiser1-1/+3
Use the standard kernel functions to define and check the timeout in rtw_check_join_candidate. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: improve timeout handling in rtl8188e_firmware_downloadMartin Kaiser1-3/+3
Use the standard kernel functions to define and check the timeout in rtl8188e_firmware_download. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: summarize two if statementsMartin Kaiser1-3/+1
Summarize the two if statements at the end of send_beacon. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: remove unnecessary rtw_get_passing_time_ms callMartin Kaiser1-3/+0
Remove the rtw_get_passing_time_ms call in send_beacon. Calling rtw_get_passing_time_ms makes no sense if we discard the result. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: no need for an else after returnMartin Kaiser1-5/+3
The else branch at the end of send_beacon is not necessary. We return in the if branch. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220409163212.241122-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: greybus: pwm: Drop assignment to struct pwm_chip::baseUwe Kleine-König1-1/+0
Since commit f9a8ee8c8bcd ("pwm: Always allocate PWM chip base ID dynamically") the value held in base isn't used any more in the PWM framework. All PMWs get assigned a dynamic ID, so the assignment is redundant and can be dropped. Reviewed-by: Johan Hovold <johan@kernel.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220411113010.208500-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: remove HW_VAR_H2C_FW_PWRMODEMichael Straube5-18/+18
Remove the HW_VAR_H2C_FW_PWRMODE case from SetHwReg8188EU() and move its functionality to a new function in rtw_pwrctrl.c. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220409120627.10633-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: remove HW_VAR_FIFO_CLEARN_UPMichael Straube3-28/+28
Remove the HW_VAR_FIFO_CLEARN_UP case from SetHwReg8188EU() and move its functionality to a new static function in os_intfs.c. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220409120627.10633-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: remove HW_VAR_MLME_JOINMichael Straube3-46/+46
Remove the HW_VAR_MLME_JOIN case from SetHwReg8188EU() and move its functionality to a new static function in rtw_mlme_ext.c. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220409120627.10633-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: remove HW_VAR_INITIAL_GAINMichael Straube3-23/+21
Remove the HW_VAR_INITIAL_GAIN case from SetHwReg8188EU() and move its functionality to a new static function in rtw_mlme_ext.c. This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220409120627.10633-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: r8188eu: convert else if to else in rtw_led.cMichael Straube1-2/+2
The else if in this block is redundant, it can be a simple else. if (x) { ... } else if (!x) { ... } Convert two such else if statements to simple else in rw_led.c. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220408163825.29069-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-12staging: rtl8723bs: tidy up error handlingYihao Han1-9/+6
The check for if rtw_skb_alloc() fails is done twice and is written in a confusing way. Move the "if (!recvbuf->pskb)" right after the allocation. The "if (recvbuf->pskb)" check can now be deleted and the code pulled in one tab. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Yihao Han <hanyihao@vivo.com> Link: https://lore.kernel.org/r/20220408144442.17611-1-hanyihao@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-10iio: core: Simplify the registration of kfifo buffersMiquel Raynal1-1/+0
Among all the users of the kfifo buffers, no one uses the INDIO_BUFFER_HARDWARE mode. So let's take this as a general rule and simplify a little bit the internals - overall the documentation - by eliminating unused specific cases. Use the INDIO_BUFFER_SOFTWARE mode by default with kfifo buffers, which will basically mimic what all the "non direct" modes do. Cc: Benson Leung <bleung@chromium.org> Cc: Guenter Roeck <groeck@chromium.org> Cc: Jyoti Bhayana <jbhayana@google.com> Cc: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/20220207143840.707510-13-miquel.raynal@bootlin.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-04-08staging: r8188eu: remove SetHalDefVar8188EUsb()Michael Straube3-44/+34
In SetHalDefVar8188EUsb() there is only the case HAL_DEF_DBG_DM_FUNC. Move its functionality to a new static function in ioctl_linux.c and remove SetHalDefVar8188EUsb(). This is part of the ongoing effort to get rid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220408124615.3687-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: r8188eu: clean up rtw_ioctl.hMichael Straube1-79/+0
There are lots of unused macros, structs, etc. in the header rtw_ioctl.h. Remove them. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407192819.10661-9-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: r8188eu: remove header usb_vendor_req.hMichael Straube3-37/+0
Nothing from the header usb_vendor_req.h is used in the driver code. Remove the header. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407192819.10661-8-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: r8188eu: remove unused prototype usbvendorrequest()Michael Straube1-3/+0
Remove unused prototype usbvendorrequest(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407192819.10661-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: r8188eu: remove unused enums from odm.hMichael Straube1-29/+0
Remove unused enums from odm.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407192819.10661-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: r8188eu: remove unused fields from struct eeprom_privMichael Straube1-3/+0
Remove unused fields from struct eeprom_priv. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407192819.10661-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: r8188eu: ROMVer is always zeroMichael Straube3-3/+1
The variable ROMVer in struct HAL_VERSION is set to zero and never changed. Remove it and replace its use with zero. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407192819.10661-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: r8188eu: move struct rt_firmware to rtw_fw.hMichael Straube2-5/+6
Move the rt_firmware structure to the header rtw_fw.h to have firmware related things in one place. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407192819.10661-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: r8188eu: remove unused macros from basic_types.hMichael Straube1-72/+1
Remove unused macros from basic_types.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407192819.10661-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: rtl8723bs: remove header rtw_ioctl.hMichael Straube2-73/+0
Nothing from the header rtw_ioctl.h is used in the driver code. Remove the header. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220408081956.1093-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: rtl8192u: use min_t/max_t macros instead of if elseRebecca Mckeever1-8/+5
Replace if else statement with min_t or max_t macros to increase readability and conform to Linux kernel coding style. The _t versions of the macros must be used to avoid applying typeof to the bit fields pPeerHTCap->MaxRxAMPDUFactor, and pPeerHTCap->MPDUDensity. Using u32 assures the reader that the value with not be truncated without having to look up the types of the variables involved. Found with minmax coccinelle script. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/65518c0b366bf199903c6c530774c61ba6087165.1649378587.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08staging: rtl8192u: replace ternary statement with if and assignmentRebecca Mckeever1-1/+3
Replace ternary statement with an if statement followed by an assignment to increase readability and make error handling more obvious. Found with minmax coccinelle script. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/36059ec66a2f3d58a8e339aa4f262772eabd3ef0.1649378587.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-07staging: rtl8712: fix camel case in function r8712_generate_ieMahak Gupta1-2/+2
Adhere to linux kernel coding style. Reported by checkpatch: CHECK: Avoid CamelCase: <beaconPeriod> Signed-off-by: Mahak Gupta <mahak_g@cs.iitr.ac.in> Link: https://lore.kernel.org/r/20220407120945.31030-1-mahak_g@cs.iitr.ac.in Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-07staging: rtl8192e: remove multiple blank linesAlaa Mohamed1-3/+0
Reported by checkpatch: CHECK: Please don't use multiple blank lines Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> Link: https://lore.kernel.org/r/20220406154921.15532-1-eng.alaamohamedsoliman.am@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-07staging: rtl8723bs: fix indentationSevinj Aghayeva1-11/+3
Adhere to Linux kernel coding indentation style. Also remove the comments that became irrelevant after fixing indentation. Reported by checkpatch: WARNING: suspect code indent for conditional statements Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220405161643.GA630826@euclid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-07staging: r8188eu: use sizeof(*pvar) for allocating structsRebecca Mckeever1-34/+34
Use sizeof(*pvar) instead of sizeof(struct var) when allocating memory. This conforms to Linux kernel coding style, improves readability, and decreases the opportunity for bugs if the pointer variable type is changed. Issue found by checkpatch messages of the following format: CHECK: Prefer kzalloc(sizeof(*pvar)...) over kzalloc(sizeof(struct var)...) Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/5b526d8c178d89328de935ff4ff57651bdd8379b.1649233201.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-07staging: r8188eu: correct misspelling in comment 'tppe' -> 'type'Rebecca Mckeever1-1/+1
Correct spelling typo. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/edaab7d38893e4f1cbb3c281b617c74fa91f0fe7.1649233201.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-07staging: r8188eu: remove extra 'the'Rebecca Mckeever1-1/+1
Remove repeated 'the' in comment to be grammatically correct and conform to Linux kernel coding style. Found with checkpatch: WARNING: Possible repeated word: 'the' Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/e259a035b79c814f871b490aa277bf0dfe23fe11.1649233201.git.remckee0@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>