- Oct 31, 2014
-
-
Tapasweni Pathak authored
This patch introduces the use of the functions usb_endpoint_type and usb_endpoint_num. The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\)) + usb_endpoint_num(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Build Tested it. Signed-off-by:
Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Aya Mahfouz authored
This patch fixes the following the following checkpatch.pl warning: Possible unnecessary 'out of memory' message The warning was issued for the file lirc_zilog.c after changing two custom printk messages to dev_err. The dev_err calls were simply removed. Signed-off-by:
Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Tapasweni Pathak authored
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>
-
Gulsah Kose authored
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>
-
Gulsah Kose authored
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>
-
Gulsah Kose authored
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>
-
- Oct 30, 2014
-
-
Behan Webster authored
rtllib_association_req is a (large) inline function which defines 2 constant static arrays which aren't labelled as const. As a result clang complains with: non-constant static local variable in inline function may be different in different files [-Wstatic-local-in-inline] static u8 AironetIeOui[] = {0x00, 0x01, 0x66}; ^ The solution is making them "static const". However doing so requires dropping const when being used with struct octet_string. However the value is used in a const fashion thereafter, so no harm done. Signed-off-by:Behan Webster <behanw@converseincode.com> Suggested-by:
Arnd Bergmann <arnd@arndb.de> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Behan Webster authored
MgntQuery_MgntFrameTxRate is only used within rtllib_softmac.c, so it really should be static instead of extern. Since it is currently extern a warning is generated because a different function of the same name is defined staticlly in ieee80211_softmac.c Removing the incorrect extern declaration and defining the rtllib_softmac version of this routine static fixes the warning. Signed-off-by:
Behan Webster <behanw@converseincode.com> Suggested-by:
Arnd Bergmann <arnd@arndb.de> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Behan Webster authored
rtllib_probe_req is defined as "static inline" in rtllib_softmac.c however it is declared differently as "extern inline" in rtllib_softmac.h. Since it isn't used outside of the scope of rtllib_softmac, it makes sense to remove the incorrect declaration. Signed-off-by:
Behan Webster <behanw@converseincode.com> Suggested-by:
Arnd Bergmann <arnd@arndb.de> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Behan Webster authored
With compilers which follow the C99 standard (like modern versions of gcc and clang), "extern inline" does the opposite thing from older versions of gcc (emits code for an externally linkable version of the inline function). "static inline" does the intended behavior in all cases instead. Signed-off-by:
Behan Webster <behanw@converseincode.com> Suggested-by:
Arnd Bergmann <arnd@arndb.de> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Behan Webster authored
With compilers which follow the C99 standard (like modern versions of gcc and clang), "extern inline" does the opposite thing from older versions of gcc (emits code for an externally linkable version of the inline function). "static inline" does the intended behavior in both gcc and clang. Signed-off-by:
Behan Webster <behanw@converseincode.com> Suggested-by:
Arnd Bergmann <arnd@arndb.de> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mariusz Gorski authored
Fix "warning: missing initializer [-Wmissing-field-initializers]" by using designated struct initializers. Signed-off-by:
Mariusz Gorski <marius.gorski@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anton Saraev authored
Function lnet_selftest_structure_assertion is never used and can be removed. Signed-off-by:
Anton Saraev <antonysaraev@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Anton Saraev authored
Fix sparse warnings: symbol X was not declared. Should it be static? Some functions used only in files where they are declared. They can be static. Signed-off-by:
Anton Saraev <antonysaraev@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mikael Svantesson authored
Signed-off-by:
Mikael Svantesson <mikael@distopic.net> Acked-by:
Jason Cooper <jason@lakedaemon.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gulsah Kose authored
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>
-
anuvazhayil authored
Fixed the checkpatch.pl ERROR: "foo*bar" should be "foo *bar" Signed-off-by:
anuvazhayil <anuv.1994@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Vaishali Thakkar authored
This patch changes declaration of variable tmp from u16 to __le16 in order to remove following sparse warning at number of places: warning: incorrect type in assignment (different base types) expected unsigned short [unsigned] [usertype] tmp got restricted __le16 [usertype] <noident> Signed-off-by:Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Vaishali Thakkar authored
This patch reverts commit 45024646 ("Staging: rtl8192e: Fix incorrect type in assignment in rtl819x_BAProc.c") as it is changing code and introducing bug to skip the endian conversion. Here, tmp variable is used to hold the endian-corrected values and network-data requires fixed endianness. Signed-off-by:
Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Brian Vandre authored
This fixes the checkpatch.pl error: ERROR: space prohibited before that ',' Signed-off-by:
Brian Vandre <bvandre@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Malcolm Priestley authored
Signed-off-by:
Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-