All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Georgiana Chelu <georgiana.chelu93@gmail.com>
Cc: outreachy-kernel@googlegroups.com,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH] Staging: media: atomisp: Remove duplicated argument to ||
Date: Fri, 29 Sep 2017 15:36:24 +0200	[thread overview]
Message-ID: <20170929133624.GA12135@kroah.com> (raw)
In-Reply-To: <1506079255-127380-1-git-send-email-georgiana.chelu93@gmail.com>

On Fri, Sep 22, 2017 at 04:20:55AM -0700, Georgiana Chelu wrote:
> 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;
>  

I don't understand, you are changing the output of the code here, right?
Why is this patch ok?

confused,

greg k-h


  reply	other threads:[~2017-09-29 13:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 11:20 [PATCH] Staging: media: atomisp: Remove duplicated argument to || Georgiana Chelu
2017-09-29 13:36 ` Greg Kroah-Hartman [this message]
2017-10-01 10:47   ` Georgiana Chelu
2017-10-03 16:16     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170929133624.GA12135@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=georgiana.chelu93@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=outreachy-kernel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.