From: Shraddha Barke Date: Fri, 4 Sep 2015 06:38:45 +0000 (+0530) Subject: Staging: lustre: mdc: Remove useless cast on void pointer X-Git-Tag: firefly_0821_release~176^2~802^2~2148 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3cf8e32d6d337e0c293cd1b192a970639291703e;p=firefly-linux-kernel-4.4.55.git Staging: lustre: mdc: Remove useless cast on void pointer void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Shraddha Barke Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index bcb6c00c49ff..e6b3bf932a84 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -826,7 +826,7 @@ resend: LASSERT(lmm && lmmsize == 0); LASSERTF(einfo->ei_type == LDLM_FLOCK, "lock type %d\n", einfo->ei_type); - policy = (ldlm_policy_data_t *)lmm; + policy = lmm; res_id.name[3] = LDLM_FLOCK; req = NULL; } else if (it->it_op & IT_OPEN) {