From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Paul McQuade <paulmcquad@gmail.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Krzysztof Hałasa" <khalasa@piap.pl>,
"jiri Kosina" <jkosina@suse.cz>,
"Hiroshige Sato" <sato.vintage@gmail.com>,
"Daeseok Youn" <daeseok.youn@gmail.com>,
linux-mm <linux-mm@kvack.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] MM: dmapool: Fixed a brace coding style issue
Date: Wed, 01 Oct 2014 14:31:34 +0300 [thread overview]
Message-ID: <1412163094.3126.0.camel@linux.intel.com> (raw)
In-Reply-To: <542B176E.6000007@gmail.com>
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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Paul McQuade <paulmcquad@gmail.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Krzysztof Hałasa" <khalasa@piap.pl>,
"jiri Kosina" <jkosina@suse.cz>,
"Hiroshige Sato" <sato.vintage@gmail.com>,
"Daeseok Youn" <daeseok.youn@gmail.com>,
linux-mm <linux-mm@kvack.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] MM: dmapool: Fixed a brace coding style issue
Date: Wed, 01 Oct 2014 14:31:34 +0300 [thread overview]
Message-ID: <1412163094.3126.0.camel@linux.intel.com> (raw)
In-Reply-To: <542B176E.6000007@gmail.com>
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
next prev parent reply other threads:[~2014-10-01 11:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 20:49 [PATCH] MM: dmapool: Fixed a brace coding style issue Paul McQuade
2014-09-30 20:49 ` Paul McQuade
2014-10-01 11:31 ` Andy Shevchenko [this message]
2014-10-01 11:31 ` Andy Shevchenko
-- strict thread matches above, loose matches on Subject: below --
2014-10-01 20:53 Paul McQuade
2014-10-01 20:53 ` Paul McQuade
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=1412163094.3126.0.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=daeseok.youn@gmail.com \
--cc=jkosina@suse.cz \
--cc=khalasa@piap.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=paulmcquad@gmail.com \
--cc=sato.vintage@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.