Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753264AbbHCOUV (ORCPT ); Mon, 3 Aug 2015 10:20:21 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:35685 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751982AbbHCOUU (ORCPT ); Mon, 3 Aug 2015 10:20:20 -0400 From: Shraddha Barke To: linux-kernel@vger.kernel.org, Dan Carpenter , Joe Perches , Tristan Lelong , Greg Donald , Dmitry Eremin , Greg Kroah-Hartman , Andreas Dilger , Oleg Drokin , devel@driverdev.osuosl.org, HPDD-discuss@ml01.01.org Cc: Shraddha Barke Subject: [PATCH] Staging : lustre :Drop unnecessary cast Date: Mon, 3 Aug 2015 19:50:03 +0530 Message-Id: <1438611603-29324-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: 1508 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/obdclass/linux/linux-module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index 6218ef3..fef6a4e 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -83,7 +83,7 @@ int obd_ioctl_getdata(char **buf, int *len, void *arg) int err; int offset = 0; - if (copy_from_user(&hdr, (void *)arg, sizeof(hdr))) + if (copy_from_user(&hdr, arg, sizeof(hdr))) return -EFAULT; if (hdr.ioc_version != OBD_IOCTL_VERSION) { @@ -116,7 +116,7 @@ int obd_ioctl_getdata(char **buf, int *len, void *arg) *len = hdr.ioc_len; data = (struct obd_ioctl_data *)*buf; - if (copy_from_user(*buf, (void *)arg, hdr.ioc_len)) { + if (copy_from_user(*buf, arg, hdr.ioc_len)) { err = -EFAULT; goto free_buf; } -- 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/