Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754321AbbG0PvR (ORCPT ); Mon, 27 Jul 2015 11:51:17 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:35916 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754292AbbG0PvN (ORCPT ); Mon, 27 Jul 2015 11:51:13 -0400 From: Shraddha Barke To: Oleg Drokin , Andreas Dilger , Greg Kroah-Hartman , Julia Lawall Cc: HPDD-discuss@ml01.01.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Shraddha Barke Subject: [PATCH] Drop unnecessary cast Date: Mon, 27 Jul 2015 21:20:20 +0530 Message-Id: <1438012220-11301-1-git-send-email-shraddha.6596@gmail.com> X-Mailer: git-send-email 2.1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1489 Lines: 56 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 --- 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 aa3fffe..fbbc8a7 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.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/