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] [thread-next>] [day] [month] [year] [list]
Message-ID: <6bffcb0e0708271714m140d39f3pf89bdc3d97808578@mail.gmail.com>
Date:	Tue, 28 Aug 2007 02:14:30 +0200
From:	"Michal Piotrowski" <michal.k.k.piotrowski@...il.com>
To:	"Joe Perches" <joe@...ches.com>
Cc:	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, "Mike Travis" <travis@....com>
Subject: Re: [PATCH] trivial - convert "for(foo=0;foo<NR_CPUS;foo++)" to "for_each_possible_cpu(foo)"

Hi Joe,

On 28/08/07, Joe Perches <joe@...ches.com> wrote:
> Done via grep/sed and compile tested i386 with xen
>
> Changed the foo++ and ++foo forms
[snip]
> There are 3 more lines that could be modified:
>
> arch/powerpc/sysdev/mpic.c:     for (i = 0; i < NR_CPUS; ++i, cpumask >>= 1)

for_each_possible_cpu(i) {
[..]
cpumask >>= 1;
}

> arch/sparc/kernel/smp.c:        for (cpu = 0, num = 0; cpu < NR_CPUS; cpu++)

num = 0;
for_each_possible_cpu(cpu) {
[..]
}

> arch/sparc64/kernel/smp.c:      for (i = 0; i < NR_CPUS; i++, ptr += size)

for_each_possible_cpu(i) {
[..]
ptr += size;
}

BTW1. There is a huge difference between pre and post incrementation -
have you checked all cases?

BTW2. Could you convert each i -> cpu?

Regards,
Michal

-- 
LOG
http://www.stardust.webpages.pl/log/
-
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