lkml.org 
[lkml]   [2014]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] HID: roccat: Drop cast
    On Thu, 26 Jun 2014, Himangi Saraogi wrote:

    > 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);

    Applied, thanks.

    --
    Jiri Kosina
    SUSE Labs


    \
     
     \ /
      Last update: 2014-06-27 01:21    [W:5.155 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site