- 08 Apr, 2022 6 commits
-
-
Michael Straube authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 07 Apr, 2022 14 commits
-
-
Mahak Gupta authored
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.inSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alaa Mohamed authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
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@euclidSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
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.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
Format comments according to the Linux kernerl coding style for drivers/net so they do not need to be reformatted after this driver is accepted into the drivers/net tree. Suggested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/bd7960acafb871c17ef733cd98b37294f38ad3fb.1649233201.git.remckee0@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alaa Mohamed authored
Reported by checkpatch: Remove unnecessary parentheses around structure field references Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> Link: https://lore.kernel.org/r/20220407125947.8525-1-eng.alaamohamedsoliman.am@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove the unused macro _RND() and the unused functions _RND256(), _RND512() from osdep_service.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407125742.7814-6-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use in-kernel round_up() instead of custom _RND128(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407125742.7814-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use in-kernel round_up() instead of custom _RND8(). Just remove _RND8 where it is not necessary to round up. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407125742.7814-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use in-kernel round_up() instead of custom _RND4(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407125742.7814-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use in-kernel PTR_ALIGN() instead of custom RND4(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220407125742.7814-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
Merge branch 'wfx-move-out-of-staging' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next into staging-next This moves the wfx driver out of staging. * 'wfx-move-out-of-staging' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: wfx: get out from the staging area
-
- 06 Apr, 2022 1 commit
-
-
Jérôme Pouiller authored
The wfx driver is now mature enough to leave the staging area. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Signed-off-by: Kalle Valo <kvalo@kernel.org>
-
- 05 Apr, 2022 19 commits
-
-
Xiaoke Wang authored
In r871xu_drv_init(), if r8712_init_drv_sw() fails, then the memory allocated by r8712_alloc_io_queue() in r8712_usb_dvobj_init() is not properly released as there is no action will be performed by r8712_usb_dvobj_deinit(). To properly release it, we should call r8712_free_io_queue() in r8712_usb_dvobj_deinit(). Besides, in r871xu_dev_remove(), r8712_usb_dvobj_deinit() will be called by r871x_dev_unload() under condition `padapter->bup` and r8712_free_io_queue() is called by r8712_free_drv_sw(). However, r8712_usb_dvobj_deinit() does not rely on `padapter->bup` and calling r8712_free_io_queue() in r8712_free_drv_sw() is negative for better understading the code. So I move r8712_usb_dvobj_deinit() into r871xu_dev_remove(), and remove r8712_free_io_queue() from r8712_free_drv_sw(). Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com> Link: https://lore.kernel.org/r/tencent_B8048C592777830380A23A7C4409F9DF1305@qq.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Vihas Makwana authored
The if check is redundant. Drop it and simplify the funciton. Signed-off-by: Vihas Makwana <makvihas@gmail.com> Link: https://lore.kernel.org/r/20220405124239.3372-2-makvihas@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The local variable odm_flag in rtw_dbg_port() is set but never used. This are the last two remaining calls to GetHalDefVar8188EUsb(). Both calls can be removed and we finally can remove GetHalDefVar8188EUsb() itself. 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/20220405104910.9769-5-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
In order to get rid of the function GetHalDefVar8188EUsb(), remove the HAL_DEF_CURRENT_ANTENNA case from it and move the functionality into a new function. 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/20220405104910.9769-4-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
In order to get rid of the function GetHalDefVar8188EUsb(), remove the HAL_DEF_IS_SUPPORT_ANT_DIV case from it and move the functionality into a new function. 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/20220405104910.9769-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
In rtw_select_and_join_from_scanned_queue() the local variable cur_ant is set but never used. Remove the variable and related dead code. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220405104910.9769-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove unused macros from ieee80211.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220405060813.8448-3-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
There are some uses of ternary operator where it explicitly sets true or false but the condition already evaluates to true or false. In this cases the ternary operator is redundant and can be removed. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220405060813.8448-2-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Rename constant definitions with CamelCase in mac.h as they are not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/19cfb3ec78eaba8e839578b1ea5a6eb09e8c09be.1649103348.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Remove unused macros with do-while(0) loop or CamelCase in mac.h as they are not accepted by checkpatch.pl Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/78f72d0aa3d1bdddf3c415fd4c458399aa5e7cbf.1649103348.git.philipp.g.hortmann@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
Adhere to Linux kernel coding style. Reported by checkpatch: WARNING: space prohibited between function name and open parenthesis Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/86494fef795f1c3e28c55e556d68b407dadd1488.1649128267.git.sevinj.aghayeva@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
Adhere to Linux kernel coding style. Reported by checkpatch: WARNING: else is not generally useful after a break or return Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/fcb50e467d5ac81becf222379bcc21136966b86b.1649128267.git.sevinj.aghayeva@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
Adhere to Linux kernel coding style. Reported by checkpatch: WARNING: void function return statements are not generally useful Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/d1aa09f34cd192e284048999ba8e20d26a224483.1649128267.git.sevinj.aghayeva@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
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/5f3a013af7ca5ac02b4d680fa22a23049f5712db.1649128267.git.sevinj.aghayeva@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
Both sides of conditional statement are the same except for the comment. Additional instances found with git grep. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/23cfd782614e09f57a514aab68407183702b0a2c.1649120568.git.remckee0@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
The "need to make timeout handlerOS independent" comment is incorrect. Remove the comment to avoid misleading developers. Additional instances found with git grep. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/416ed753b7b3062cc8c674dea9028fc901e85426.1649120568.git.remckee0@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
Checkpatch issues "WARNING: else is not generally useful after a break or return" for the following code: while (1) { do_join_r = rtw_do_join(padapter); if (do_join_r == _SUCCESS) { break; } else { rtw_dec_to_roam(padapter); if (rtw_to_roam(padapter) > 0) { continue; } else { rtw_indicate_disconnect(padapter); break; } } } We simplify this code in multiple steps. First, we remove do_join_r variable because it is only used right after it is assigned. Second, we remove the unnecessary else statement right after break: while (1) { if (rtw_do_join(padapter) == _SUCCESS) break; rtw_dec_to_roam(padapter); if (rtw_to_roam(padapter) > 0) { continue; } else { rtw_indicate_disconnect(padapter); break; } } Next, we move the call to rtw_do_join into the while test because the while will loop only until the call is successful: while (rtw_do_join(padapter) != _SUCCESS) { rtw_dec_to_roam(padapter); if (rtw_to_roam(padapter) > 0) { continue; } else { rtw_indicate_disconnect(padapter); break; } } Finally, looking at the code above, it is clear that the code will break out of the loop if rtw_to_roam call is <= 0. Hence: while (rtw_do_join(padapter) != _SUCCESS) { rtw_dec_to_roam(padapter); if (rtw_to_roam(padapter) <= 0) { rtw_indicate_disconnect(padapter); break; } } Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220403224207.GA397480@euclidSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
The function iterates an index from 0 to NUM_PMKID_CACHE and returns the first index for which the condition is true. If no such index is found, the function returns -1. Current code has a complex control flow that obfuscates this simple task. Replace it with a loop. Also, given the shortened function body, replace the long variable name psecuritypriv with a short variable name p. Reported by checkpatch: WARNING: else is not generally useful after a break or return Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220403165325.GA374638@euclidSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sevinj Aghayeva authored
The function iterates an index from 0 to NUM_PMKID_CACHE and returns the first index for which the condition is true. If no such index is found, the function returns -1. Current code has a complex control flow that obfuscates this simple task. Replace it with a loop. Also, given the shortened function body, replace the long variable name psecuritypriv with a short variable name p. Reported by checkpatch: WARNING: else is not generally useful after a break or return Signed-off-by: Sevinj Aghayeva <sevinj.aghayeva@gmail.com> Link: https://lore.kernel.org/r/20220403164250.GA371601@euclidSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-