linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MM: dmapool: Fixed a brace coding style issue
@ 2014-10-01 20:53 Paul McQuade
  0 siblings, 0 replies; 3+ messages in thread
From: Paul McQuade @ 2014-10-01 20:53 UTC (permalink / raw)
  To: paulmcquad
  Cc: linux-kernel, linux-mm, sato.vintage, daeseok.youn,
	andriy.shevchenko, jkosina, khalasa, akpm

Removed 3 brace coding style for any arm of this statement

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
---
 mm/dmapool.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/mm/dmapool.c b/mm/dmapool.c
index ba8019b..8f4a79a 100644
--- a/mm/dmapool.c
+++ b/mm/dmapool.c
@@ -133,28 +133,25 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev,
 	struct dma_pool *retval;
 	size_t allocation;
 
-	if (align == 0) {
+	if (align == 0)
 		align = 1;
-	} else if (align & (align - 1)) {
+	else if (align & (align - 1))
 		return NULL;
-	}
 
-	if (size == 0) {
+	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)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MM: dmapool: Fixed a brace coding style issue
  2014-09-30 20:49 Paul McQuade
@ 2014-10-01 11:31 ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2014-10-01 11:31 UTC (permalink / raw)
  To: Paul McQuade
  Cc: Andrew Morton, Krzysztof Hałasa, jiri Kosina,
	Hiroshige Sato, Daeseok Youn, linux-mm, linux-kernel

On Tue, 2014-09-30 at 21:49 +0100, Paul McQuade wrote:
> From 33890970bfffc2bd64b307c41e5c1c92aaba8a2e Mon Sep 17 00:00:00 2001
> From: Paul McQuade <paulmcquad@gmail.com>
> 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
> 
> Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
> ---
>  mm/dmapool.c | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/mm/dmapool.c b/mm/dmapool.c
> index ba8019b..8b3b050 100644
> --- a/mm/dmapool.c
> +++ b/mm/dmapool.c
> @@ -133,28 +133,27 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev,
>      struct dma_pool *retval;
>      size_t allocation;
>  
> -    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?


> +    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)


-- 
Andy Shevchenko <andriy.shevchenko@intel.com>
Intel Finland Oy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] MM: dmapool: Fixed a brace coding style issue
@ 2014-09-30 20:49 Paul McQuade
  2014-10-01 11:31 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Paul McQuade @ 2014-09-30 20:49 UTC (permalink / raw)
  To: Andrew Morton, Krzysztof Hałasa, Andy Shevchenko,
	jiri Kosina, Hiroshige Sato, Daeseok Youn, linux-mm,
	linux-kernel, Paul McQuade

>From 33890970bfffc2bd64b307c41e5c1c92aaba8a2e Mon Sep 17 00:00:00 2001
From: Paul McQuade <paulmcquad@gmail.com>
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

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
---
 mm/dmapool.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/mm/dmapool.c b/mm/dmapool.c
index ba8019b..8b3b050 100644
--- a/mm/dmapool.c
+++ b/mm/dmapool.c
@@ -133,28 +133,27 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev,
     struct dma_pool *retval;
     size_t allocation;
 
-    if (align == 0) {
+    if (align == 0)
         align = 1;
-    } else if (align & (align - 1)) {
+    else if (align & (align - 1))
         return NULL;
-    }
 
-    if (size == 0) {
+
+    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)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-01 20:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-01 20:53 [PATCH] MM: dmapool: Fixed a brace coding style issue Paul McQuade
  -- strict thread matches above, loose matches on Subject: below --
2014-09-30 20:49 Paul McQuade
2014-10-01 11:31 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).