summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu
AgeCommit message (Collapse)Author
2015-02-07staging: rtl8188eu: core: switch with redundant casesNicholas Mc Guire
A few redundant switch cases as well as a redundant if/else within one of the cases was consolidated to a single call. The cases are intentionally retained for documentation purposes. case WIFI_REASSOCREQ,WIFI_PROBEREQ,WIFI_BEACON,WIFI_ACTION all have the same effect - notably the also for WIFI_PROBEREQ where the if/else is executing the same function. These redundant cases could all be dropped and consolidated into the default but probably it is better for documentation/readability to leave them in the switch/case explicitly. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: rtl8188eu: odm: conditional setting with no effectNicholas Mc Guire
The if and the else branch code are identical - so the condition has no effect on the effective code - this patch removes the condition and the duplicated code. Due to this being a fall-through-if here - the first if condition has no effect either - so it also can be removed. struct mlme_priv is thus also no longer needed here. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: rtl8188eu: odm: condition with no effectNicholas Mc Guire
The if and the else branch code are identical - so the condition has no effect on the effective code - this patch removes the condition and the duplicated code. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07staging: rtl8188eu: use msecs_to_jiffies for conversionsNicholas Mc Guire
This is only an API consolidation to make things more readable. Instances of var * HZ / 1000 are replaced by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: rtl8188eu: core: rtw_wlan_util.c: Fix for NULL dereferenceKumar Amit Mehta
In rtw_check_bcn_info(), check the return value of kzalloc() before dereferencing it, to avoid NULL pointer dereference. Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: rtl8188eu: core: rtw_mlme_ext.c: Remove unused functionRickard Strandqvist
Remove the function NULL_hdl() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: rtl8188eu: os_dep: usb_ops_linux.c: Remove unused functionRickard Strandqvist
Remove the function usb_writeN() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: rtl8188eu: hal: rtl8188e_hal_init.c: Remove unused functionRickard Strandqvist
Remove the function GetEEPROMSize8188E() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: rtl8188eu: hal: rtl8188e_cmd.c: Remove unused functionRickard Strandqvist
Remove the function rtl8188e_set_rssi_cmd() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17staging: rtl8188eu: Fixed a space coding style issue.Gangadhar Vukkesala
Fixed a space coding style issue which was found when running checkpatch.pl script on rtw_ap.c. Signed-off-by: Gangadhar Vukkesala <gangs.freelancer@gmail.com> Reviewed-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17Staging: rtl8188eu: {core, hal, include}: Removed inline functionAbel Moyo
Removed inline function get_my_bssid and open coded all its references Signed-off-by: Abel Moyo <abelmoyo.ab@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: rtl8188eu: hal: hal_intf.c: Cleaning up functions that are not used ↵Rickard Strandqvist
anywhere Removes some functions that are not used anywhere. rtw_hal_interrupt_handler() rtw_hal_sreset_get_wifi_status() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging: rtl8188eu: usb_dvobj_init(): A NULL pointer check for ↵Jes Sorensen
usb_host_endpoints makes no sense struct usb_host_interface points to an array of struct usb_host_endpoints - it makes no sense to do a NULL pointer check for each pointer. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02staging:drivers:staging:rtl8188eu:hal:rtl8188e_hal_init.c: Added a blank ↵Anjana Sasindran
line after declaration This patch fix a checkpatch.pl warning WARNING:Missing blank line after declaration Signed-off-by: Anjana Sasindran <anjanasasindran123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02Merge 3.18-rc7 into staging-work.Greg Kroah-Hartman
We want those staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-27staging: r8188eu: Add new device ID for DLink GO-USB-N150Larry Finger
The DLink GO-USB-N150 with revision B1 uses this driver. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26rtl8188eu: Fix a typo in rtw_led.*Krzysztof Konopko
A rather obvious typo in one of the identifier has been found. This patch fixes the typo and ensures any lines changed do not exceed 80 characters as indicated by scripts/checkpatch.pl Signed-off-by: Krzysztof Konopko <kris@konagma.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26rtl8188eu: Fix FSF_MAILING_ADDRESS in rtw_led.*Krzysztof Konopko
rtw_led.* files include Free Software Foundation's mailing address in the sample GPL notice. This is not desired and picked when running scripts/checkpatch.pl. Signed-off-by: Krzysztof Konopko <kris@konagma.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26rtl8188eu: Simplify rtw_endofpktfile() in xmit_linux.cKrzysztof Konopko
scripts/checkpatch.pl reports a coding style problem in xmit_linux.c WARNING:BRACES: braces {} are not necessary for single statement blocks #61852: FILE: rtl8188eu/os_dep/xmit_linux.c:70: This patch removes unnecessary braces and simplifies the function to a single return statement. Signed-off-by: Krzysztof Konopko <kris@konagma.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26staging: r8188eu: Fix scheduling while atomic error introduced in commit ↵Larry Finger
fadbe0cd In commit fadbe0cd5292851608e2e01b91d9295fa287b9fe entitled "staging: rtl8188eu:Remove rtw_zmalloc(), wrapper for kzalloc()", the author failed to note that the original code in the wrapper tested whether the caller could sleep, and set the flags argument to kzalloc() appropriately. After the patch, GFP_KERNEL is used unconditionally. Unfortunately, several of the routines may be entered from an interrupt routine and generate a BUG splat for every such call. Routine rtw_sitesurvey_cmd() is used in the example below: BUG: sleeping function called from invalid context at mm/slub.c:1240 in_atomic(): 1, irqs_disabled(): 0, pid: 756, name: wpa_supplicant INFO: lockdep is turned off. CPU: 2 PID: 756 Comm: wpa_supplicant Tainted: G WC O 3.18.0-rc4+ #34 Hardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.20 04/17/2014 ffffc90005557000 ffff880216fafaa8 ffffffff816b0bbf 0000000000000000 ffff8800c3b58000 ffff880216fafac8 ffffffff8107af77 0000000000000001 0000000000000010 ffff880216fafb18 ffffffff811b06ce 0000000000000000 Call Trace: [<ffffffff816b0bbf>] dump_stack+0x4e/0x71 [<ffffffff8107af77>] __might_sleep+0xf7/0x120 [<ffffffff811b06ce>] kmem_cache_alloc_trace+0x4e/0x1f0 [<ffffffffa0888226>] ? rtw_sitesurvey_cmd+0x56/0x2a0 [r8188eu] [<ffffffffa0888226>] rtw_sitesurvey_cmd+0x56/0x2a0 [r8188eu] [<ffffffffa088f00d>] rtw_do_join+0x22d/0x370 [r8188eu] [<ffffffffa088f6e8>] rtw_set_802_11_ssid+0x218/0x3d0 [r8188eu] [<ffffffffa08c3ca5>] rtw_wx_set_essid+0x1e5/0x410 [r8188eu] [<ffffffffa08c3ac0>] ? rtw_wx_get_rate+0x50/0x50 [r8188eu] [<ffffffff816938f1>] ioctl_standard_iw_point+0x151/0x3f0 [<ffffffff81693d52>] ioctl_standard_call+0xb2/0xe0 [<ffffffff81597df7>] ? rtnl_lock+0x17/0x20 [<ffffffff816945a0>] ? iw_handler_get_private+0x70/0x70 [<ffffffff81693ca0>] ? call_commit_handler+0x40/0x40 [<ffffffff81693256>] wireless_process_ioctl+0x176/0x1c0 [<ffffffff81693e79>] wext_handle_ioctl+0x69/0xc0 [<ffffffff8159fe79>] dev_ioctl+0x309/0x5e0 [<ffffffff810be9c7>] ? call_rcu+0x17/0x20 [<ffffffff8156a472>] sock_ioctl+0x142/0x2e0 [<ffffffff811e0c70>] do_vfs_ioctl+0x300/0x520 [<ffffffff81101514>] ? __audit_syscall_entry+0xb4/0x110 [<ffffffff81101514>] ? __audit_syscall_entry+0xb4/0x110 [<ffffffff810102bc>] ? do_audit_syscall_entry+0x6c/0x70 [<ffffffff811e0f11>] SyS_ioctl+0x81/0xa0 [<ffffffff816ba1d2>] system_call_fastpath+0x12/0x17 Additional routines that generate this BUG are rtw_joinbss_cmd(), rtw_dynamic_chk_wk_cmd(), rtw_lps_ctrl_wk_cmd(), rtw_rpt_timer_cfg_cmd(), rtw_ps_cmd(), report_survey_event(), report_join_res(), survey_timer_hdl(), and rtw_check_bcn_info(). Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07staging: rtl8188eu: unneeded NULL checkSudip Mukherjee
before these NULL checks we are already checking it for NULL, and if it is NULL then we are jumping to the error label and handling the error before returning. So we can reach this part of the code only if the variable is known to be not NULL, and if we already know that it is not NULL, then no need to check it again. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07staging: rtl8188eu: unneeded return variableSudip Mukherjee
a variable is declared and initialized and then never updated in the function.This default value is then used as the return from the function. So removed that unneeded return variable and returning that default initial value directly. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03staging: rtl8188eu: Fix coding style space related ERROR problemsJia He
This fixes space related ERROR reports by checkpatch.pl Generated by $ git ls-files "drivers/staging/rtl8188eu/*.[ch]" | \ xargs ./scripts/checkpatch.pl -f --fix-inplace --strict --types=SPACING Already checked by text comparasion $git diff -w and binary comparasion of r8188eu.ko $objdiff diff <old_commit> <new_commit> Signed-off-by: Jia He <hejianet@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03staging: r8188eu: cleanups in rtw_android_set_block()Dan Carpenter
1) We can tighten up the code a little by returning directly and it makes the code more future proof and easier to read. 2) "free" is a better name than "exit". 3) sizeof(priv_cmd) is shorter and more clear than sizeof(struct android_wifi_priv_cmd). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03staging: r8188eu: get a string from the user correctlyDan Carpenter
The original code had two bugs: 1) It didn't check if the string was zero length so it could oops when it tried to dereference the ZERO_SIZE_PTR. 2) It didn't enforce that the string was NUL terminated. It was also messy as pants. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03Staging: rtl8188eu: Use put_unaligned_le32Vaishali Thakkar
This patch introduces the use of function put_unaligned_le32. This is done using Coccinelle and semantic patch used is as follows: @@ identifier tmp; expression ptr; expression y,e; type T; @@ - tmp = cpu_to_le32(y); <+... when != tmp - memcpy(ptr, (T)&tmp, ...); + put_unaligned_le32(y,ptr); ...+> ? tmp = e @@ type T; identifier tmp; @@ - T tmp; ...when != tmp Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03Staging: rtl8188eu: rtw_pwrctrl: removed space before semicolon.Surya Seetharaman
WARNING: space prohibited before semicolon Signed-off-by: Surya Seetharaman<suryaseetharaman.9@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03Staging: rtl8188eu: rtw_pwrctrl: removed a checkpatch warning.Surya Seetharaman
WARNING: void function return statements are not generally useful Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03Staging: rtl8188eu: rtw_pwrctrl: fixed checkpatch warning.Surya Seetharaman
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03staging: rtl8188eu: Remove unnecessary else after returnDilek Uzulmez
This patch fixes checkpatch.pl warning in files of rtl8188eu WARNING: else is not generally useful after a break or return Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rtl8188eu: core: Improve cleanup codeTapasweni Pathak
The code is restructured such that kfree(efuseTbl) is not called if the allocation of efuseTbl and such that kfree(eFuseWord) is not called if the allocation of eFuseWord has failed. To accomplish this a new label eFuseWord_failed has been added. Suggested by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rtl8188eu: core: Remove null check before kfreeTapasweni Pathak
kfree on NULL pointer is a no-op. This patch uses the following semantic patch to find such an instance where NULL check is present before kfree. // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl>smpl> Build tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rt18188eu: Remove useless cast on NULLTapasweni Pathak
Cast on NULL to a pointer type is not required. This patch removes NULL casted to some pointer type. The sematic patch used is: @r@ type T; @@ - (T *)NULL + NULL Build tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rtl8188eu: Remove double testTapasweni Pathak
Removed the duplicate test on memcmp(pIE->data, BROADCOM_OUI2, 3). The semantic that find this problem is // <smpl> @@ expression E; @@ ( * E || ... || E | * E && ... && E ) // </smpl> Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rtl8188eu: os_dep: Remove useless cast on void pointerTapasweni Pathak
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Build tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rtl8188eu: hal: Remove useless cast on void pointerTapasweni Pathak
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Build tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rtl8188eu: core: Remove useless cast on void pointerTapasweni Pathak
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Build tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rtl8188eu: os_dep: Used min_t instead of minGulsah Kose
This patch fixes this checkpatch.pl warning: WARNING: min() should probably be min_t(int, req->essid_len, IW_ESSID_MAX_SIZE) by using this coccinelle script: @r@ identifier i; expression e1, e2; type t1, t2; @@ t1 i = - min((t2)e1, e2); + min_t(t2, e1, e2); Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rtl8188eu: os_dep: Removed unnecessary return.Gulsah Kose
This patch fixes WARNING: void function return statements are not generally useful checkpatch.pl warning in usb_intf.c by using this coccinelle script @r@ identifier i; @@ void i(...) { ... -return; } Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rtl8188eu: core: Removed unnecessary return keyword.Gulsah Kose
This patch fixes WARNING: void function return statements are not generally useful checkpatch.pl warning in rtw_efuse.c by using this coccinelle script @r@ identifier i; @@ void i(...) { ... -return; } Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: rtl8188eu: core: Removed unnecessary parenthesis.Gulsah Kose
This patch removes unnecessarry parenthesis in rtw_security.c by using this coccinelle script: @r1@ expression e1,e2; @@ if - ((e1 == e2)) + (e1 == e2) {...} Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29staging: rtl8188eu: hal: space requiredPaul McQuade
ERROR: space required before the open brace '{' Signed-off-by: Paul McQuade <paulmcquad@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28staging: rtl8188eu: core: Remove redundant memset before memcpyTapasweni Pathak
The region set by the call to memset, immediately overwritten by the subsequent call to memcpy makes the memset redundant. This patch removes the redundant memset before memcpy using the following coccinelle script: @@ expression e1,e2,e3,e4; @@ - memset(e1,e2,e3); memcpy(e1,e4,e3); Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27staging: rtl8188eu: os_dep: Remove null check before kfreeTapasweni Pathak
This patch is generated by the following semantic patch // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27staging: remove unneeded parentheses around the right hand side of an assignmentJiayi Ye
In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses are not needed. The Coccinelle semantic patch was used to find cases. @r@ identifier x; expression e1, e2; @@ - x = (e1 << e2); + x = e1 << e2; Signed-off-by: Jiayi Ye <yejiayily@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27staging: rtl8188eu: core: fix null dereference on exit path in rtw_mlme.cJiayi Ye
If adapter is null, null dereference may occur. This patch fixes it. The following Coccinelle semantic patch was used to find the case. @@ expression E, E1; identifier f; statement S1,S2,S3; @@ * if (E == NULL) { ... when != if (E == NULL) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 Signed-off-by: Jiayi Ye <yejiayily@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23staging: rtl8188eu: os_dep: Replaced kzalloc and memcpy with kmemdupTapasweni Pathak
Replaced calls to kzalloc followed by memcpy with a single call to kmemdup. Patch found using coccicheck. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23staging: rtl8188eu: os_dep: Remove useless cast on kzallocTapasweni Pathak
Casting rhe return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language, as mentioned in Documentation/CodingStyle, Chap 14. Removed the cast on kzalloc return value. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23staging: rtl8188eu: core: fixed msleep < 20ms can sleep for up to 20ms ↵Jiayi Ye
warning in rtw_efuse.c This patch fixes following checkpatch.pl warning: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt Signed-off-by: Jiayi Ye <yejiayily@gmail.comi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20Staging: rtl8188eu: core: Remove variable that is not very useful.Heena Sirwani
The following patch removes a variable which is not very useful using coccinelle. The following semaintic patch was used: @@ identifier ret; @@ -int ret = 0; ... when != ret when strict -return ret; +return 0; Signed-off-by: Heena Sirwani <heenasirwani@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>