All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Reza Snowdon <rs@mage.me.uk>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	speakup@braille.uwo.ca, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: speakup: buffers: Fixed a return value coding style issue.
Date: Thu, 27 Feb 2014 19:47:51 +0300	[thread overview]
Message-ID: <20140227164751.GU26722@mwanda> (raw)
In-Reply-To: <1393518402-24860-1-git-send-email-rs@mage.me.uk>

On Thu, Feb 27, 2014 at 04:26:42PM +0000, Reza Snowdon wrote:
> Fixed a coding style issue.
> 
> Signed-off-by: Reza Snowdon <rs@mage.me.uk>
> ---
>  drivers/staging/speakup/buffers.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/speakup/buffers.c b/drivers/staging/speakup/buffers.c
> index 382973e..8d7caa7 100644
> --- a/drivers/staging/speakup/buffers.c
> +++ b/drivers/staging/speakup/buffers.c
> @@ -55,7 +55,8 @@ static int synth_buffer_free(void)
>  
>  int synth_buffer_empty(void)
>  {
> -	return (buff_in == buff_out);
> +	int buff_comparison = (buff_in == buff_out);
> +	return buff_comparison;

This isn't simpler than the original code.

Just do:

int synth_buffer_empty(void)
{
	return buff_in == buff_out;
}

regards,
dan carpenter


      parent reply	other threads:[~2014-02-27 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 16:26 [PATCH] Staging: speakup: buffers: Fixed a return value coding style issue Reza Snowdon
2014-02-27 16:40 ` Greg KH
2014-02-27 18:12   ` rs
2014-02-27 19:10     ` Greg KH
2014-02-27 16:47 ` Dan Carpenter [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=20140227164751.GU26722@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rs@mage.me.uk \
    --cc=speakup@braille.uwo.ca \
    /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.