From patchwork Wed Oct 14 15:51:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Knut Omang X-Patchwork-Id: 530240 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 D62BD140F99 for ; Thu, 15 Oct 2015 02:55:48 +1100 (AEDT) Received: from localhost ([::1]:43137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmOP4-0000mm-Nn for incoming@patchwork.ozlabs.org; Wed, 14 Oct 2015 11:55:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmOLg-0002ky-Ml for qemu-devel@nongnu.org; Wed, 14 Oct 2015 11:52:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmOLc-0002il-FN for qemu-devel@nongnu.org; Wed, 14 Oct 2015 11:52:16 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:31888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmOLc-0002hl-9B for qemu-devel@nongnu.org; Wed, 14 Oct 2015 11:52:12 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t9EFpwN9005325 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Oct 2015 15:51:59 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t9EFpw5J011087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 14 Oct 2015 15:51:58 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t9EFpvEA023995; Wed, 14 Oct 2015 15:51:57 GMT Received: from abi.no.oracle.com (/10.172.144.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 14 Oct 2015 08:51:57 -0700 From: Knut Omang To: qemu-devel@nongnu.org Date: Wed, 14 Oct 2015 17:51:18 +0200 Message-Id: <1444837878-11602-5-git-send-email-knut.omang@oracle.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1444837878-11602-1-git-send-email-knut.omang@oracle.com> References: <1444837878-11602-1-git-send-email-knut.omang@oracle.com> X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 Cc: Eduardo Habkost , "Michael S. Tsirkin" , Knut Omang , "Richard W.M. Jones" , Alex Williamson , "Gonglei \(Arei\)" , Jan Kiszka , Paolo Bonzini , Dotan Barak , Richard Henderson Subject: [Qemu-devel] [PATCH v5 4/4] pcie: A few minor fixes (type+code simplify) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org - Fix comment typo in pcie_cap_slot_write_config - Simplify code in pcie_cap_slot_hot_unplug_request_cb. Signed-off-by: Knut Omang Reviewed-by: Marcel Apfelbaum --- hw/pci/pcie.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 774b9ed..ba49c0f 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -265,10 +265,11 @@ void pcie_cap_slot_hot_unplug_request_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { uint8_t *exp_cap; + PCIDevice *pdev = PCI_DEVICE(hotplug_dev); - pcie_cap_slot_hotplug_common(PCI_DEVICE(hotplug_dev), dev, &exp_cap, errp); + pcie_cap_slot_hotplug_common(pdev, dev, &exp_cap, errp); - pcie_cap_slot_push_attention_button(PCI_DEVICE(hotplug_dev)); + pcie_cap_slot_push_attention_button(pdev); } /* pci express slot for pci express root/downstream port @@ -408,7 +409,7 @@ void pcie_cap_slot_write_config(PCIDevice *dev, } /* - * If the slot is polulated, power indicator is off and power + * If the slot is populated, power indicator is off and power * controller is off, it is safe to detach the devices. */ if ((sltsta & PCI_EXP_SLTSTA_PDS) && (val & PCI_EXP_SLTCTL_PCC) &&