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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110102091133.GZ32469@atrey.karlin.mff.cuni.cz>
Date:	Sun, 2 Jan 2011 10:11:33 +0100
From:	Pavel Machek <pavel@....cz>
To:	Theodore Tso <tytso@....EDU>
Cc:	Namhyung Kim <namhyung@...il.com>, Jan Kara <jack@...e.cz>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andreas Dilger <adilger.kernel@...ger.ca>,
	linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ext3: Coding style fix in namei.c

Hi!

> > * break long lines (using temp variables if needed)
> > * merge short lines
> > * put open brace on the same line
> > * use C89-style comments
> > * remove a space between function name and parenthesis
> > * remove a space between '*' and pointer name
> > * add a space after ','
> > * other random whitespace fixes
> > 
> > Signed-off-by: Namhyung Kim <namhyung@...il.com>
> 
> What's the benefit of such massive cleanup patches, really?   Does it really enhance readability _that_ much?
> 
> I believe in cleaning up code as I make substantive, useful change, but code churn for code churn's sake has a number of downsides:
> 
> *) It breaks other people's patches that might be pending (probably not as much of an issue for ext3)


> > @@ -276,12 +265,9 @@ static struct stats dx_show_leaf(struct dx_hash_info *hinfo, struct ext3_dir_ent
> > 	struct dx_hash_info h = *hinfo;
> > 
> > 	printk("names: ");
> > -	while ((char *) de < base + size)
> > -	{
> > -		if (de->inode)
> > -		{
> > -			if (show_names)
> > -			{
> > +	while ((char *) de < base + size) {
> > +		if (de->inode) {
> > +			if (show_names) {
> > 				int len = de->name_len;
> > 				char *name = de->name;
> > 				while (len--) printk("%c", *name++);

Code really looks better afterwards... and this way, the next person
trying to modify the file will not have to fix it, first...
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ