[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201306071738.01488.arnd@arndb.de>
Date: Fri, 7 Jun 2013 17:38:01 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Nicolas Ferre <nicolas.ferre@...el.com>
Cc: Vinod Koul <vinod.koul@...el.com>,
Ludovic Desroches <ludovic.desroches@...el.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dmaengine/trivial: at_hdmac: add curly brackets to if/else expressions
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists