Author: Andreea-Cristina Bernat <bernat.ada@gmail.com> The “rcu_dereference()” calls are used directly in conditions. Since their return values are never dereferenced it is recommended to use “rcu_access_pointer()” instead of “rcu_dereference()”. Therefore, this patch makes the replacements. The following Coccinelle semantic patch was used: @@ @@ ( if( ()) {…} | while( ()) {…} ) Signed-off-by: Andreea-Cristina Bernat …
Category: Linux
Aug 17 2014
staging: comedi: dt3000: remove unneeded variable
Author: Chase Southwood <chase.southwood@gmail.com> Coccinelle (using scripts/coccinelle/tests/doublebitand.cocci) found this assignment because 0 is or’d twice. Upon inspection, I found that the variable “mode” is only assigned once and used once, and thus can be cleanly removed. This patch plugs its value straight into writew() and then removes the variable. Signed-off-by: Chase Southwood Reviewed-by: Ian Abbott …
Aug 17 2014
isdn/bas_gigaset: use USB API functions rather than constants
Author: Himangi Saraogi <himangi774@gmail.com> This patch introduces the use of the function 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) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Acked-by: Tilman Schmidt Signed-off-by: David S. Miller — drivers/isdn/gigaset/bas-gigaset.c | 2 +- 1 file …
Aug 15 2014
isdn/gigaset: use USB API functions rather than constants
Author: Himangi Saraogi <himangi774@gmail.com> This patch introduces the use of the function 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) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Acked-by: Tilman Schmidt Signed-off-by: David S. Miller — drivers/isdn/gigaset/usb-gigaset.c | 2 +- 1 file …
Aug 15 2014
[media] rc-core: use USB API functions rather than constants
Author: Himangi Saraogi <himangi774@gmail.com> This patch introduces the use of !usb_endpoint_dir_in(epd) and !usb_endpoint_xfer_int(epd). The Coccinelle semantic patch that makes these changes is as follows: – ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) != – \(USB_DIR_IN\|0x80\)) + !usb_endpoint_dir_in(epd) @@ struct usb_endpoint_descriptor *epd; @@ – ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) != – \(USB_ENDPOINT_XFER_INT\|3\)) + !usb_endpoint_xfer_int(epd) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Signed-off-by: Mauro …
Aug 15 2014
[media] radio-si470x-usb: use USB API functions rather than constants
Author: Himangi Saraogi <himangi774@gmail.com> This patch introduces the use of the function usb_endpoint_is_int_in. The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ – ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) == – \(USB_DIR_IN\|0x80\)) + usb_endpoint_dir_in(epd) @@ struct usb_endpoint_descriptor *epd; @@ – ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) == – \(USB_ENDPOINT_XFER_INT\|3\)) + usb_endpoint_xfer_int(epd) @@ struct usb_endpoint_descriptor …
Aug 15 2014
[media] media/rc/imon.c: use USB API functions rather than constants
Author: Himangi Saraogi <himangi774@gmail.com> This patch introduces the use of the function usb_endpoint_type. The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ – (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Signed-off-by: Mauro Carvalho Chehab — drivers/media/rc/imon.c | 2 +- 1 file changed, 1 insertion(+), …
Aug 14 2014
Drivers: ide: Remove typedef atiixp_ide_timing
Author: Himangi Saraogi <himangi774@gmail.com> The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for atiixp_ide_timing. The following Coccinelle semantic patch detects the case: @tn1@ type td; @@ typedef struct { … } td; @script:python tf@ td
Aug 13 2014
atmel_cs: Remove typedef local_info_t
Author: Himangi Saraogi <himangi774@gmail.com> The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for local_info_t. Also, the name of the struct is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case: @tn@ identifier …
Aug 13 2014
Bluetooth: Remove typedef bluecard_info_t
Author: Himangi Saraogi <himangi774@gmail.com> The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for bluecard_info_t. Also, the name of the struct is changed to drop the _t, to make the name look less typedef-like. The following Coccinelle semantic patch detects the case: @tn@ identifier …