aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-26staging: rtl8723bs: remove a couple of redundant initializationsColin Ian King2-2/+2
The initialization of PwrCfgCmd is redundant as the value is never read and it is being re-assigned to PwrSeqCmd[AryIdx] inside a loop, hence it can be removed. Also, the initialization of ie_ptr is redundant as the value is never read and it is being re-assigned in either path of an if statement, hence it can be removed too. Cleans up clang warnings: drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c:53:15: warning: Value stored to 'PwrCfgCmd' during its initialization is never read drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:374:7: warning: Value stored to 'ie_ptr' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-25Staging: rtl8723bs: Use !x instead of NULL comparisonShreeya Patel1-8/+8
If "x" is compared to NULL, use "!x" instead of it, so as to follow the kernel coding style. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-25Staging: rtl8723bs: Remove dead codeShreeya Patel1-15/+0
"oldmem==NULL;" The above bug under the ifdef code would have caused a GCC warning if it were ever compiled. Hence, remove the dead ifdefed code from the file. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-25Staging: rtl8723bs: Change names to conform to the kernel codeShreeya Patel1-357/+357
Change names of some variables and functions to conform to the kernel coding style. The changes include some removal of CamelCase warnings and renaming the variable and field names that encode their type (eg the pointers seem to start with p). Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-22staging: rtl8723bs: hal_com_phycfg: Remove unneeded semicolonsChristopher Díaz Riveros1-9/+7
Trivial fix removes unneeded semicolons after switch blocks. This issue was detected by using the Coccinelle software. Signed-off-by: Christopher Díaz Riveros <chrisadr@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10staging: rtl8723bs: Fix trailing semicolonLuis de Bethencourt1-1/+1
The trailing semicolon is an empty statement that does nothing. Removing it since it has no purpose. Signed-off-by: Luis de Bethencourt <luisbg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-10staging: rtl8723bs: Fix trailing semicolonLuis de Bethencourt1-1/+1
The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt <luisbg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09staging: rtl8723bs: Fix trailing semicolonLuis de Bethencourt1-1/+1
The trailing semicolon is an empty statement that does no operation. Removing it since it doesn't do anything. Signed-off-by: Luis de Bethencourt <luisbg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21Staging: rtl8723bs: Do not check for NOT NULL before kfree()Shreeya Patel1-3/+1
Do not check for NOT NULL before calling kfree because if the pointer is NULL, no action occurs. Done using the following semantic patch by coccinelle. @@ expression ptr; @@ - if (ptr != NULL) kfree(ptr); Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19Staging: rtl8723bs: Replace true with x and false with !xShreeya Patel1-16/+14
Replace true and false keywords with "x" and "!x" respectively to follow the kernel coding style. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-13Staging: rtl8723bs: Merge assignment with returnShreeya Patel1-35/+18
Merge the assignment and return statements to return the value directly. Done using the following semantic patch by coccinelle. @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Also, remove the variable declaration and some braces that became useless after the merge. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-13Merge tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds42-536/+478
Pull staging and IIO updates from Greg KH: "Here is the "big" staging and IIO driver update for 4.15-rc1. Lots and lots of little changes, almost all minor code cleanups as the Outreachy application process happened during this development cycle. Also happened was a lot of IIO driver activity, and the typec USB code moving out of staging to drivers/usb (same commits are in the USB tree on a persistent branch to not cause merge issues.) Overall, it's a wash, I think we added a few hundred more lines than removed, but really only a few thousand were modified at all. All of these have been in linux-next for a while. There might be a merge issue with Al's vfs tree in the pi433 driver (take his changes, they are always better), and the media tree with some of the odd atomisp cleanups (take the media tree's version)" * tag 'staging-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (507 commits) staging: lustre: add SPDX identifiers to all lustre files staging: greybus: Remove redundant license text staging: greybus: add SPDX identifiers to all greybus driver files staging: ccree: simplify ioread/iowrite staging: ccree: simplify registers access staging: ccree: simplify error handling logic staging: ccree: remove dead code staging: ccree: handle limiting of DMA masks staging: ccree: copy IV to DMAable memory staging: fbtft: remove redundant initialization of buf staging: sm750fb: Fix parameter mistake in poke32 staging: wilc1000: Fix bssid buffer offset in Txq staging: fbtft: fb_ssd1331: fix mirrored display staging: android: Fix checkpatch.pl error staging: greybus: loopback: convert loopback to use generic async operations staging: greybus: operation: add private data with get/set accessors staging: greybus: loopback: Fix iteration count on async path staging: greybus: loopback: Hold per-connection mutex across operations staging: greybus/loopback: use ktime_get() for time intervals staging: fsl-dpaa2/eth: Extra headroom in RX buffers ...
2017-11-03staging: rtl8723bs: Convert timers to use timer_setup()Kees Cook13-74/+69
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This performs some refactoring to remove needless wrapper functions, and adds a pointer back to the desired adapter. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Shreeya Patel <shreeya.patel23498@gmail.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Himanshu Jha <himanshujha199640@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: Derek Robson <robsonde@gmail.com> Cc: Harsha Sharma <harshasharmaiitr@gmail.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> Cc: Johannes Berg <johannes.berg@intel.com> Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-03staging: rtl8723bs: remove unused variablesArnd Bergmann1-4/+0
A cleanup patch removed the only user of two local variables: drivers/staging/rtl8723bs/hal/hal_btcoex.c: In function 'hal_btcoex_Initialize': drivers/staging/rtl8723bs/hal/hal_btcoex.c:1415:5: error: unused variable 'ret2' [-Werror=unused-variable] drivers/staging/rtl8723bs/hal/hal_btcoex.c:1414:5: error: unused variable 'ret1' [-Werror=unused-variable] This removes the declarations as well. Fixes: 95b3b4238581 ("staging: rtl8723bs: remove ternary operators in assignmet statments") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-03staging: rtl8723bs: Fix space before '[' error.Arvind Yadav1-3/+3
Fix checkpatch.pl error: ERROR: space prohibited before open square bracket '['. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-03staging: rtl8723bs: Fix checkpatch.pl errorSidong Yang1-3/+3
Replaces spaces to tabs for indent. Signed-off-by: Sidong Yang <realwakka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman5-0/+5
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: hide "nolinked power save" info when not debuggingIcenowy Zheng1-2/+2
Currently the rtl8723bs driver will print "nolinked power save enter" and "nolinked power save leave" per minute if it's not connected to any network. These messages are meaningless and annoying to regular users. Hide them when it's not debugging. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: rtw_mlme_ext: mark expected switch fall-throughGustavo A. R. Silva1-1/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: Fix typos in printkMasanari Iida2-2/+2
This patch fixes typos found in rtl8723bs_xmit.c and odm_DIG.c. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: remove implicit int->bool conversionsAishwarya Pant1-4/+9
Implicit type conversions are bad; they hinder readability of code and have potential to cause bugs. Here the variable wait_ack is always supplied a bool value while in function declarations it is defined as an int type. Fix it by defining wait_ack a bool type in all usages. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: remove useless variable rtw_AcceptAddbaReqAastha Gupta2-3/+2
rtw_AcceptAddbaReq is a static variable, it is set once and never modified. It is referenced only once, to assign its value to a member of struct registry_priv. Remove the variable, and move the meaningful part of the comment near the declaration of the relevant field of struct registry_priv. Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: rename camelcase bAcceptAddbaReqAastha Gupta7-11/+13
bAcceptAddbaReq uses camelcase which is not according to Linux kernel coding style. There is a 'bAcceptAddbaReq' field both in struct mlme_ext_info and in struct registry_priv.Rename both of them. Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: convert type to boolAastha Gupta2-2/+2
Here the variable bips_processing is always supplied a bool value while inside struct definition it is defined as an uint type. Fix it by defining bips_processing a bool type. Also a restore_iqk_rst = (pwrpriv->bips_processing == true) is same as restore_iqk_rst = pwrpriv->bips_processing Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: Change type to boolAastha Gupta1-4/+4
res and Match have only either 'true' or 'false' values. So making them of type bool for better readability of code. Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: remove unused variablesAastha Gupta1-4/+0
It seems these two operations are just dead code. The values of these variables are not used subsequently. Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: remove ternary operators in assignmet statmentsAastha Gupta6-13/+11
Remove unnecessary ternary operators in assignments statments. This patch is with the help of following Coccinelle script: @@ expression a, b, c; binary operator op = {==, !=, <=, >=, <, >, &&, ||}; @@ c = - (a op b) ? true : false + a op b Signed-off-by: Aastha Gupta <aastha.gupta4104@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8723bs: Add space after ','Harsha Sharma1-6/+6
Space is required after ',' according to linux-kernel coding style. Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18Staging: rtl8723bs: core: rtw_cmd: Remove cast to pointer types in kfreeSrishti Sharma1-30/+30
The cast to pointer types in kfree is not needed and can be dropped. This was done using the following semantic patch by coccinelle, except kfree((unsigned char*) pcmd->parmbuf) which was transformed by hand because coccinelle didn't have enough type information. @r@ type T,P; T* x; @@ kfree( -(P *) x ) Signed-off-by: Srishti Sharma <srishtishar@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-09Merge 4.14-rc4 into staging-nextGreg Kroah-Hartman2-2/+3
We want the staging/iio fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03staging: rtl8723bs: use ARRAY_SIZEJérémy Lefaure8-48/+68
Using the ARRAY_SIZE macro improves the readability of the code. Also, it is not always useful to use a variable to store this constant calculated at compile time. Found with Coccinelle with the following semantic patch: @r depends on (org || report)@ type T; T[] E; position p; @@ ( (sizeof(E)@p /sizeof(*E)) | (sizeof(E)@p /sizeof(E[...])) | (sizeof(E)@p /sizeof(T)) ) Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03Staging: rtl8723bs: Remove unnecessary commentsShreeya Patel5-15/+0
Remove unnecessary comments which are there to explain why call to memset is in comments. Both of the comments are not needed as they are not very useful. Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-26Staging: rtl8723bs: core: Remove boolean comparisonGeorgiana Chelu1-32/+32
Remove comparison to bool in order to improve the clearness of the code. Issue found using coccinelle script. Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-22staging: rtl8723bs: avoid null pointer dereference on pmlmeprivColin Ian King1-2/+1
There is a check to see if pmlmepriv is null before vfree'ing pmlmepriv->free_bss_buf hence implying pmlmepriv could potenially be null. However, a previous call to rtw_free_mlme_priv_ie_data can also dereference pmlmepriv, so move this call so that it is only called if pmlmepriv non-null. Detected by CoverityScan, CID#1077739 ("Dereference before null check") Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-22staging: rtl8723bs: add missing range check on idColin Ian King1-0/+2
The value of the u8 id needs to be upper bounds checked to ensure the cam_cache array on the adapter dvobj is not indexed outside of the allowed range of 0..TOTAL_CAM_ENTRY-1. This can currently occur if id is >= TOTAL_CAM_ENTRY when calling write_cam_from_cache. Fix this by adding an upper range check. Detected by CoverityScan, CID#1428464 ("Use of untrusted scalar value") Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18Staging: rtl8723bs/os_dep: Remove typecast in kfreeMeghana Madhyastha1-1/+1
Remove typecast of pointer in kfree((u8 *)pdvobj) as it is not needed. Found using the following Coccinelle semantic patch: @@ identifier x; type t; @@ -kfree((t *)x) +kfree(x) Signed-off-by: Meghana Madhyastha <meghana.madhyastha@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-18staging: rtl8723bs: Merge assignment with returnHarsha Sharma1-16/+4
Merge assignment with return statement to directly return the value. Done using following coccinelle semantic patch @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Change coding style to (foo *bar)Harsha Sharma1-4/+4
This coding style (foo *bar) is more common for the kernel code. Change foo* bar to foo *bar. Change foo * bar to foo *bar. Change (foo*) to (foo *). Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Remove unnecessary spacesHarsha Sharma1-15/+15
Space between function name and open parentheses '(' is prohibited. Space is required around most binary operators '=', '==', '+=', '<', ':', '+', '-' Space required before '&', '*' Space is required after ',', ';' Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Remove unnecessary blank linesHarsha Sharma1-9/+0
Blank lines aren't necessary after an open brace and before a close brace Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Remove unneccesary braces and change position of open braceHarsha Sharma1-44/+19
Follow linux-kernel code style for conditional statements Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Add space between concatenated stringsHarsha Sharma1-25/+25
Use spaces between concatenated strings Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Remove unnecessary spaces at the start of lineHarsha Sharma1-1/+1
No spaces at the start of a line Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Add spaces around '?', '==', '||', '!='Harsha Sharma1-6/+6
Use spaces around most binary operators Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Add spaces around '+', '|', '*'Harsha Sharma1-6/+6
Use one space around most binary operators Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Add spaces around '='Harsha Sharma1-10/+10
Use one space around (on each side of) '=' operator Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Do not initialise statics to 0Harsha Sharma1-24/+24
Static variables are initialised to 0 by gcc Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Remove unnecessary rtw_z?malloc castsJoe Perches13-97/+94
These functions now return void * and no longer need casts. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: convert private allocation functions to return void *Joe Perches2-12/+7
Using char * for a return from allocation functions means the code has to cast generic allocations to specific types. Allow the compiler to not need casts on the allocations. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging: rtl8723bs: Convert LIST_CONTAINOR to use kernel container_ofJoe Perches3-9/+9
These are similar macros so use the normal kernel one. As well, there are odd games being played with casting a plist to a union recv_frame by using LIST_CONTAINOR. Just use a direct cast to union recv_frame instead. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>