From: Shraddha Barke Date: Fri, 4 Sep 2015 06:38:44 +0000 (+0530) Subject: Staging: lustre: lnet: Remove useless cast on void pointer X-Git-Tag: firefly_0821_release~176^2~802^2~2149 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=91b4e64bfe5b2b2afe66ba5ec622c003d483f9e3;p=firefly-linux-kernel-4.4.55.git Staging: lustre: lnet: 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/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c index d0c79d1bb9f6..6d87731c539d 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c @@ -1313,7 +1313,7 @@ ksocknal_recv (lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed, unsigned int niov, struct kvec *iov, lnet_kiov_t *kiov, unsigned int offset, unsigned int mlen, unsigned int rlen) { - ksock_conn_t *conn = (ksock_conn_t *)private; + ksock_conn_t *conn = private; ksock_sched_t *sched = conn->ksnc_scheduler; LASSERT(mlen <= rlen);