Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH] HID: roccat: Drop cast
@ 2014-06-26 17:28 Himangi Saraogi
  2014-06-26 17:38 ` Joe Perches
  2014-06-26 22:35 ` Jiri Kosina
  0 siblings, 2 replies; 9+ messages in thread
From: Himangi Saraogi @ 2014-06-26 17:28 UTC (permalink / raw)
  To: Stefan Achatz, Jiri Kosina, linux-input, linux-kernel; +Cc: julia.lawall

This patch removes the cast on data of type void* as it is not needed.
The following Coccinelle semantic patch was used for making the change:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
---
 drivers/hid/hid-roccat-lua.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-roccat-lua.c b/drivers/hid/hid-roccat-lua.c
index 6adc0fa..65e2e76 100644
--- a/drivers/hid/hid-roccat-lua.c
+++ b/drivers/hid/hid-roccat-lua.c
@@ -61,7 +61,7 @@ static ssize_t lua_sysfs_write(struct file *fp, struct kobject *kobj,
 		return -EINVAL;
 
 	mutex_lock(&lua->lua_lock);
-	retval = roccat_common2_send(usb_dev, command, (void *)buf, real_size);
+	retval = roccat_common2_send(usb_dev, command, buf, real_size);
 	mutex_unlock(&lua->lua_lock);
 
 	return retval ? retval : real_size;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-06-30  9:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26 17:28 [PATCH] HID: roccat: Drop cast Himangi Saraogi
2014-06-26 17:38 ` Joe Perches
2014-06-27  5:29   ` Julia Lawall
2014-06-27  5:52     ` Joe Perches
2014-06-27  7:59       ` Julia Lawall
2014-06-29 16:34       ` Julia Lawall
2014-06-29 18:25         ` Joe Perches
2014-06-30  9:08           ` Geert Uytterhoeven
2014-06-26 22:35 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox