Received: from eggs.gnu.org ([2001:4830:134:3::10]:32811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfTol-0005mu-Rs for qemu-devel@nongnu.org; Tue, 07 Apr 2015 09:45:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfToh-000606-Ps for qemu-devel@nongnu.org; Tue, 07 Apr 2015 09:45:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfToh-0005zM-Go for qemu-devel@nongnu.org; Tue, 07 Apr 2015 09:45:23 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t37DjMgk006232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 7 Apr 2015 09:45:23 -0400 Date: Tue, 7 Apr 2015 14:45:19 +0100 From: Stefan Hajnoczi Message-ID: <20150407134519.GC21559@stefanha-thinkpad.redhat.com> References: <1427992762-10126-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UPT3ojh+0CqEDtpF" Content-Disposition: inline In-Reply-To: <1427992762-10126-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH] thread-pool: clean up thread_pool_completion_bh() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , John Snow --UPT3ojh+0CqEDtpF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 02, 2015 at 05:39:22PM +0100, Stefan Hajnoczi wrote: > This patch simplifies thread_pool_completion_bh(). >=20 > The function first checks elem->state: >=20 > if (elem->state !=3D THREAD_DONE) { > continue; > } >=20 > It then goes on to check elem->state =3D=3D THREAD_DONE although we alrea= dy > know this must be the case. >=20 > The QLIST_REMOVE() is duplicated down both branches of an if-else > statement so that can be lifted out as well. >=20 > Signed-off-by: Stefan Hajnoczi > --- > thread-pool.c | 14 ++++++-------- > 1 file changed, 6 insertions(+), 8 deletions(-) Thanks, applied to my block-next tree: https://github.com/stefanha/qemu/commits/block-next Stefan --UPT3ojh+0CqEDtpF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVI99vAAoJEJykq7OBq3PICesIAMSrhHPglW68Jvb/b/lDReaf xXGwKZUJ9RRNf3NlT5klT1937K7PYSTFfkMTAYX29BhF32SzSHCNvBlpWIG3Ai6x +Ozt2B6VhP1G+uFoSoAPF46XzgZ0xvQmm5RfNHT1MJ04nn/jv5MgRPHpjfGbq4y8 IecWNZmpMP9XSIAPE4co4kg4Crz404tnbr4vB8RNvzaJ7t/G8LIukzcrk+fENXjz uXP5i6/7KJx4DGsLfUH9HPxDC1ccXIdKvzqXjtoNkZBTZOxOk+NbDnodMFyX50s/ aIjc0v455UvmvfS5J7ZW4T0HVByILyDNYKNmdBHEkjQhr3P/dgrEpiausEsmJ8g= =+wwV -----END PGP SIGNATURE----- --UPT3ojh+0CqEDtpF--