From: Shraddha Barke Date: Wed, 14 Oct 2015 19:28:28 +0000 (+0530) Subject: Staging: lustre: ptlrpc: Remove unnecessary cast on void pointer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8ba53beb2ce30f5fd0abe1638440889d10988b7c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Staging: lustre: ptlrpc: Remove unnecessary 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/ptlrpc/connection.c b/drivers/staging/lustre/lustre/ptlrpc/connection.c index ffe36e22245f..1ba1f5f2eeaa 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/connection.c +++ b/drivers/staging/lustre/lustre/ptlrpc/connection.c @@ -173,7 +173,7 @@ conn_keycmp(const void *key, struct hlist_node *hnode) const lnet_process_id_t *conn_key; LASSERT(key != NULL); - conn_key = (lnet_process_id_t *)key; + conn_key = key; conn = hlist_entry(hnode, struct ptlrpc_connection, c_hash); return conn_key->nid == conn->c_peer.nid &&