]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: media: lirc: remove unnecessary cast on function argument
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Tue, 10 Mar 2015 16:55:27 +0000 (18:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Mar 2015 17:41:11 +0000 (18:41 +0100)
Removes pointer to pointer cast on a function argument. Issue
detected and resolved using the following coccinelle script:

@@
expression e;
type t;
identifier f;
@@

f(...,
-(t *)
e
,...)

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/lirc/lirc_parallel.c

index 19c5c21babf557fed108abe5939e535fe45fceec..df556442d9a6961a41334771d352a553d87a4dcb 100644 (file)
@@ -336,7 +336,7 @@ static ssize_t lirc_read(struct file *filep, char __user *buf, size_t n,
        set_current_state(TASK_INTERRUPTIBLE);
        while (count < n) {
                if (rptr != wptr) {
-                       if (copy_to_user(buf+count, (char *) &rbuf[rptr],
+                       if (copy_to_user(buf+count, &rbuf[rptr],
                                         sizeof(int))) {
                                result = -EFAULT;
                                break;