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]
Date:	Sun, 18 Sep 2011 16:42:34 -0300
From:	Glauber Costa <glommer@...allels.com>
To:	"Kirill A. Shutemov" <kirill@...temov.name>
CC:	Cyrill Gorcunov <gorcunov@...il.com>,
	<linux-kernel@...r.kernel.org>, <paul@...lmenage.org>,
	<lizf@...fujitsu.com>, <kamezawa.hiroyu@...fujitsu.com>,
	<ebiederm@...ssion.com>, <davem@...emloft.net>,
	<gthelen@...gle.com>, <netdev@...r.kernel.org>,
	<linux-mm@...ck.org>
Subject: Re: [PATCH v2 4/7] per-cgroup tcp buffers control

On 09/18/2011 03:58 PM, Kirill A. Shutemov wrote:
> On Sat, Sep 17, 2011 at 10:33:58PM +0400, Cyrill Gorcunov wrote:
>> On Sat, Sep 17, 2011 at 09:11:32PM +0300, Kirill A. Shutemov wrote:
>>> On Wed, Sep 14, 2011 at 10:46:12PM -0300, Glauber Costa wrote:
>>>> +int tcp_init_cgroup_fill(struct proto *prot, struct cgroup *cgrp,
>>>> +			 struct cgroup_subsys *ss)
>>>> +{
>>>> +	prot->enter_memory_pressure	= tcp_enter_memory_pressure;
>>>> +	prot->memory_allocated		= memory_allocated_tcp;
>>>> +	prot->prot_mem			= tcp_sysctl_mem;
>>>> +	prot->sockets_allocated		= sockets_allocated_tcp;
>>>> +	prot->memory_pressure		= memory_pressure_tcp;
>>>
>>> No fancy formatting, please.
>>>
>>
>> What's wrong with having fancy formatting? It's indeed easier to read
>> when members are assigned this way. It's always up to maintainer to
>> choose what he prefers, but I see nothing wrong in such style (if only it
>> doesn't break the style of the whole file).
>
> You have to remove this indenting if you'll reorganize code (e.g. move
> part under if(...)).
> IMO, it reduces code maintainability.
>
As I said, I don't care, so I'll change. But I have to say I disagree 
with your statement.

It is a pack of assignments, so if you reorganize this code, two things 
can happen:
1) It is not moved to a new ident level -> It keeps being a pack of 
assignments, and you don't really need to change it.
2) It is moved to a new ident level -> You have to touch it anyway...

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ