From: Alison Schofield Date: Sat, 13 Feb 2016 06:52:11 +0000 (-0800) Subject: staging: wilc1000: linux_mon: remove cast on void pointer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6bcc1e1e703c2d734eec76bd104afc717a290205;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: wilc1000: linux_mon: remove cast on void pointer Remove cast on void pointer. 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/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index e9bb0ec5cbc6..ba702b23f852 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -137,7 +137,7 @@ struct tx_complete_mon_data { static void mgmt_tx_complete(void *priv, int status) { - struct tx_complete_mon_data *pv_data = (struct tx_complete_mon_data *)priv; + struct tx_complete_mon_data *pv_data = priv; u8 *buf = pv_data->buff; if (status == 1) {