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] [day] [month] [year] [list]
Message-ID: <1409609873.5546.13.camel@x220>
Date:	Tue, 02 Sep 2014 00:17:53 +0200
From:	Paul Bolle <pebolle@...cali.nl>
To:	Stefan Richter <stefanr@...6.in-berlin.de>
Cc:	Sander Nemvalts <snemvalts@...il.com>,
	linux1394-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Drivers:firewire: fix style errors in core-card.c This
 is a patch in the core-card.c file which fixes up 2 warnings found by the
 checkpatch.pl tool Signed-off-by: Sander Nemvalts <snemvalts@...il.com>

Quite a crowded subject line!

On Mon, 2014-09-01 at 23:56 +0200, Stefan Richter wrote:
> On Sep 01 Sander Nemvalts wrote:
> > @@ -132,7 +133,7 @@ static void generate_config_rom(struct fw_card *card, __be32 *config_rom)
> >  	j = 7 + descriptor_count;
> >  
> >  	/* Generate root directory entries for descriptors. */
> > -	list_for_each_entry (desc, &descriptor_list, link) {
> > +	list_for_each_entry(desc, &descriptor_list, link) {
> >  		if (desc->immediate > 0)
> >  			config_rom[i++] = cpu_to_be32(desc->immediate);
> >  		config_rom[i] = cpu_to_be32(desc->key | (j - i));
> 
> We are writing
> 	for (a; b; c);
> not
> 	for(a; b; c);
> and thus a space after list_for_each and friends makes sense.

$ git grep "list_for_each_entry (" | wc -l
52
$ git grep "list_for_each_entry(" | wc -l
5991

So "list_for_each_entry(" (without space) seems to be the preferred
style.


Paul Bolle

--
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