Message ID | 1515756676-3860-43-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="D/s6rzPe"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zJ1gH53yVz9sNw for <incoming@patchwork.ozlabs.org>; Fri, 12 Jan 2018 23:06:19 +1100 (AEDT) Received: from localhost ([::1]:36006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1eZy6D-0003u8-MK for incoming@patchwork.ozlabs.org; Fri, 12 Jan 2018 07:06:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1eZxZC-0007sF-DW for qemu-devel@nongnu.org; Fri, 12 Jan 2018 06:32:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1eZxZB-0005tf-IO for qemu-devel@nongnu.org; Fri, 12 Jan 2018 06:32:10 -0500 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:44058) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1eZxZB-0005sq-CD for qemu-devel@nongnu.org; Fri, 12 Jan 2018 06:32:09 -0500 Received: by mail-wr0-x241.google.com with SMTP id w50so5008340wrc.11 for <qemu-devel@nongnu.org>; Fri, 12 Jan 2018 03:32:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XpGusnd7R7MpGFIgZ/wEWOlLdX5OgpIFI/U/fl4T5P0=; b=D/s6rzPe6vbj8HooxT0tfkAYwBDnQKJEls4gira1nJjIAVIoGOifKALk9y0dhwJJxZ N4qugdlMlkfiCt9i7amFBiS6mIlNZX5R6w5etcJtCrOtR0q8qhLkTriwXRDu1xZAnMbK t0QTwuCwXj/AW2ZeImDNznqy+Yeh/mvyyr6ANDfQkcWLAyNINRfV9SXnMBGTIvWiU8fN 5dEHvQo1H+FSE5vdFZLb5CGadWHZ+KKn5dLEAWO8B5ujQ4TrAvYR8iHUZczfDdirSefP QGTU8su6vs5DHPwGHvYwiAByNax2z+XhwkigRtFY9906I63SCE1Y/tJMVJYzt1bGUiBh RY5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=XpGusnd7R7MpGFIgZ/wEWOlLdX5OgpIFI/U/fl4T5P0=; b=Zj35+kS3QeLJcvuZaE1u+euDbVns9IFYCDU51XnGOZ4TGj7zgLPFqOH/XXfQ03DA9H 39avWnn708v1GLNDz0AjW5YjTlXQ4aK+U1NARlWjONknAsuaC8CwuC4Zt2kWe0DFBZ3D 6FsYhi7mD+6X8MA5wC1xqm3Yf8i6LqK0mWr2QWE3T4w+eVbp7Q3vHNefXqhsYXok9DdI goLmvALNmVPHwyx32JZgkzIDxGG+NxzCmKV0WNzrz24m+k5wiI7tOhrVvZ+s0IF678O1 HDXC6uJgWX4smsK2kxP6cv1fzT8fXjHfF6t2SdbuU22yzswcbtPOL43bDe0vFVf7FnAK sg3g== X-Gm-Message-State: AKwxytclsPYOzevzz8xrU106yqB/bvrlPGyPZY3TKrWCpbuhHeukAk60 6xy9ecXsRRhos+u3OZGJD3x/LP6v X-Google-Smtp-Source: ACJfBoszOVgOmmAQifHFmYccA0ZDnW6S7nxaUulPSIwCHmRDmUKMPZlmE6RYMc5ZJOO2H4wHf1HTag== X-Received: by 10.223.134.58 with SMTP id 55mr4295242wrv.262.1515756728068; Fri, 12 Jan 2018 03:32:08 -0800 (PST) Received: from 640k.lan (dynamic-adsl-78-12-229-84.clienti.tiscali.it. [78.12.229.84]) by smtp.gmail.com with ESMTPSA id l8sm2732271wmg.46.2018.01.12.03.32.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jan 2018 03:32:07 -0800 (PST) From: Paolo Bonzini <pbonzini@redhat.com> To: qemu-devel@nongnu.org Date: Fri, 12 Jan 2018 12:31:06 +0100 Message-Id: <1515756676-3860-43-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1515756676-3860-1-git-send-email-pbonzini@redhat.com> References: <1515756676-3860-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PULL 42/52] chardev: Use goto/label instead of do/break/while(0) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
[PULL,01/52] scsi-generic: Add share-rw option
|
expand
|
diff --git a/chardev/char-serial.c b/chardev/char-serial.c index 2f8f838..10162f9 100644 --- a/chardev/char-serial.c +++ b/chardev/char-serial.c @@ -64,9 +64,14 @@ static void tty_serial_init(int fd, int speed, #endif tcgetattr(fd, &tty); -#define check_speed(val) if (speed <= val) { spd = B##val; break; } +#define check_speed(val) \ + if (speed <= val) { \ + spd = B##val; \ + goto done; \ + } + speed = speed * 10 / 11; - do { + { check_speed(50); check_speed(75); check_speed(110); @@ -125,8 +130,10 @@ static void tty_serial_init(int fd, int speed, check_speed(4000000); #endif spd = B115200; - } while (0); + } +#undef check_speed + done: cfsetispeed(&tty, spd); cfsetospeed(&tty, spd);