All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: media: atomisp: Remove duplicated argument to ||
@ 2017-09-22 11:20 Georgiana Chelu
  2017-09-29 13:36 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Georgiana Chelu @ 2017-09-22 11:20 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman

get_user() copies a variable from user space to kernel space
put_user() copies a variable from kenel space to user space.

Remove duplicated argument to || because consecutive calls
of these functions with the same arguments will have the same
result.

Issue found by coccinelle script.

Signed-off-by: Georgiana Chelu <georgiana.chelu93@gmail.com>
---
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c
index 0592ac1..a27ecbe 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c
@@ -432,8 +432,6 @@ static int get_atomisp_overlay32(struct atomisp_overlay *kp,
 				&up->blend_overlay_perc_u) ||
 		get_user(kp->blend_overlay_perc_v,
 				&up->blend_overlay_perc_v) ||
-		get_user(kp->blend_overlay_perc_u,
-				&up->blend_overlay_perc_u) ||
 		get_user(kp->overlay_start_x, &up->overlay_start_y))
 			return -EFAULT;
 
@@ -460,8 +458,6 @@ static int put_atomisp_overlay32(struct atomisp_overlay *kp,
 				&up->blend_overlay_perc_u) ||
 		put_user(kp->blend_overlay_perc_v,
 				&up->blend_overlay_perc_v) ||
-		put_user(kp->blend_overlay_perc_u,
-				&up->blend_overlay_perc_u) ||
 		put_user(kp->overlay_start_x, &up->overlay_start_y))
 			return -EFAULT;
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-03 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22 11:20 [PATCH] Staging: media: atomisp: Remove duplicated argument to || Georgiana Chelu
2017-09-29 13:36 ` Greg Kroah-Hartman
2017-10-01 10:47   ` Georgiana Chelu
2017-10-03 16:16     ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.