aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2021-09-20staging: r8188eu: clean up indentation in odm_RegDefine11N.hMichael Straube1-8/+8
Clean up indentation in odm_RegDefine11N.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-15-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove unused defines from odm_RegDefine11N.hMichael Straube1-96/+0
Remove unused defines from odm_RegDefine11N.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-14-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove header file odm_RegDefine11AC.hMichael Straube2-30/+0
Finally the header odm_RegDefine11AC.h is unused now. Remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-13-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove macros ODM_IC_11{N,AC}_SERIESMichael Straube1-5/+0
The macros ODM_IC_11N_SERIES and ODM_IC_11AC_SERIES are unused now. Remove them. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-12-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove dead code from odm.cMichael Straube1-68/+54
(pDM_Odm->SupportICType & ODM_IC_11N_SERIES) is true in this driver. There is an if statement that checks this. Remove it and its never executed else arm. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-11-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove unnecessary if statementsMichael Straube1-23/+16
(pDM_Odm->SupportICType & ODM_IC_11AC_SERIES) is always false and (pDM_Odm->SupportICType & ODM_IC_11N_SERIES) is always true since SupportICType is ODM_RTL8188E in this driver. Remove unnecessary if statements that check for this. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-10-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove macro ODM_BITMichael Straube2-8/+2
Replace and remove the macro ODM_BIT to make the code cleaner. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-9-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove macro ODM_REGMichael Straube2-5/+3
Replace and remove the macro ODM_REG to make the code cleaner. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-8-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove more dead code from ODM_Write_DIG()Michael Straube1-4/+0
SupportICType is ODM_RTL8188E in this driver. Remove code that is never executed. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove unnecessary if statementMichael Straube1-5/+4
SupportPlatform is ODM_CE in this driver. Remove an unnecessary if statement that checks the SupportPlatform value. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove dead code from ODM_Write_DIG()Michael Straube1-34/+0
In this driver SupportPlatform is ODM_CE, so code in the "else if (pDM_Odm->SupportPlatform & (ODM_AP | ODM_ADSL))" is never executed. Remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove _ic_type from macro _cat in odm_interface.hMichael Straube1-9/+3
((_ic_type) & ODM_IC_11N_SERIES) is always true since SupportICType is ODM_RTL8188E in this driver. Remove it from the _cat macro. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove unused macros from odm_interface.hMichael Straube1-5/+0
Remove unused macros from odm_interface.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove comments from odm_interface.hMichael Straube1-22/+0
In order to make further cleanup easier to review remove some unnecessary comments from odm_interface.h Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918181904.12000-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: do not write past the end of an arrayMartin Kaiser1-5/+4
Commit f7b687d6b67e ("staging: r8188eu: remove NumTotalRFPath from struct hal_data_8188e") removed a for loop around a block of code that is executed only once when i == 0. However, without the for loop, i will never be set to 0 before the code block is executed. i remains at 2, which is the final value after the previous loop. This results in a write past the end of the powerlevel and MCSBase arrays. [ 28.480809] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: rtl8188e_PHY_RF6052SetOFDMTxPower+0x124/0x128 [r8188eu] [ 28.493752] ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: rtl8188e_PHY_RF6052SetOFDMTxPower+0x124/0x128 [r8188eu] ]--- Fix this by replacing i with 0 in the code block that used to be the body of the loop. While at it, remove the powerlevel array that was just holding a temporary value. Tested with Edimax EW-7811Un V2 on an ARM32 embedded system. Fixes: f7b687d6b67e ("staging: r8188eu: remove NumTotalRFPath from struct hal_data_8188e") Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210918134024.23837-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove EFUSE_Read1Byte()Michael Straube2-59/+0
Function EFUSE_Read1Byte() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918095727.13591-9-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove rtl8188e_set_rssi_cmd()Michael Straube2-16/+0
Function rtl8188e_set_rssi_cmd() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918095727.13591-8-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove rtw_IOL_cmd_tx_pkt_buf_dump()Michael Straube2-33/+0
Function rtw_IOL_cmd_tx_pkt_buf_dump() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918095727.13591-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove HalDetectPwrDownMode88E()Michael Straube2-21/+0
Function HalDetectPwrDownMode88E() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918095727.13591-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove unused struct rf_shadowMichael Straube1-21/+0
Remove unused struct rf_shadow. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918095727.13591-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove rtl8188e_RF_ChangeTxPath()Michael Straube2-23/+0
Function rtl8188e_RF_ChangeTxPath() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918095727.13591-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove ODM_DIG_LowerBound_88E()Michael Straube2-11/+0
Function ODM_DIG_LowerBound_88E() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918095727.13591-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove odm_ConfigRF_RadioB_8188E()Michael Straube2-11/+0
Function odm_ConfigRF_RadioB_8188E() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210918095727.13591-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove rtw_set_macaddr_acl()Michael Straube2-11/+0
Function rtw_set_macaddr_acl() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210919153659.20826-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove rtw_check_beacon_data()Michael Straube2-429/+0
Function rtw_check_beacon_data() is not used, remove it. It is the only user of start_bss_network() which is the only user of update_hw_ht_param(). Remove these two functions as well. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210919153659.20826-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove rtw_ap_inform_ch_switch()Michael Straube2-36/+0
Function rtw_ap_inform_ch_switch() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210919153659.20826-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove rtw_acl_remove_sta()Michael Straube2-38/+0
Function rtw_acl_remove_sta() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210919153659.20826-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove rtw_acl_add_sta()Michael Straube2-66/+0
Function rtw_acl_add_sta() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210919153659.20826-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: remove ap_sta_info_defer_update()Michael Straube2-10/+0
Function ap_sta_info_defer_update() is not used, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210919153659.20826-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-20staging: r8188eu: fix -Wrestrict warningsArnd Bergmann1-4/+4
Adding back the nonstandard ioctl commands caused -Wrestrict warnings when building with 'make W=1': drivers/staging/r8188eu/os_dep/ioctl_linux.c: In function 'rtw_mp_read_rf': drivers/staging/r8188eu/os_dep/ioctl_linux.c:5515:27: error: 'sprintf' argument 3 overlaps destination object 'extra' [-Werror=restrict] 5515 | sprintf(extra, "%s %d", extra, strtou); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/staging/r8188eu/os_dep/ioctl_linux.c:5470:54: note: destination object referenced by 'restrict'-qualified argument 1 was declared here 5470 | struct iw_point *wrqu, char *extra) | ~~~~~~^~~~~ Change these to the same construct used elsewhere in that driver, with an offset to the string to make the warning go away. The ioctl commands were previously removed, and it's unlikely that anything is actually using them, so ideally I would prefer to have them removed again. The lack of range checking of the 'extra' output buffer is also slightly worrying, but I did not check whether this could cause harm. Fixes: 2b42bd58b321 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20210920095525.1150678-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-18staging: rts5208: remove unnecessary parentheses in ms.cBenjamin Philip1-21/+21
This commit removes unnecessary parentheses, that have been flagged by checkpatch.pl in ms.c Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com> Link: https://lore.kernel.org/r/20210918065744.26304-1-benjamin.philip495@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-18staging: r8188eu: remove the HW_VAR_CHECK_TXBUF "hal variable"Martin Kaiser3-4/+0
Setting HW_VAR_CHECK_TXBUF is an empty operation. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210918141034.28481-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-18staging: r8188eu: remove rtw_free_pwrctrl_priv prototypeMartin Kaiser1-1/+0
The rtw_free_pwrctrl_priv has already been removed in commit 6729e7541934 ("staging: r8188eu: _free_pwrlock is empty"). Remove the prototype as well. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210918141141.28547-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-18staging: r8188eu: remove rtw_hw_resumeMartin Kaiser2-40/+0
Commit c0a099b7341c ("staging: r8188eu: bHWPwrPindetect is always false") removed the only call to rtw_hw_resume. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210918135722.23976-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-18staging: r8188eu: brfoffbyhw is always falseMartin Kaiser3-9/+0
As a consequence of the bHWPwrPindetect removal, brfoffbyhw is never set to true any more. Remove the variable and code that depends on brfoffbyhw == true. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210918135722.23976-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove struct _io_opsPavel Skripkin3-33/+0
Finally struct _io_ops is unused, so remove it. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-15-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove core/rtw_io.cPavel Skripkin4-131/+8
There are only unused functions and macros and one function which can be open-coded. So, removed core/rtw_io.c at all, removed core/rtw_io.c from Makefile and open-coded rtw_init_io_priv Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-14-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_write_port_cancel()Pavel Skripkin5-20/+2
Remove the unnecessary _rtw_write_port_cancel() and usb_write_port_cancel() and embed their code into the caller (i.e., rtw_write_port_cancel()). _rtw_write_port_cancel() is a mere redefinition of rtw_write_port_cancel() and it is unneeded. usb_write_port_cancel() was the only functions assigned to the (*_usb_write_port_cancel) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-13-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_read_port_cancel()Pavel Skripkin5-20/+3
Remove the unnecessary _rtw_read_port_cancel() and usb_read_port_cancel() and embed their code into the caller (i.e., rtw_read_port_cancel()). _rtw_read_port_cancel() is a mere redefinition of rtw_read_port_cancel() and it is unneeded. usb_read_port_cancel() was the only functions assigned to the (*_usb_read_port_cancel) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-12-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_write_port()Pavel Skripkin5-26/+3
Remove the unnecessary _rtw_write_port() and usb_write_port() and embed their code into the caller (i.e., rtw_write_port()). _rtw_write_port() is a mere redefinition of rtw_write_port() and it is unneeded. usb_write_port() was the only functions assigned to the (*_usb_write_port) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-11-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_read_port()Pavel Skripkin4-29/+3
Remove the unnecessary _rtw_read_port() and usb_read_port() and embed their code into the caller (i.e., rtw_read_port()). _rtw_read_port() is a mere redefinition of rtw_read_port() and it is unneeded. usb_read_port() was the only functions assigned to the (*_usb_read_port) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-10-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_writeN()Pavel Skripkin3-21/+8
Remove the unnecessary _rtw_writeN() and usb_writeN() and embed their code into the caller (i.e., rtw_writeN()). _rtw_writeN() is a mere redefinition of rtw_writeN() and it is unneeded. usb_writeN() was the only functions assigned to the (*_usb_writeN) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-9-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_write32()Pavel Skripkin3-21/+8
Remove the unnecessary _rtw_write32() and usb_write32() and embed their code into the caller (i.e., rtw_write32()). _rtw_write32() is a mere redefinition of rtw_write32() and it is unneeded. usb_write32() was the only functions assigned to the (*_usb_write32) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-8-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_write16()Pavel Skripkin3-20/+8
Remove the unnecessary _rtw_write16() and usb_write16() and embed their code into the caller (i.e., rtw_write16()). _rtw_write16() is a mere redefinition of rtw_write16() and it is unneeded. usb_write16() was the only functions assigned to the (*_usb_write16) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-7-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_write8()Pavel Skripkin3-21/+8
Remove the unnecessary _rtw_write8() and usb_write8() and embed their code into the caller (i.e., rtw_write8()). _rtw_write8() is a mere redefinition of rtw_write8() and it is unneeded. usb_write8() was the only functions assigned to the (*_usb_write8) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-6-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of rtw_read32()Pavel Skripkin3-18/+4
Remove the unnecessary _rtw_readr32() and usb_read32() and embed their code into the caller (i.e., rtw_read32()). _rtw_read32() is a mere redefinition of rtw_read32() and it is unneeded. usb_read32() was the only functions assigned to the (*_usb_read32) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-5-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of rtw_read16()Pavel Skripkin3-18/+4
Remove the unnecessary _rtw_read16() and usb_read16() and embed their code into the caller (i.e., rtw_read16()). _rtw_read16() is a mere redefinition of rtw_read16() and it is unneeded. usb_read16() was the only functions assigned to the (*_usb_read16) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-4-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of rtw_read8()Pavel Skripkin3-18/+4
Remove the unnecessary _rtw_read8() and usb_read8() and embed their code into the caller (i.e., rtw_read8()). _rtw_read8() is a mere redefinition of rtw_read8() and it is unneeded. usb_read8() was the only functions assigned to (*_usb_read8) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-3-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove usb_{read,write}_mem()Pavel Skripkin5-46/+0
Remove usb_{read,write}_mem() because they are unused. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-2-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: use swap()Changcheng Deng1-8/+3
Use swap() in order to make code cleaner. Issue found by coccinelle. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn> Link: https://lore.kernel.org/r/20210917100238.232576-1-deng.changcheng@zte.com.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>