From patchwork Tue Jun 27 17:32:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 106457 Delivered-To: patches@linaro.org Received: by 10.140.101.44 with SMTP id t41csp32753qge; Tue, 27 Jun 2017 10:32:53 -0700 (PDT) X-Received: by 10.28.147.132 with SMTP id v126mr4301014wmd.107.1498584773461; Tue, 27 Jun 2017 10:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498584773; cv=none; d=google.com; s=arc-20160816; b=mObo2lgzApxSiPlthXj/VBmHrJgWXmd+Xht7Q427MZFwUKcwucBTOWfnfWHf25boNl oN1+HU8uxZzffYkPpvoWOyuKgM+pVLKMBrg0PnvaH2/o6ZLDFJ1BN+SVebX+BM0klH6B Y9z++50BfS++bC60h2moqr+xPfvfox/G5WwJQ/Uxz1g9Xxm5k/hpeOKJHunnn5sMkINy h0Mbe7cKt+foWm2daNhHJK5RdkeB3KqjraHDQKypZJS5sylPpnxzfd28yuQmt4vaGEtv f4U83ZeVscV0duJ8iLySS8+OPrR6MlhsZl0vw/jpikitL4YLofheeA8pA3SZRc65Ymi4 534g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=cjB3HJOgyzighnMesyp+zYAEY5eTm7q+bxNY5GLNZ3c=; b=TyRF6Gda0IxHjCMAHVgwVvTzjPjtrJDM2zwZzMe3+THqMzXgoEKUlicErPldNPhYMz JviCJmLw8JXy+2G4/BYosFHw8bn13L0ryjBQnSOnA7kamU/FVXIMg7dSCS1PRerbX/g/ 9iaOoaCbTMI9r8T6iCXb7O5d3d7qb42A8wRYNo6ZXj8Q3phD36iJhLja6eJsUQWs7H9n ZkWGQT7kA2awALeuXJu78d10kXRhhA/jIaU1bKvIcDwzwJAEwJ9UOfsDmw13cwS4o3XK ry6wgzS0fzKoI19rbiWOXhmMRjTk1VWVPwHaJbfx6TJEdjA/fX/G9rvwad4mzGVF8Fen o/Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id i65si2287572wma.122.2017.06.27.10.32.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jun 2017 10:32:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dPuM6-0000Ns-SU; Tue, 27 Jun 2017 18:32:50 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefan Hajnoczi , Paolo Bonzini Subject: [PATCH v3 1/2] tests/test-char.c: Don't use main_loop_wait()'s return value Date: Tue, 27 Jun 2017 18:32:48 +0100 Message-Id: <1498584769-12439-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498584769-12439-1-git-send-email-peter.maydell@linaro.org> References: <1498584769-12439-1-git-send-email-peter.maydell@linaro.org> In QEMU's main_loop() we used to check whether we should do a nonblocking call to main_loop(); this was deleted in commit e330c118f2a5, because now that vCPUs always drop the I/O thread lock it is an unnecessary optimization. The loop in test-char.c copied the old QEMU main_loop() code, but here the nonblocking check has never been necessary because this standalone test case doesn't hold the I/O lock anyway. Remove it, so we can drop the main_loop_wait() return value. Signed-off-by: Peter Maydell --- tests/test-char.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.7.4 Reviewed-by: Marc-André Lureau diff --git a/tests/test-char.c b/tests/test-char.c index 9e361c8..94ef708 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -20,13 +20,9 @@ typedef struct FeHandler { static void main_loop(void) { - bool nonblocking; - int last_io = 0; - quit = false; do { - nonblocking = last_io > 0; - last_io = main_loop_wait(nonblocking); + main_loop_wait(false); } while (!quit); }