From patchwork Wed Mar 24 14:49:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Shah X-Patchwork-Id: 48423 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 DFD99B7CF1 for ; Thu, 25 Mar 2010 02:06:36 +1100 (EST) Received: from localhost ([127.0.0.1]:51299 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuS8E-0005Zc-G2 for incoming@patchwork.ozlabs.org; Wed, 24 Mar 2010 11:04:30 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NuRvd-0001kn-52 for qemu-devel@nongnu.org; Wed, 24 Mar 2010 10:51:29 -0400 Received: from [140.186.70.92] (port=60823 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuRvX-0001i1-KB for qemu-devel@nongnu.org; Wed, 24 Mar 2010 10:51:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuRvU-0006SQ-ET for qemu-devel@nongnu.org; Wed, 24 Mar 2010 10:51:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1898) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuRvU-0006S4-7H for qemu-devel@nongnu.org; Wed, 24 Mar 2010 10:51:20 -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 o2OEpIZn013269 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 24 Mar 2010 10:51:19 -0400 Received: from localhost (vpn-11-150.rdu.redhat.com [10.11.11.150]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2OEpHh8018184; Wed, 24 Mar 2010 10:51:17 -0400 From: Amit Shah To: qemu list Date: Wed, 24 Mar 2010 20:19:24 +0530 Message-Id: <1269442173-18421-7-git-send-email-amit.shah@redhat.com> In-Reply-To: <1269442173-18421-6-git-send-email-amit.shah@redhat.com> References: <1269442173-18421-1-git-send-email-amit.shah@redhat.com> <1269442173-18421-2-git-send-email-amit.shah@redhat.com> <1269442173-18421-3-git-send-email-amit.shah@redhat.com> <1269442173-18421-4-git-send-email-amit.shah@redhat.com> <1269442173-18421-5-git-send-email-amit.shah@redhat.com> <1269442173-18421-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: Amit Shah , Juan Quintela , Gerd Hoffmann , "Michael S. Tsirkin" Subject: [Qemu-devel] [PATCH 06/15] 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 00e8616..80f0259 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); }