From 0d749519f0441144f7da53e157d11f0680c15313 Mon Sep 17 00:00:00 2001 From: Shraddha Barke Date: Mon, 27 Jul 2015 22:20:35 +0530 Subject: [PATCH] Staging: lustre: Drop unnecessary cast This patch does away with the cast on void * as it is unnecessary. Semantic patch used is as follows: @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 --- drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c index aa3fffed1519..fbbc8a7e308d 100644 --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c @@ -114,7 +114,7 @@ int cfs_crypto_hash_digest(unsigned char alg_id, crypto_free_hash(hdesc.tfm); return -ENOSPC; } - sg_init_one(&sl, (void *)buf, buf_len); + sg_init_one(&sl, buf, buf_len); hdesc.flags = 0; err = crypto_hash_digest(&hdesc, &sl, sl.length, hash); @@ -165,7 +165,7 @@ int cfs_crypto_hash_update(struct cfs_crypto_hash_desc *hdesc, { struct scatterlist sl; - sg_init_one(&sl, (void *)buf, buf_len); + sg_init_one(&sl, buf, buf_len); return crypto_hash_update((struct hash_desc *)hdesc, &sl, sl.length); } -- 2.34.1