staging: wilc1000: Remove useless cast.
authorVarsha Rao <rvarsha016@gmail.com>
Wed, 8 Mar 2017 04:12:46 +0000 (09:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Mar 2017 13:55:09 +0000 (14:55 +0100)
Variable ip_addr is already declared as pointer to u8. Again explicit type
casting of ip_addr to u8, is not required. Hence this patch removes it
by using the following coccinelle script.

@@
type T;
T *ptr,p;
@@
(
- (T *)(&p)
+ &p
|
- (T *)ptr
+ ptr
|
- (T *)(ptr)
+ ptr
|
- (T)(p)
+ p
)

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index 7a9e8d3c4a367d77584f3043c5479ad507ac00e3..c3a8af081880c26d82080d808e5a95a5c0e10c21 100644 (file)
@@ -384,7 +384,7 @@ static void handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 
        wid.id = (u16)WID_IP_ADDRESS;
        wid.type = WID_STR;
-       wid.val = (u8 *)ip_addr;
+       wid.val = ip_addr;
        wid.size = IP_ALEN;
 
        ret = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,