aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
AgeCommit message (Collapse)AuthorFilesLines
2022-04-04staging: rtl8723bs: Fix No space before tabsAlaa Mohamed1-27/+27
Fix "WARNING: please, no space before tabs" reported by checkpatch Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> Link: https://lore.kernel.org/r/20220331130948.74835-1-eng.alaamohamedsoliman.am@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: rtl8723bs: remove redundant braces in if statementsSevinj Aghayeva1-8/+4
Adhere to Linux kernel coding style. Reported by checkpatch: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220331113245.GA425141@euclid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove duplicate assignmentWang Qing1-1/+0
netdev_alloc_skb() has assigned ssi->netdev to skb->dev if successed, no need to repeat assignment. Signed-off-by: Wang Qing <wangqing@vivo.com> Link: https://lore.kernel.org/r/1648728514-37390-1-git-send-email-wangqing@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: rtl8723bs: place constants on the right side of testsSevinj Aghayeva1-16/+16
Adhere to Linux kernel coding style. Reported by checkpatch: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220331122618.GA434796@euclid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: add a check for rtw_cbuf_alloc()Xiaoke Wang1-0/+2
kmalloc() is called by rtw_cbuf_alloc() and it returns pointer of srtuct rtw_cbuf, NULL for allocation failure. So it is better to check the return value of it. Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com> Link: https://lore.kernel.org/r/tencent_D95ACC78B93B1CDD14C4E13E4A66FF892008@qq.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove the "dump tx packet" fragmentsMartin Kaiser4-13/+0
Remove the code fragments for printing outgoing packets. There's only a hal variable HAL_DEF_DBG_DUMP_TXPKT and the bDumpTxPkt component of struct hal_data_8188e. The hal variable is set by a private ioctl, it's never read. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220330201210.175941-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove the "dump rx packet" fragmentsMartin Kaiser5-16/+1
Remove the code fragments for printing incoming packets. There's only a hal variable HAL_DEF_DBG_DUMP_RXPKT and the bDumpRxPkt component of struct hal_data_8188e. The hal variable is set by a private ioctl, it's read in validate_recv_frame but it's not used. All of this can be removed, there's no code to dump the packets. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220330201210.175941-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: rtl8723bs: place constants on the right side of testsSevinj Aghayeva1-5/+5
Adhere to Linux kernel coding style. Reported by checkpatch: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220330120709.GA339788@euclid Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: Fix misspelling in comment "writting" -> "writing"Haowen Bai1-1/+1
This patch fixes some spelling typo in error message reported by checkpatch.pl WARNING: 'writting' may be misspelled - perhaps 'writing'? Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1648636275-13558-1-git-send-email-baihaowen@meizu.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: Fix misspelling in comment "Tranceiver" -> "Transceiver"Haowen Bai1-4/+4
This patch fixes some spelling typo in error message reported by checkpatch.pl WARNING: 'Tranceiver' may be misspelled - perhaps 'Transceiver'? WARNING: 'Tranceiver' may be misspelled - perhaps 'Transceiver'? WARNING: 'Tranceiver' may be misspelled - perhaps 'Transceiver'? WARNING: 'Tranceiver' may be misspelled - perhaps 'Transceiver'? Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1648625242-12678-1-git-send-email-baihaowen@meizu.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: Fix sparse endianness warnings.Charlie Sands1-5/+7
This patch fixes sparse warnings about the endianness of different integers in the driver. Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Charlie Sands <sandsch@northvilleschools.net> Link: https://lore.kernel.org/r/YkPK/QmLAp3BkygY@sckzor-linux.localdomain Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove HW_VAR_BCN_VALID from SetHwReg8188EU()Michael Straube4-8/+11
The HW_VAR_BCN_VALID case in SetHwReg8188EU() just calls rtw_write8(). Remove HW_VAR_BCN_VALID from SetHwReg8188EU() and call rtw_write8() directly. Move the call to a new function to indicate what it actually does. This is part of the ongoing effort to getrid of the unwanted hal layer. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329202141.7028-9-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove HW_VAR_TX_RPT_MAX_MACID from SetHwReg8188EU()Michael Straube5-9/+10
The HW_VAR_TX_RPT_MAX_MACID case in SetHwReg8188EU() just calls rtw_write8(). Remove HW_VAR_TX_RPT_MAX_MACID from SetHwReg8188EU() and call rtw_write8() directly. Move the call to a new function to indicate what it actually does. 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/20220329202141.7028-8-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: simplify if-else statementMichael Straube1-10/+4
Simplify a nested if-else statement to a single if-else statement in rtw_set_threshold(). This improves readability and allows us to remove the local variable threshold. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329202141.7028-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove HW_VAR_RXDMA_AGG_PG_TH from SetHwReg8188EU()Michael Straube3-22/+21
The HW_VAR_RXDMA_AGG_PG_TH case in SetHwReg8188EU() just sets a variable conditionally and then calls rtw_write8(). Set the variable in the caller and call rtw_write8() directly. Move the functionality into a new static function to make the code cleaner. Remove the HW_VAR_RXDMA_AGG_PG_TH case from SetHwReg8188EU(). 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/20220329202141.7028-6-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove HW_VAR_ACM_CTRL from SetHwReg8188EU()Michael Straube3-28/+26
SetHwReg8188EU() is called with HW_VAR_ACM_CTRL only from a function in rtw_wlan_util.c. Move the functionality into a static function in rtw_wlan_util.c and remove the HW_VAR_ACM_CTRL case from SetHwReg8188EU(). 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/20220329202141.7028-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: rename some macros to upper caseMichael Straube2-13/+9
Rename some macros to upper case to avoid camel case and improve readability. While at it, remove some unused macros. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329202141.7028-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove HW_VAR_MLME_DISCONNECT from SetHwReg8188EU()Michael Straube3-15/+16
SetHwReg8188EU() is called with HW_VAR_MLME_DISCONNECT only from functions in rtw_mlme_ext.c. Move the functionality into a static function in rtw_mlme_ext.c and remove the HW_VAR_MLME_DISCONNECT case from SetHwReg8188EU(). 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/20220329202141.7028-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove HW_VAR_RESP_SIFS from SetHwReg8188EU()Michael Straube3-14/+6
SetHwReg8188EU() is called with HW_VAR_RESP_SIFS only in one place. Remove the HW_VAR_RESP_SIFS case from SetHwReg8188EU() and call rtw_write8() directly instead. 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/20220329202141.7028-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: Directly return _SUCCESS instead of using local ret variableHaowen Bai3-10/+3
As init_mlme_ext_priv function always returns SUCCESS , We can change return type from int to void. fixes coccinelle warning: ./drivers/staging/r8188eu/core/rtw_mlme_ext.c:357:5-8: Unneeded variable: "res". Return "_SUCCESS" on line 380 Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1648603740-14760-1-git-send-email-baihaowen@meizu.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: rts5208: Convert kmap() to kmap_local_page()Fabio M. De Francesco1-7/+5
The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore rtsx_stor_access_xfer_buf() is a function where the use of kmap_local_page() in place of kmap() is correctly suited. Convert to kmap_local_page() but, instead of open coding it, use the helpers memcpy_to_page() and memcpy_from_page(). Make a minor change to a comment related to scatter-gather. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20220330143331.8306-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: rtl8723bs: remove code suspect indentAlaa Mohamed1-1/+1
Fix "WARNING: suspect code indent for conditional statements (16, 32)" for line 1240 founded by checkpatch.pl Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> Link: https://lore.kernel.org/r/20220330175949.95564-1-eng.alaamohamedsoliman.am@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove unnecessary spacesRebecca Mckeever1-3/+3
Conform to Linux kernel coding style. Issue found by checkpatch: WARNING: Statements should start on a tabstop Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/YkRWGCmMytlqgvkZ@bertie Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: wfx: remove space at the start of the lineJaehee Park1-1/+1
Remove spaces at the start of the line to follow the linux kernel coding style. Issue found by checkpatch: WARNING: please, no spaces at the start of a line. Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220329222534.GA1002253@jaehee-ThinkPad-X1-Extreme Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: convert rtw_inc_and_chk_continual_urb_error() to boolMichael Straube1-1/+1
Function rtw_inc_and_chk_continual_urb_error() returns boolean values. Change its return type from int to bool. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: convert rtw_usb_bulk_size_boundary() to boolMichael Straube1-1/+1
Function rtw_usb_bulk_size_boundary() returns boolean values. Change its return type from u8 to bool. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: refactor rtw_inc_and_chk_continual_urb_error()Michael Straube1-5/+4
Refactor rtw_inc_and_chk_continual_urb_error(). Return directly instead of using a return variable and initialize the variable 'value' at declaration. This shortens the code and improves readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: refactor rtw_usb_bulk_size_boundary()Michael Straube1-8/+3
Using ternary operator to set a variable to true or false is not needed. Convert two such uses of ternary operator in rtw_usb_bulk_size_boundary() to just use the condition and return the value directly instead of using a return variable. This shortens the code and improves readability. While at it, remove an unneeded line break from the function head. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use ieee80211 define for fragment numberMartin Kaiser2-4/+1
Use the IEEE80211_SCTL_FRAG define to extract the fragment number from an incoming frame. pattrib->frag_num must be in host endianness, we have to convert hdr->seq_ctrl, this field is little-endian. Remove the local GetFragNum macro, it is not used any more. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use ieee80211 macro for sequence numberMartin Kaiser2-15/+12
Use the IEEE80211_SEQ_TO_SN macro in function validate_recv_frame to get the sequence number of an incoming frame. Map the incoming rx bytes to a struct ieee80211_hdr. Replace the fc variable with struct ieee80211_hdr's frame control component. The IEEE80211_SEQ_TO_SN macro takes the sequence control field of an ieee80211 header and extracts the sequence number. The macro's input parameter must be in host endianness, the sequence number in the 80211 header is little-endian, we have to convert it to host endianness. Remove the local GetSequence macro, it is not used any more. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove unused control frame subtypesMartin Kaiser1-5/+0
Remove unused defines for control frame subtypes. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove unused data frame subtypesMartin Kaiser1-3/+0
Remove unused defines for data frame subtypes. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use standard mechanisms for qos data framesMartin Kaiser3-8/+4
Use defines and macros from ieee80211.h to check for qos data frames and to mark a frame as qos data. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use standard mechanisms for data framesMartin Kaiser3-13/+13
Use defines and macros from ieee80211.h to check for data frames and to define data frame subtypes. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use standard mechanisms for control framesMartin Kaiser3-17/+10
Use defines and macros from ieee80211.h to check for control frames and to define control frame subtypes. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use ieee80211 helper to read the pwr bitMartin Kaiser1-1/+1
Use the ieee80211 helper to read the power management bit. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: use ieee80211 define for version checkMartin Kaiser1-3/+1
Use the IEEE80211_FCTL_VERS define to check the version number of a received frame. Covert IEEE80211_FCTL_VERS to le16 before using it as a mask for fc, which is also an le16 value. The ieee80211_... helper functions use the same approach. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220327180944.712545-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove empty rtw_fwdbg_event_callbackMartin Kaiser2-7/+1
Remove the empty function rtw_fwdbg_event_callback. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220322202439.157999-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove empty rtw_dummy_event_callbackMartin Kaiser2-7/+2
Remove the empty function rtw_dummy_event_callback. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220322202439.157999-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: the MCS_rate_2R array is not usedMartin Kaiser2-2/+0
The MCS_rate_2R array is not used in the r8188eu driver. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220322202439.157999-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: make _rtw_init_mlme_priv staticMartin Kaiser2-3/+1
The _rtw_init_mlme_priv function is used only in rtw_mlme.c. It can be declared as static. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220322202439.157999-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: vchiq: replace usage of found with dedicated list iterator variableJakob Koschel2-14/+12
To move the list iterator variable into the list_for_each_entry_*() macro in the future it should be avoided to use the list iterator variable after the loop body. To *never* use the list iterator variable after the loop it was concluded to use a separate iterator variable instead of a found boolean [1]. This removes the need to use a found variable and simply checking if the variable was set, can determine if the break/goto was hit. Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com> Link: https://lore.kernel.org/r/20220324073024.65943-1-jakobkoschel@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: refactor dm func set and clearMartin Kaiser5-20/+7
Refactor the code to set and clear "dm functions". The only remaining callers of Switch_DM_Func use Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true) or Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false). Remove Switch_DM_Func and call SetHwReg8188EU directly. For HW_VAR_DM_FUNC_SET, the parameter is always DYNAMIC_ALL_FUNC_ENABLE. This operation resets podmpriv->SupportAbility to the initial value. Rename HW_VAR_DM_FUNC_SET to HW_VAR_DM_FUNC_RESET and drop the unused else branch. For HW_VAR_DM_FUNC_CLR, the parameter is always DYNAMIC_FUNC_DISABLE (0x00). We can set podmpriv->SupportAbility to 0 directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220321203031.143486-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: DYNAMIC_RF_CALIBRATION is not usedMartin Kaiser2-4/+0
Remove the DYNAMIC_RF_CALIBRATION capability. It's cleared in one place but never checked. DYNAMIC_RF_CALIBRATION is part of podmpriv->SupportAbility, there are no users that check SupportAbility as a whole and use DYNAMIC_RF_CALIBRATION implicitly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220321203031.143486-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: DYNAMIC_BB_ANT_DIV is not usedMartin Kaiser2-4/+0
Remove the DYNAMIC_BB_ANT_DIV capability. It's cleared in one place but never checked. DYNAMIC_BB_ANT_DIV is part of podmpriv->SupportAbility, there are no users that check SupportAbility as a whole and use DYNAMIC_BB_ANT_DIV implicitly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220321203031.143486-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: DYNAMIC_BB_DYNAMIC_TXPWR is not usedMartin Kaiser3-7/+0
Remove the DYNAMIC_BB_DYNAMIC_TXPWR capability. It is cleared but not used. DYNAMIC_BB_DYNAMIC_TXPWR defines a bit in podmpriv->SupportAbility that's set or cleared. There's no code that checks this bit explicitly. There's also no code that makes a copy of SupportAbility and checks the DYNAMIC_BB_DYNAMIC_TXPWR in the copy. SupportAbility is copied to podmpriv->BK_SupportAbility. The only use of BK_SupportAbility is to restore a previously saved value. The other remaining reader of SupportAbility is a private debug ioctl. It's safe to assume that DYNAMIC_BB_DYNAMIC_TXPWR is not used, not even indirectly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220321203031.143486-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove unused defines for dynamic functionsMartin Kaiser1-16/+0
Remove a couple of DYNAMIC_BB_... defines which are not used by this driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220321203031.143486-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove two limit definesMartin Kaiser1-3/+0
Remove two unused defines related to limits. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220321203031.143486-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: remove local BIT macroMartin Kaiser2-8/+3
The r8188eu driver defines a local BIT(x) macro. Remove this local macro and use the one from include/linux/bits.h. The global BIT macro returns an unsigned long value, the removed local BIT macro used a signed int. DYNAMIC_BB_DYNAMIC_TXPWR is defined as BIT(2), ~DYNAMIC_BB_DYNAMIC_TXPWR is passed to Switch_DM_Func as a u32 parameter. We need a cast in this case as ~DYNAMIC_BB_DYNAMIC_TXPWR is a 64-bit value on x86_64 systems. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220319180342.3143734-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: greybus: codecs: fix type confusion of list iterator variableJakob Koschel1-2/+2
If the list does not exit early then data == NULL and 'module' does not point to a valid list element. Using 'module' in such a case is not valid and was therefore removed. Fixes: 6dd67645f22c ("greybus: audio: Use single codec driver registration") Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com> Link: https://lore.kernel.org/r/20220321123626.3068639-1-jakobkoschel@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>