From patchwork Wed Apr 14 05:28:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 50101 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D708AB7D0C for ; Wed, 14 Apr 2010 15:43:23 +1000 (EST) Received: from localhost ([127.0.0.1]:48294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1vNS-00046f-LE for incoming@patchwork.ozlabs.org; Wed, 14 Apr 2010 01:43:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1vBa-0002G2-IN for qemu-devel@nongnu.org; Wed, 14 Apr 2010 01:30:50 -0400 Received: from [140.186.70.92] (port=49007 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1vBV-0002E1-Qk for qemu-devel@nongnu.org; Wed, 14 Apr 2010 01:30:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1vBU-0005zL-8d for qemu-devel@nongnu.org; Wed, 14 Apr 2010 01:30:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35180) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1vBU-0005z7-10 for qemu-devel@nongnu.org; Wed, 14 Apr 2010 01:30:44 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3E5Ugtr019406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Apr 2010 01:30:42 -0400 Received: from localhost (vpn-236-230.phx2.redhat.com [10.3.236.230]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3E5Ue6w001538; Wed, 14 Apr 2010 01:30:41 -0400 From: Amit Shah To: Anthony Liguori Date: Wed, 14 Apr 2010 10:58:26 +0530 Message-Id: <1271222917-7803-7-git-send-email-amit.shah@redhat.com> In-Reply-To: <1271222917-7803-6-git-send-email-amit.shah@redhat.com> References: <1271222917-7803-1-git-send-email-amit.shah@redhat.com> <1271222917-7803-2-git-send-email-amit.shah@redhat.com> <1271222917-7803-3-git-send-email-amit.shah@redhat.com> <1271222917-7803-4-git-send-email-amit.shah@redhat.com> <1271222917-7803-5-git-send-email-amit.shah@redhat.com> <1271222917-7803-6-git-send-email-amit.shah@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: qemu list , Amit Shah , Gerd Hoffmann , Juan Quintela Subject: [Qemu-devel] [PATCH v5 06/17] virtio-serial: whitespace: match surrounding code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The virtio-serial code doesn't mix declarations and definitions, so separate them out on different lines. Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index bb11a9b..8efba0b 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/virtio-serial-bus.c @@ -354,7 +354,10 @@ static void handle_input(VirtIODevice *vdev, VirtQueue *vq) static uint32_t get_features(VirtIODevice *vdev, uint32_t features) { - VirtIOSerial *vser = DO_UPCAST(VirtIOSerial, vdev, vdev); + VirtIOSerial *vser; + + vser = DO_UPCAST(VirtIOSerial, vdev, vdev); + if (vser->bus->max_nr_ports > 1) { features |= (1 << VIRTIO_CONSOLE_F_MULTIPORT); }