Skip to content

Commit 285d02a

Browse files
varshar16gregkh
authored andcommitted
staging: wilc1000: Remove useless cast.
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 <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 069baa6 commit 285d02a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/wilc1000/host_interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static void handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
384384

385385
wid.id = (u16)WID_IP_ADDRESS;
386386
wid.type = WID_STR;
387-
wid.val = (u8 *)ip_addr;
387+
wid.val = ip_addr;
388388
wid.size = IP_ALEN;
389389

390390
ret = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,

0 commit comments

Comments
 (0)