mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
	Ludovic Desroches <ludovic.desroches@atmel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine/trivial: at_hdmac: add curly brackets to if/else expressions
Date: Fri, 7 Jun 2013 17:38:01 +0200	[thread overview]
Message-ID: <201306071738.01488.arnd@arndb.de> (raw)
In-Reply-To: <1370618898-18296-1-git-send-email-nicolas.ferre@atmel.com>

On Friday 07 June 2013, Nicolas Ferre wrote:
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index 50953a7..b321562 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -299,8 +299,9 @@ static int atc_get_bytes_left(struct dma_chan *chan)
>                 if (atchan->remain_desc < 0) {
>                         ret = -EINVAL;
>                         goto out;
> -               } else
> +               } else {
>                         ret = atchan->remain_desc;
> +               }
>         } else {

Actually the original code is what a lot of people prefer, though I don't
have a reference to back that up.

If one side of the 'else' uses curly braces, the other one should too.
	
	Arnd

      reply	other threads:[~2013-06-07 15:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07 15:28 Nicolas Ferre
2013-06-07 15:38 ` Arnd Bergmann [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=201306071738.01488.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=vinod.koul@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome