From patchwork Thu Nov 12 05:58:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 38206 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 96F7AB70CF for ; Thu, 12 Nov 2009 17:19:15 +1100 (EST) Received: from localhost ([127.0.0.1]:52876 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8T1U-0001Ky-FI for incoming@patchwork.ozlabs.org; Thu, 12 Nov 2009 01:19:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8Snp-0000YU-Bp for qemu-devel@nongnu.org; Thu, 12 Nov 2009 01:05:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8Snj-0000So-3E for qemu-devel@nongnu.org; Thu, 12 Nov 2009 01:05:03 -0500 Received: from [199.232.76.173] (port=53898 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8Sni-0000SF-NH for qemu-devel@nongnu.org; Thu, 12 Nov 2009 01:04:58 -0500 Received: from mail.valinux.co.jp ([210.128.90.3]:53582) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N8Snh-0001Dg-P7 for qemu-devel@nongnu.org; Thu, 12 Nov 2009 01:04:58 -0500 Received: from nm.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with ESMTP id D4B844A411; Thu, 12 Nov 2009 15:04:54 +0900 (JST) Received: from yamahata by nm.local.valinux.co.jp with local (Exim 4.69) (envelope-from ) id 1N8Shl-0006cT-30; Thu, 12 Nov 2009 14:58:49 +0900 From: Isaku Yamahata To: qemu-devel@nongnu.org, mst@redhat.com Date: Thu, 12 Nov 2009 14:58:43 +0900 Message-Id: <1258005528-25383-16-git-send-email-yamahata@valinux.co.jp> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1258005528-25383-1-git-send-email-yamahata@valinux.co.jp> References: <1258005528-25383-1-git-send-email-yamahata@valinux.co.jp> X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: yamahata@valinux.co.jp Subject: [Qemu-devel] [PATCH 15/20] pci: clean up of pci_update_mappings() 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 This patch converts r->size == 0 to !r_size. Signed-off-by: Isaku Yamahata Acked-by: Michael S. Tsirkin --- hw/pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 9698efb..cae3d53 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -732,7 +732,7 @@ static void pci_update_mappings(PCIDevice *d) r = &d->io_regions[i]; /* this region isn't registered */ - if (r->size == 0) + if (!r->size) continue; if (r->type & PCI_BASE_ADDRESS_SPACE_IO) {