Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch introduces the use of function put_unaligned_le16. This is done using Coccinelle and semantic patch used is as follows: @@ identifier tmp; expression ptr; expression y,e; type T; @@ – tmp = cpu_to_le16(y); ? tmp = e @@ type T; identifier tmp; @@ – T tmp; …when != tmp Here, …
Category: Linux
Oct 31 2014
Staging: lustre: Use put_unaligned_le64
Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch introduces the use of function put_unaligned_le64. This is done using Coccinelle and semantic patch used is as follows: @@ identifier tmp; expression ptr; expression y,e; type T; @@ – tmp = cpu_to_le64(y); ? tmp = e @@ type T; identifier tmp; @@ – T tmp; …when != tmp Signed-off-by: …
Oct 30 2014
staging: emxx_udc: use USB API functions rather than constants
Author: Tapasweni Pathak <tapaswenipathak@gmail.com> 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 Signed-off-by: …
Oct 30 2014
staging: rtl8188eu: os_dep: Used min_t instead of min
Author: Gulsah Kose <gulsah.1004@gmail.com> 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 Reviewed-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | …
Oct 30 2014
staging: rtl8188eu: os_dep: Removed unnecessary return.
Author: Gulsah Kose <gulsah.1004@gmail.com> 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 Reviewed-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/os_dep/usb_intf.c | 2 — 1 file changed, 2 deletions(-) …
Oct 29 2014
staging: rtl8188eu: core: Removed unnecessary parenthesis.
Author: Gulsah Kose <gulsah.1004@gmail.com> 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 Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/core/rtw_security.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-) diff –git a/drivers/staging/rtl8188eu/core/rtw_security.c …
Oct 29 2014
usb: gadget: fix ptr_ret.cocci warnings
Author: Fengguang Wu <fengguang.wu@intel.com> drivers/usb/gadget/udc/r8a66597-udc.c:1849:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(…)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Fengguang Wu Signed-off-by: Felipe Balbi — drivers/usb/gadget/udc/r8a66597-udc.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-) diff –git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c index b63a527..be31b57 100644 — a/drivers/usb/gadget/udc/r8a66597-udc.c +++ b/drivers/usb/gadget/udc/r8a66597-udc.c @@ -1845,10 +1845,7 @@ static …
Oct 29 2014
staging: rtl8188eu: core: Removed unnecessary return keyword.
Author: Gulsah Kose <gulsah.1004@gmail.com> 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 Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/core/rtw_efuse.c | 1 – 1 file changed, 1 deletion(-) diff –git a/drivers/staging/rtl8188eu/core/rtw_efuse.c …
Oct 28 2014
staging: ft1000: Remove curly braces for single statement blocks
Author: Ebru Akagunduz <ebru.akagunduz@gmail.com> This patch removes curly braces for single statement blocks using following coccinelle script: @@ expression e1; @@ – if (e1) { + if (e1) return …; – } Signed-off-by: Ebru Akagunduz Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 12 ++++——– 1 file changed, 4 insertions(+), 8 deletions(-) diff …
Oct 26 2014
staging: rtl8723au: Remove duplicated argument to ||
Author: Roberta Dobrescu <roberta.dobrescu@gmail.com> This patch removes duplicated argument to ||, fixing the following warning detected using coccinelle tool: duplicated argument to && or ||. Signed-off-by: Roberta Dobrescu Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8723au/core/rtw_wlan_util.c | 1 – 1 file changed, 1 deletion(-) diff –git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c index bc63d6f..69d9e0f 100644 — a/drivers/staging/rtl8723au/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c @@ -1322,7 …