mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Kosina <jkosina@suse.cz>
To: Alan Ott <alan@signal11.us>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] hidraw: Replace Confusing += Operator with =
Date: Mon, 31 Jan 2011 15:44:24 +0100 (CET)	[thread overview]
Message-ID: <alpine.LNX.2.00.1101311544120.5725@pobox.suse.cz> (raw)
In-Reply-To: <1296098718-6964-1-git-send-email-alan@signal11.us>

On Wed, 26 Jan 2011, Alan Ott wrote:

> Setting of the return value of hidraw_read() uses the += operator when
> = is more appropriate.  There is no case where ret can be anything
> other than zero when the assignment is made, making = equivalent to
> += and much more clear.
> 
> Signed-off-by: Alan Ott <alan@signal11.us>
> ---
>  drivers/hid/hidraw.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c
> index 468e87b..66fbcba 100644
> --- a/drivers/hid/hidraw.c
> +++ b/drivers/hid/hidraw.c
> @@ -91,7 +91,7 @@ static ssize_t hidraw_read(struct file *file, char __user *buffer, size_t count,
>  			ret = -EFAULT;
>  			goto out;
>  		}
> -		ret += len;
> +		ret = len;
>  

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

      reply	other threads:[~2011-01-31 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27  3:25 Alan Ott
2011-01-31 14:44 ` Jiri Kosina [this message]

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=alpine.LNX.2.00.1101311544120.5725@pobox.suse.cz \
    --to=jkosina@suse.cz \
    --cc=alan@signal11.us \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®