- 25 Feb, 2022 1 commit
-
-
Xiaoke Wang authored
devm_kmalloc() returns a pointer to allocated memory on success, NULL on failure. While there is a memory allocation of devm_kmalloc() without proper check. It is better to check the return value of it to prevent wrong memory access. And I use the err label which is introduced by the previous patch to handle the error. Link: https://lore.kernel.org/r/tencent_24A24A3EFF61206ECCC4B94B1C5C1454E108@qq.comReviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com> Link: https://lore.kernel.org/r/tencent_D9887936F780A393C232DC48C9EC3F1D4405@qq.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 21 Feb, 2022 18 commits
-
-
Marcelo Aloisio da Silva authored
Braces are not necessary for single statement blocks. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com> Link: https://lore.kernel.org/r/20220220174150.GA11496@snoopySigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Moses Christopher Bollavarapu authored
There is a BIT(nr) macro available in vdso/bits.h which is doing the same left shift operation Example: (1 << 7) == BIT(7) Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Moses Christopher Bollavarapu <mosescb.dev@gmail.com> Link: https://lore.kernel.org/r/20220219183234.31216-1-mosescb.dev@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Marcelo Aloisio da Silva authored
Fix the following error reported by checkpatch.pl: ERROR: that open brace { should be on the previous line + if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) + { Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com> Link: https://lore.kernel.org/r/20220220180434.GA12386@snoopySigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove unused aes tables from rtw_security.c and, while at it, remove unused extern declarations from rtw_security.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220220195254.11759-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
There are lots of unused macros in the rtw_security.h header. Remove them. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220220195254.11759-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Each case in ODM_CmnInfoUpdate() just sets a single variable. Set the variables directly and remove ODM_CmnInfoUpdate(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220220100212.7466-6-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The variable pBandWidth in odm_dm_struct stores constants from enum ht_channel_width. Change the type of pBandWidth from u8 pointer to enum ht_channel_width pointer to get rid of a type cast in function Update_ODM_ComInfo_88E(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220220100212.7466-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The enums odm_bw and ht_channel_width are redundant. Keep ht_channel_width and remove odm_bw. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220220100212.7466-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The variables bScanInProcess in struct mlme_priv and bpower_saving in struct pwrctrl_priv are both unsed to store only boolean values true and false. Convert them from u8 to bool to avoid type casts in the function Update_ODM_ComInfo_88E(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220220100212.7466-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Each case in ODM_CmnInfoHook() just sets a single variable. Set the variables directly and remove ODM_CmnInfoHook(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220220100212.7466-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
NumQryPhyStatusOFDM in struct odm_phy_dbg_info is set but not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220218093034.854049-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
NumQryPhyStatusCCK in struct odm_phy_dbg_info is set but not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220218093034.854049-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The RxSNR array in struct phy_info is set but not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220218093034.854049-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The RxMIMOSignalQuality array in struct signal_stat is set but not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220218093034.854049-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Marcelo Aloisio da Silva authored
Should not use assignment in if condition. Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com> Link: https://lore.kernel.org/r/20220218040140.GA22796@snoopySigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Hangyu Hua authored
unregister_netdev need to be called when register_netdev succeeds qlge_health_create_reporters fails. Fixes: d8827ae8 ("staging: qlge: deal with the case that devlink_health_reporter_create fails") Signed-off-by: Hangyu Hua <hbh25y@gmail.com> Link: https://lore.kernel.org/r/20220221085552.93561-1-hbh25y@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xiaoke Wang authored
One error handler of wfx_init_common() return without calling ieee80211_free_hw(hw), which may result in memory leak. And I add one err label to unify the error handler, which is useful for the subsequent changes. Suggested-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com> Link: https://lore.kernel.org/r/tencent_24A24A3EFF61206ECCC4B94B1C5C1454E108@qq.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Riccardo Ferrazzo authored
Some variants of the WF200 disallow active scan on channel 12 and 13. For these parts, the channels 12 and 13 are marked IEEE80211_CHAN_NO_IR. However, the beacon hint procedure was removing the flag IEEE80211_CHAN_NO_IR from channels where a BSS is discovered. This was making subsequent scans to fail because the driver was trying active scans on prohibited channels. Signed-off-by: Riccardo Ferrazzo <rferrazzo@came.com> Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220218105358.283769-1-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 17 Feb, 2022 21 commits
-
-
Phillip Potter authored
Where it is possible (without out-of-patch-series-scope large scale refactoring), correct code to remove checkpatch warnings about lines that are too long, also correcting operator spacing where appropriate for these lines as well. These warnings occur mostly due to so many DBG_88E removals and parentheses tweaks etc. being adjacent to such long lines, which are therefore included in the resultant diff. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-16-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove padapter parameter from aes_decipher function in core/rtw_security.c, as I added it previously during debugging tweaks and it is no longer required. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-15-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove the rtw_sctx_chk_waring_status function from core/rtw_amit.c, as it has only one caller which is unnecessary. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-14-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
A number of style problems were left behind by the DBG_88E cleanup: (1) Empty if/else blocks. (2) Parenthesised if/while statements containing only one line. (3) Entire blocks which server zero purpose after removal of DBG_88E. (4) Various warnings about whitespace, and constant comparison order. (5) Use of __constant_htons instead when htons should be used. Fix up these issues across the driver in any file touched by the previous cleanup. Long line warnings will be addresses in a later patch. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-13-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove rtw_debug module parameter, and also the internal GlobalDebugLevel flag and all places where it is referenced. As hal/odm_debug.c is now essentially empty, also remove this file and edit the Makefile to no longer reference it. The DBG_88E macro was the last user of these and has now been removed, making the parameter and flag redundant. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-12-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove DBG_88E macro definition as it has no remaining callers within the driver. This is part of the ongoing effort to cleanup the driver to use standard debug mechanisms where appropriate. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-11-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove all remaining calls to preprocessor aliases of DBG_88E, as well as these definitions themselves. This is a prerequisite for removing the DBG_88E macro itself. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-10-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove the one remaining DBG_88E call from include/usb_ops.h. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-9-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove all remaining DBG_88E calls from the os_dep subdirectory. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-8-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove all remaining DBG_88E calls from os_dep/ioctl_linux.c, patching separately from the rest of the os_dep subdirectory for ease of review due to the sheer number of calls. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-7-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove all remaining DBG_88E calls from the hal subdirectory. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-6-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove all remaining DBG_88E calls from the core subdirectory. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-5-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove all the netdev_dbg/pr_debug calls that were previously converted from DBG_88E inside core/rtw_mlme_ext.c. Due to the sheer number of lines, this patch is separated out for ease of review. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-4-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove all the smaller sets of dev_dbg/netdev_dbg/pr_debug calls that were previously converted from DBG_88E. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-3-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Remove all netdev_dbg and dev_dbg calls that were previously converted from DBG_88E_LEVEL. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-2-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
struct usb_suspend_parm is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220216081657.622467-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
evt_done_cnt in struct evt_priv is set but not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220216081657.622467-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
evt_allocated_buf in struct evt_priv is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220216081657.622467-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
There is a spelling mistake in a dev_warn message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220217104747.15424-1-colin.i.king@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Currently, the DT bindings the wfx driver cannot be processed by make dt_binding_check. We need to place it somewhere into Documentation/devicetree/bindings/. After that change, we are able to get warnings from dt_binding_check and fix them. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220217103248.183770-1-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Until now, the SDIO quirks are applied directly from the driver. However, it is better to apply the quirks before driver probing. So, this patch relocate the quirks in the MMC framework. Note that the WF200 has no valid SDIO VID/PID. Therefore, we match DT rather than on the SDIO VID/PID. Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220216093112.92469-3-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-