From: Alison Schofield Date: Sat, 13 Feb 2016 06:51:04 +0000 (-0800) Subject: staging: wilc1000: host_interface: remove cast on void pointers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=59b97b365e17c0d3b13187874e5b5aededc0ae4a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: wilc1000: host_interface: remove cast on void pointers Remove cast on void pointers. C programming language guarantees the conversion from void pointer to any other pointer type. Coccinelle patch: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Alison Schofield Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index a6bc8a436c7e..069fac1e6cab 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -953,7 +953,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, return result; } - ptstrJoinBssParam = (struct join_bss_param *)pstrHostIFconnectAttr->params; + ptstrJoinBssParam = pstrHostIFconnectAttr->params; if (!ptstrJoinBssParam) { PRINT_ER("Required BSSID not found\n"); result = -ENOENT; @@ -2675,7 +2675,7 @@ static int hostIFthread(void *pvArg) { u32 u32Ret; struct host_if_msg msg; - struct wilc *wilc = (struct wilc*)pvArg; + struct wilc *wilc = pvArg; struct wilc_vif *vif; memset(&msg, 0, sizeof(struct host_if_msg));