From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6k1S-00061H-4Y for qemu-devel@nongnu.org; Tue, 27 Apr 2010 08:36:18 -0400 Received: from [140.186.70.92] (port=51321 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6k1Q-00060d-Q0 for qemu-devel@nongnu.org; Tue, 27 Apr 2010 08:36:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6k1L-0002km-CM for qemu-devel@nongnu.org; Tue, 27 Apr 2010 08:36:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10270) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6k1K-0002kX-OA for qemu-devel@nongnu.org; Tue, 27 Apr 2010 08:36:10 -0400 From: Amit Shah Date: Tue, 27 Apr 2010 18:04:00 +0530 Message-Id: <1272371652-23087-7-git-send-email-amit.shah@redhat.com> In-Reply-To: <1272371652-23087-6-git-send-email-amit.shah@redhat.com> References: <1272371652-23087-1-git-send-email-amit.shah@redhat.com> <1272371652-23087-2-git-send-email-amit.shah@redhat.com> <1272371652-23087-3-git-send-email-amit.shah@redhat.com> <1272371652-23087-4-git-send-email-amit.shah@redhat.com> <1272371652-23087-5-git-send-email-amit.shah@redhat.com> <1272371652-23087-6-git-send-email-amit.shah@redhat.com> Subject: [Qemu-devel] [PATCH v6 06/18] virtio-serial: whitespace: match surrounding code List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Amit Shah , qemu list , Juan Quintela 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); } -- 1.6.2.5