Skip to contentSkip to conversation

MM: dmapool: Fixed a brace coding style issue

PATCH In review Paul McQuade 2 participants 2 messages Sep 30, 2014 – Oct 1, 2014 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MM: dmapool: Fixed a brace coding style issue

#1 lore raw
Quoted 20 lines · Paul McQuade

From 33890970bfffc2bd64b307c41e5c1c92aaba8a2e Mon Sep 17 00:00:00 2001
From: Paul McQuade <[email protected]>
Date: Tue, 30 Sep 2014 21:39:37 +0100
Subject: [PATCH] MM: dmapool: Fixed a brace coding style issue

Removed 3 brace coding style for any arm of this statement

---
 mm/dmapool.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
mm/dmapool.c +0 -0
index ba8019b..8b3b050 100644
@@ -133,28 +133,27 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev,
     struct dma_pool *retval;
     size_t allocation;
 

mm/dmapool.c struct dma_pool *dma_pool_create(const char *name, struct device *dev, · line 141

Quoted 10 lines
mm/dmapool.c +3 -4
-    if (align == 0) {
+    if (align == 0)
         align = 1;
-    } else if (align & (align - 1)) {
+    else if (align & (align - 1))
         return NULL;
-    }
 
-    if (size == 0) {
+

Extra empty line?

Quoted 24 lines
mm/dmapool.c +5 -5
+    if (size == 0)
         return NULL;
-    } else if (size < 4) {
+    else if (size < 4)
 
         size = 4;
-    }
+
 
     if ((size % align) != 0)
         size = ALIGN(size, align);
 
     allocation = max_t(size_t, size, PAGE_SIZE);
 
-    if (!boundary) {
+    if (!boundary)
         boundary = allocation;
-    } else if ((boundary < size) || (boundary & (boundary - 1))) {
+    else if ((boundary < size) || (boundary & (boundary - 1)))
         return NULL;
-    }
 
     retval = kmalloc_node(sizeof(*retval), GFP_KERNEL, dev_to_node(dev));

if (!retval)

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy