lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <576D66B8.7040300@ti.com>
Date:	Fri, 24 Jun 2016 19:58:32 +0300
From:	Grygorii Strashko <grygorii.strashko@...com>
To:	Lennart Sorensen <lsorense@...lub.uwaterloo.ca>,
	Mugunthan V N <mugunthanvnm@...com>
CC:	Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
	"David S. Miller" <davem@...emloft.net>, <netdev@...r.kernel.org>,
	Sekhar Nori <nsekhar@...com>, <linux-kernel@...r.kernel.org>,
	<linux-omap@...r.kernel.org>
Subject: Re: [PATCH] net: ethernet: ti: cpdma: switch to use genalloc

On 06/24/2016 07:15 PM, Lennart Sorensen wrote:
> On Fri, Jun 24, 2016 at 11:35:15AM +0530, Mugunthan V N wrote:
>>>> +static void cpdma_desc_pool_destroy(struct cpdma_desc_pool *pool)
>>>> +{
>>>> +    if (!pool)
>>>> +        return;
>>>> +
>>>> +    WARN_ON(pool->used_desc);
>>>> +    if (pool->cpumap) {
>>>> +        dma_free_coherent(pool->dev, pool->mem_size, pool->cpumap,
>>>> +                  pool->phys);
>>>> +    } else {
>>>> +        iounmap(pool->iomap);
>>>> +    }
>>>> +}
>>>> +
>>> single if, brackets?
>>
>> if() has multiple line statement, so brackets are must.
> 
> It is line wrapped, it is still one statement.  And you can't argue the
> else being multiple lines, although the style does require using brackets
> for the else if the if required them.
> 
> Style says "Do not unnecessarily use braces where a single statement will do."
> It says statement, not line.  A multiline wrapped statement is still
> one statement.
> 
> I may personally hate the lack of brackets, but style wise it seems very
> clear that the linux kernel only uses brakcets when required, which is
> only when there is more than one statement.  I prefer what you did,
> but not as much as I prefer consistency.
> 

Oh. nice :( So, seems, I'd need to send v3. Right?
By the way, this code hasn't been introduced by this patch - I've
just moved whole function from one place to another.

-- 
regards,
-grygorii

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ