From ad1d2a4fc8676588f6fe9882235056f1c6d13b50 Mon Sep 17 00:00:00 2001 From: Tapasweni Pathak Date: Thu, 30 Oct 2014 17:02:36 +0530 Subject: [PATCH] staging: media: davinci_vpfe: Remove useless 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 ) Build tested it. Signed-off-by: Tapasweni Pathak Signed-off-by: Greg Kroah-Hartman --- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 4 ++-- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c index 6d4893b44c1f..413acbb9e948 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c @@ -421,7 +421,7 @@ static int ipipeif_get_config(struct v4l2_subdev *sd, void __user *arg) { struct vpfe_ipipeif_device *ipipeif = v4l2_get_subdevdata(sd); - struct ipipeif_params *config = (struct ipipeif_params *)arg; + struct ipipeif_params *config = arg; struct device *dev = ipipeif->subdev.v4l2_dev->dev; if (!arg) { @@ -462,7 +462,7 @@ ipipeif_get_config(struct v4l2_subdev *sd, void __user *arg) static long ipipeif_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) { - struct ipipeif_params *config = (struct ipipeif_params *)arg; + struct ipipeif_params *config = arg; int ret = -ENOIOCTLCMD; switch (cmd) { diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c index 415502651033..36fc15ad190c 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c @@ -149,7 +149,7 @@ configure_resizer_out_params(struct vpfe_resizer_device *resizer, int index, param->rsz_en[index] = DISABLE; return; } - output = (struct vpfe_rsz_output_spec *)output_spec; + output = output_spec; param->rsz_en[index] = ENABLE; if (partial) { param->rsz_rsc_param[index].h_flip = output->h_flip; @@ -1218,12 +1218,12 @@ static long resizer_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg) switch (cmd) { case VIDIOC_VPFE_RSZ_S_CONFIG: - user_config = (struct vpfe_rsz_config *)arg; + user_config = arg; ret = resizer_set_configuration(resizer, user_config); break; case VIDIOC_VPFE_RSZ_G_CONFIG: - user_config = (struct vpfe_rsz_config *)arg; + user_config = arg; if (!user_config->config) { dev_err(dev, "error in VIDIOC_VPFE_RSZ_G_CONFIG\n"); return -EINVAL; -- 2.20.1