From ab12717607e363124da88d64eeb3fedce9674dfe Mon Sep 17 00:00:00 2001 From: Shraddha Barke Date: Thu, 15 Oct 2015 00:58:21 +0530 Subject: [PATCH] Staging: lustre: obdclass: Remove unnecessary cast on void pointer void pointers do not need to be cast to other pointer types. 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 --- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/obd_config.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index 7cc4b55..3228fee 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -612,7 +612,7 @@ int lprocfs_rd_import(struct seq_file *m, void *data) { struct lprocfs_counter ret; struct lprocfs_counter_header *header; - struct obd_device *obd = (struct obd_device *)data; + struct obd_device *obd = data; struct obd_import *imp; struct obd_import_conn *conn; int j; @@ -757,7 +757,7 @@ EXPORT_SYMBOL(lprocfs_rd_import); int lprocfs_rd_state(struct seq_file *m, void *data) { - struct obd_device *obd = (struct obd_device *)data; + struct obd_device *obd = data; struct obd_import *imp; int j, k; @@ -797,7 +797,7 @@ EXPORT_SYMBOL(lprocfs_at_hist_helper); /* See also ptlrpc_lprocfs_rd_timeouts */ int lprocfs_rd_timeouts(struct seq_file *m, void *data) { - struct obd_device *obd = (struct obd_device *)data; + struct obd_device *obd = data; struct obd_import *imp; unsigned int cur, worst; time64_t now, worstt; diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c index 64e2d1b..38e5e13 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c @@ -88,7 +88,7 @@ static int class_match_param(char *buf, char *key, char **valp) static int parse_nid(char *buf, void *value, int quiet) { - lnet_nid_t *nid = (lnet_nid_t *)value; + lnet_nid_t *nid = value; *nid = libcfs_str2nid(buf); if (*nid != LNET_NID_ANY) @@ -101,7 +101,7 @@ static int parse_nid(char *buf, void *value, int quiet) static int parse_net(char *buf, void *value) { - __u32 *net = (__u32 *)value; + __u32 *net = value; *net = libcfs_str2net(buf); CDEBUG(D_INFO, "Net %s\n", libcfs_net2str(*net)); diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c b/drivers/staging/lustre/lustre/obdclass/obd_mount.c index 0d324cc2..149c838 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c @@ -1100,7 +1100,7 @@ static int lustre_fill_super(struct super_block *sb, void *data, int silent) obd_zombie_barrier(); /* Figure out the lmd from the mount options */ - if (lmd_parse((char *)(lmd2->lmd2_data), lmd)) { + if (lmd_parse((lmd2->lmd2_data), lmd)) { lustre_put_lsi(sb); rc = -EINVAL; goto out; -- 2.7.4