From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoJlI-0008Jw-O1 for qemu-devel@nongnu.org; Sun, 16 Jun 2013 16:41:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UoJlE-0000wR-Sj for qemu-devel@nongnu.org; Sun, 16 Jun 2013 16:41:20 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40136 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoJlE-0000wE-M2 for qemu-devel@nongnu.org; Sun, 16 Jun 2013 16:41:16 -0400 Message-ID: <51BE22E9.2000201@suse.de> Date: Sun, 16 Jun 2013 22:41:13 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1371398269-6213-1-git-send-email-afaerber@suse.de> <1371398269-6213-25-git-send-email-afaerber@suse.de> <20130616202626.GA19741@redhat.com> In-Reply-To: <20130616202626.GA19741@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu v2 24/29] cpu: Drop qemu_for_each_cpu() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Peter Maydell , qemu-devel@nongnu.org, Markus Armbruster Am 16.06.2013 22:26, schrieb Michael S. Tsirkin: > On Sun, Jun 16, 2013 at 05:57:44PM +0200, Andreas F=E4rber wrote: >> Revert commit d6b9e0d60cc511eca210834428bb74508cff3d33 (cpu: Add >> qemu_for_each_cpu()) and its usage in favor of open-coding CPU loops, >> now that they are based on CPUState. >> >> Suggested-by: Markus Armbruster >> Signed-off-by: Andreas F=E4rber >=20 > Open-coding is kind of nasty though. >=20 > How about > #define qemu_for_each_cpu(cpu) \ > for (cpu =3D first_cpu; cpu !=3D NULL; cpu =3D cpu->next_cpu) I've been investigating QTAILQ_FOREACH(), but I'd rather do things in two steps - CPUState type (21/29) in this series and then further macro wizardry. I'd be fine to defer this patch and replace it with the final helper of our choice. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg