summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2021-04-09staging: rtl8723bs: remove unused code block in os_dep/ioctl_linux.cFabio Aiuto
remove unused code block which does nothing. A list is parsed but no value is written outside the scope of the function rtw_dbg_port. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/b1d8f99f949fd79b27295e8a508d1b0c5861622f.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused variable and empty for cycles left unused ↵Fabio Aiuto
in os_dep/ioctl_linux.c fix following kernel test robot warnings: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2573:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable] struct recv_reorder_ctrl *preorder_ctrl; ^~~~~~~~~~~~~ remove also empty for cycle left unused and counter variable. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/fb1e8ea3cfeda1af27ab1a9393140e144b5cb4b5.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused variable in core/rtw_cmd.cFabio Aiuto
fix following kernel test robot warning: drivers/staging/rtl8723bs/core/rtw_cmd.c: In function 'rtw_cmd_thread': >> drivers/staging/rtl8723bs/core/rtw_cmd.c:390:16: warning: variable 'cmd_start_time' set but not used [-Wunused-but-set-variable] 390 | unsigned long cmd_start_time; | ^~~~~~~~~~~~~~ Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/509eeb1c4a7fcfc37b69cb8578ea146b95b50864.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: simplify rtw_cmd_thread's main loopMartin Kaiser
In rtw_cmd_thread's main loop, we wait until there's a command in the queue. To skip this wait statement in subsequent iterations, the driver uses a label and goto instead of the actual loop. We only get back to the initial wait if the queue is empty when we read it. Basically, all we want to do is check if there's a command in the queue. If yes, we process it. If not, we wait until someone enqueues a command. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove a dead assignmentMartin Kaiser
There's no need to set cmd_hdl to NULL after it's used. It will be set again before the next command is processed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove duplicate if statementMartin Kaiser
There's two identical checks if the device was stopped or unplugged. Remove one of them. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: always free cmd_obj in the cmd threadMartin Kaiser
The rtl8188 driver starts a command thread that reads commands from a queue and processes them. Each command consists of a struct cmd_obj. The command thread may call a function to process the current command and optionally a post-processing function. Eventually, the command's cmd_obj must be freed. At the moment, if there's a post-processing function for the current command, this function has to free the cmd_obj. If there's no post-processing function, the command thread frees cmd_obj. It's much simpler if we always leave it to the command thread to free cmd_obj. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: move another static array from .h to .cMartin Kaiser
Move the declaration of the rtw_cmd_callback array from rtw_cmd.h to rtw_cmd.c. The _RTW_CMD_C_ symbol is now obsolete and can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: move static array from .h to .cMartin Kaiser
Declaring a static array in a header file is likely to cause name conflicts if the declaration is pulled in multiple times. The rtl8188 driver protects the declaration of the wlancmds array in rtw_mlme_ext.h with ifdef _RTW_CMD_C_, which is defined only in rtw_cmd.c. It makes more sense to declare the array in the .c file. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove a constant variableMartin Kaiser
enqueue is always 0. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove unused function parameterMartin Kaiser
The struct adapter parameter of rtw_os_recvbuf_resource_alloc is not used. Remove it. While at it, use the same parameter name in the prototype and the function definition. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: replace switch-case with ifMartin Kaiser
This switch has only one case. Replace it with an if statement. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: make ffaddr2pipehdl staticMartin Kaiser
This function is used only inside usb_ops_linux.c. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove prototype for non-existing functionMartin Kaiser
There's no usb_read_port_cancel function in this driver. Remove its prototype. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove the last urb callback macrosMartin Kaiser
Both usb_read_port_complete and usb_write_port_complete have a regs parameter that is not used. When this parameter is removed, the functions can be used as urb completion callbacks directly. There's no need for the macros that strip the second parameter. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: comedi: cb_pcidas64: remove useless functionJiapeng Chong
Fix the following gcc warning: drivers/staging/comedi/drivers/cb_pcidas64.c:232:19: warning: unused function 'analog_trig_low_threshold_bits' [-Wunused-function]. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Link: https://lore.kernel.org/r/1617949425-105420-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8712: fix wrong function outputSergei Krainov
Return NULL from r8712_find_network() if no matched wlan_network was found. Code with a bug: while (plist != phead) { pnetwork = container_of(plist, struct wlan_network, list); plist = plist->next; if (!memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN)) break; } spin_unlock_irqrestore(&scanned_queue->lock, irqL); return pnetwork; In this code last processed pnetwork returned if list end was reached and no pnetwork matched test condition. Signed-off-by: Sergei Krainov <sergei.krainov.lkd@gmail.com> Link: https://lore.kernel.org/r/20210409124611.GA3981@test-VirtualBox Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused variable pwrctlPu Lehui
GCC reports the following warning with W=1: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:532:23: warning: variable 'pwrctl' set but not used [-Wunused-but-set-variable] 532 | struct pwrctrl_priv *pwrctl; | ^~~~~~ This variable is not used so remove it to fix the warning. Signed-off-by: Pu Lehui <pulehui@huawei.com> Link: https://lore.kernel.org/r/20210409045728.125852-1-pulehui@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: Remove unnecessary codeMuhammad Usama Anjum
The same code is executed when the condition "!show_errors" is true or false. Remove the if condition from here. The original intension of this condition was to not to report any error logs if condition was true. But this driver doesn't has those logs added. So this if condition can be removed. Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com> Addresses-Coverity: ("Same code execution") Link: https://lore.kernel.org/r/20210408204457.GA3079308@LEGION Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8712: remove (most of) enum WIFI_FRAME_TYPEChristophe JAILLET
The values defined in enum WIFI_FRAME_TYPE are the same the #define IEEE80211_FTYPE_xxx from <linux/ieee80211.h> Use these values to avoid code duplication. WIFI_QOS_DATA_TYPE is a bit more tricky and doesn't have a direct equivalence in <linux/ieee80211.h>. So leave this one as-is for now. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/e009a4ee6429a3f79742f9a912e3f6a650fb33ed.1617911201.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8712: remove enum WIFI_FRAME_SUBTYPEChristophe JAILLET
The values defined in enum WIFI_FRAME_SUBTYPE are the same the #define IEEE80211_STYPE_xxx from <linux/ieee80211.h> Use theses values to avoid code duplication. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/5a6fdcf0b5eb43c3d5511b5badd60bfac9389628.1617911201.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8712: remove struct rtl_ieee80211_ht_cap and ieee80211_ht_addt_infoChristophe JAILLET
struct 'ieee80211_ht_addt_info' is unused and can be removed. struct 'rtl_ieee80211_ht_cap' can be replaced by 'ieee80211_ht_cap' defined in <linux/ieee80211.h> which has the same layout. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/4291cb10744457cc12c89fc9fd414c37d732bc9d.1617911201.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused including <linux/version.h>Tian Tao
Remove including <linux/version.h> that don't need it. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com> Link: https://lore.kernel.org/r/1617869845-43046-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8712: add spaces around '+'Mitali Borkar
Added spaces around '+' to improve readability and adhere to linux kernel coding style. Reported by checkpatch Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com> Link: https://lore.kernel.org/r/YG7uLQLGmAh97xB1@kali Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: comedi: Kconfig: Fix COMEDI_TESTS_NI_ROUTES selectionsIan Abbott
The COMEDI_TESTS_NI_ROUTES option currently selects NI_ROUTING, which doesn't exist. It should be selecting COMEDI_NI_ROUTING. Fix it. Selecting COMEDI_TESTS_NI_ROUTES without COMEDI_NI_ROUTING resulted in the following build errors: ERROR: modpost: "ni_lookup_route_register" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_is_cmd_dest" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_find_route_source" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_get_valid_routes" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_count_valid_routes" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_sort_device_routes" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_assign_device_routes" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_find_route_set" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_route_set_has_source" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_route_to_register" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! Reported-by: kernel test robot <lkp@intel.com> Fixes: c82b130616e3 ("staging: comedi: Add Kconfig options to build unit test modules") Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20210409110844.148378-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8723bs: remove extra indentBryan Brattlof
There is an extra tab in the conditional statement. This removes it. Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com> Link: https://lore.kernel.org/r/20210407201842.80074-1-hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8712: removed extra blank lineMitali Borkar
Removed an extra blank line so that only one blank line is present in between two functions which separates them out. Reported by checkpatch Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com> Link: https://lore.kernel.org/r/YG5ppTlGhRp5WVgS@kali Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8712: matched alignment with open parenthesisMitali Borkar
Aligned arguments with open parenthesis to meet linux kernel coding style Reported by checkpatch Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com> Link: https://lore.kernel.org/r/YG5xV5q7ODTUTVK/@kali Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8723bs: hal: Remove camelcase in sdio_ops.cFabio M. De Francesco
Remove camelcase. Issue detected by checkpatch.pl. For now, change only names of static functions in order to not break the driver's code. Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210408070553.30363-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: comedi: Add Kconfig options to build unit test modulesIan Abbott
The comedi unit-test modules in "drivers/staging/comedi/drivers/tests/" are built if the `CONFIG_COMEDI_TESTS` option is enabled, but the comedi Kconfig file contains no code to enable the option. Add config options to allow each of the unit-test modules to be enabled individually. The "ni_route_tests" module depends on the "ni_routing" module, so select it if the "ni_route_tests" module is configured to be built. Cc: Spencer E. Olson <olsonse@umich.edu> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20210407181342.1117754-7-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: comedi: tests: example_test: Rename to 'comedi_example_test'Ian Abbott
Rename the "example_test" module to "comedi_example_test" to make the name more relevant to Comedi. Cc: Spencer E. Olson <olsonse@umich.edu> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20210407181342.1117754-6-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: comedi: tests: example_test: Declare functions staticIan Abbott
The "example_test" module contains a couple of functions with external linkage that are not called externally. Declare them `static`. Cc: Spencer E. Olson <olsonse@umich.edu> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20210407181342.1117754-5-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: comedi: tests: example_test: Reduce stack usageIan Abbott
Declare the `unit_tests` array in `unittest_enter()` `static` to reduce stack usage a bit. Cc: Spencer E. Olson <olsonse@umich.edu> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20210407181342.1117754-4-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: comedi: tests: ni_route_tests: Declare functions staticIan Abbott
The "ni_routes_test" module contains a bunch of functions with external linkage that are not called externally. Declare them `static`. Cc: Spencer E. Olson <olsonse@umich.edu> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20210407181342.1117754-3-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: comedi: tests: ni_routes_test: Reduce stack usageIan Abbott
Declare the `unit_tests` array in `ni_routes_unittest()` `static` to reduce stack usage. Cc: Spencer E. Olson <olsonse@umich.edu> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.kernel.org/r/20210407181342.1117754-2-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8188eu: make rtw_usb_if1_init return a statusMartin Kaiser
Return an error status instead of the struct adapter that was allocated and filled. This is more useful for the probe function, who calls rtw_usb_if1_init. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8188eu: make usb_dvobj_init return a statusMartin Kaiser
usb_dvobj_init populates a struct dvobj_priv and installs it as interface data of the usb interface. There's no point in returning this struct to the caller, it makes more sense to return an error status. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8188eu: rtw_usb_if1_init needs no dvobj parameterMartin Kaiser
rtw_usb_if1_init receives a pointer to struct usb_interface. dvobj is the interface data for this interface. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8188eu: remove unnecessary variableMartin Kaiser
We just want to check if rtw_usb_if1_init returns NULL, which means there was an error. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8188eu: clean up rtw_recv_entryMartin Kaiser
Change the return type to int, the function returns 0 or 1. Remove the goto statement, we're not doing any cleanup on exit. Summarize variable declarations and assignments. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8188eu: set pipe only onceMartin Kaiser
Set the pipe for reading or writing in usbctrl_vendorreq only once. There's no need to set it again for every retry. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8188eu: move defines into the .c fileMartin Kaiser
Some of the defines from usb_ops_linux.h are used only inside usb_ops_linux.c. Move them to the .c file. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8188eu: remove unused definesMartin Kaiser
Some defines in usb_ops_linux.h are not used by the rtl8188eu driver. Remove them. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8188eu: remove unnecessary bracketsMartin Kaiser
ESHUTDOWN is just a number, it needs no brackets. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: rtl8188eu: remove unused macrosMartin Kaiser
usb_ops_linux.h contains a couple of macros to make functions usable as urb completion callbacks. Most of them are unused and can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210407170531.29356-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-08staging: axis-fifo: remove redundant dev_err callMuhammad Usama Anjum
devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message. Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com> Link: https://lore.kernel.org/r/20210407161202.GA1505056@LEGION Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07staging: rtl8192u: Fix potential infinite loopColin Ian King
The for-loop iterates with a u8 loop counter i and compares this with the loop upper limit of riv->ieee80211->LinkDetectInfo.SlotNum that is a u16 type. There is a potential infinite loop if SlotNum is larger than the u8 loop counter. Fix this by making the loop counter the same type as SlotNum. Addresses-Coverity: ("Infinite loop") Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210407150308.496623-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07staging: rtl8723bs: remove unnecessary parenthesesFabio Aiuto
fix following post-commit checkpatch issue: CHECK: Unnecessary parentheses around 'padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X' 84: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:335: + if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && + !(padapter->securitypriv.binstallGrpkey)) Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/a45ec5059ea315db6509989f320340c1816068c5.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07staging: rtl8723bs: split long linesFabio Aiuto
fix following post-commit checkpatch hooks: WARNING: line length of 110 exceeds 100 columns 266: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:623: + pmlmepriv->cur_network.join_res) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) -- WARNING: line length of 102 exceeds 100 columns 468: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5234: + if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == link_count_limit) -- WARNING: line length of 124 exceeds 100 columns 543: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:335: + if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && !(padapter->securitypriv.binstallGrpkey)) -- WARNING: line length of 112 exceeds 100 columns 828: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1061: + if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_TX_STBC(pIE->data)) -- WARNING: line length of 113 exceeds 100 columns 836: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1067: + if (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_LDPC_CAP(pIE->data)) -- WARNING: line length of 112 exceeds 100 columns 844: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1073: + if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_RX_STBC(pIE->data)) -- WARNING: line length of 125 exceeds 100 columns 883: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1282: + rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_HT_OPERATION, &len, bssid->IELength - _FIXED_IE_LENGTH_); -- WARNING: line length of 101 exceeds 100 columns 904: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1305: + if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) /* not hidden ssid */ -- WARNING: line length of 129 exceeds 100 columns 953: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1345: + if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher) -- WARNING: line length of 113 exceeds 100 columns 1712: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2651: Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/814139162ef516bb07bb50876578b032573271ac.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07staging: rtl8723bs: fix comparison in if conditionFabio Aiuto
fix following post-commit checkpatch issue: WARNING: Comparisons should place the constant on the right side of the test 1833: FILE: drivers/staging/rtl8723bs/os_dep/mlme_linux.c:151: + if (NULL == buff) Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/b32610045cad3c385b236266d7a10665ed202150.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>