From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by kanga.kvack.org (Postfix) with ESMTP id 2185C6B0069 for ; Wed, 1 Oct 2014 07:31:42 -0400 (EDT) Received: by mail-pa0-f53.google.com with SMTP id kq14so108829pab.26 for ; Wed, 01 Oct 2014 04:31:41 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com. [134.134.136.20]) by mx.google.com with ESMTP id zd2si666669pbb.44.2014.10.01.04.31.40 for ; Wed, 01 Oct 2014 04:31:41 -0700 (PDT) Message-ID: <1412163094.3126.0.camel@linux.intel.com> Subject: Re: [PATCH] MM: dmapool: Fixed a brace coding style issue From: Andy Shevchenko Date: Wed, 01 Oct 2014 14:31:34 +0300 In-Reply-To: <542B176E.6000007@gmail.com> References: <542B176E.6000007@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Paul McQuade Cc: Andrew Morton , Krzysztof =?UTF-8?Q?Ha=C5=82asa?= , 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 > 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 > --- > 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 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: email@kvack.org