davinci: edma: fix coding style issue related to usage of braces

Previous thread: Davinci: gpio - structs and functions renamed by Linux Kernel Mailing List on Wednesday, May 19, 2010 - 1:03 pm. (1 message)

Next thread: Davinci: serial - use ioremap() by Linux Kernel Mailing List on Wednesday, May 19, 2010 - 1:03 pm. (1 message)
From: Linux Kernel Mailing List
Date: Wednesday, May 19, 2010 - 1:03 pm

Gitweb:     http://git.kernel.org/linus/243bc65447a74fbc674fc7fab6f212cce62e0152
Commit:     243bc65447a74fbc674fc7fab6f212cce62e0152
Parent:     3f68b98a75381f785f4e13085296c52c75ea29ac
Author:     Sekhar Nori <nsekhar@ti.com>
AuthorDate: Tue May 4 14:11:36 2010 +0530
Committer:  Kevin Hilman <khilman@deeprootsystems.com>
CommitDate: Thu May 6 15:55:38 2010 -0700

    davinci: edma: fix coding style issue related to usage of braces
    
    In the edma driver, there are couple of instances where braces
    are used for a single statement 'if' construct.
    
    There are other instances where 'else' part of the if-else construct
    does not use braces even if the 'if' part is a multi-line statement.
    
    This patch fixes both.
    
    Signed-off-by: Sekhar Nori <nsekhar@ti.com>
    Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/mach-davinci/dma.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
index b705089..cc5fcda 100644
--- a/arch/arm/mach-davinci/dma.c
+++ b/arch/arm/mach-davinci/dma.c
@@ -310,10 +310,9 @@ setup_dma_interrupt(unsigned lch,
 	ctlr = EDMA_CTLR(lch);
 	lch = EDMA_CHAN_SLOT(lch);
 
-	if (!callback) {
+	if (!callback)
 		edma_shadow0_write_array(ctlr, SH_IECR, lch >> 5,
 				(1 << (lch & 0x1f)));
-	}
 
 	edma_cc[ctlr]->intr_data[lch].callback = callback;
 	edma_cc[ctlr]->intr_data[lch].data = data;
@@ -376,12 +375,11 @@ static irqreturn_t dma_irq_handler(int irq, void *data)
 				/* Clear the corresponding IPR bits */
 				edma_shadow0_write_array(ctlr, SH_ICR, j,
 							(1 << i));
-				if (edma_cc[ctlr]->intr_data[k].callback) {
+				if (edma_cc[ctlr]->intr_data[k].callback)
 					edma_cc[ctlr]->intr_data[k].callback(
 						k, DMA_COMPLETE,
 						edma_cc[ctlr]->intr_data[k].
 						data);
-				}
 			}
 		}
 		cnt++;
@@ -473,9 +471,8 @@ static irqreturn_t dma_ccerr_handler(int irq, void *data)
 		if ...
Previous thread: Davinci: gpio - structs and functions renamed by Linux Kernel Mailing List on Wednesday, May 19, 2010 - 1:03 pm. (1 message)

Next thread: Davinci: serial - use ioremap() by Linux Kernel Mailing List on Wednesday, May 19, 2010 - 1:03 pm. (1 message)