From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znlk3-0005aa-7G for qemu-devel@nongnu.org; Sun, 18 Oct 2015 07:03:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Znlk2-0001Jj-Dh for qemu-devel@nongnu.org; Sun, 18 Oct 2015 07:03:07 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:38565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Znlk2-0001Jf-8K for qemu-devel@nongnu.org; Sun, 18 Oct 2015 07:03:06 -0400 Received: by wicll6 with SMTP id ll6so62924440wic.1 for ; Sun, 18 Oct 2015 04:03:05 -0700 (PDT) References: <1444837878-11602-1-git-send-email-knut.omang@oracle.com> <1444837878-11602-5-git-send-email-knut.omang@oracle.com> From: Marcel Apfelbaum Message-ID: <56237C65.7050800@gmail.com> Date: Sun, 18 Oct 2015 14:03:01 +0300 MIME-Version: 1.0 In-Reply-To: <1444837878-11602-5-git-send-email-knut.omang@oracle.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 4/4] pcie: A few minor fixes (type+code simplify) Reply-To: marcel@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Knut Omang , qemu-devel@nongnu.org Cc: Eduardo Habkost , "Michael S. Tsirkin" , "Richard W.M. Jones" , Alex Williamson , "Gonglei (Arei)" , Jan Kiszka , Paolo Bonzini , Dotan Barak , Richard Henderson On 10/14/2015 06:51 PM, Knut Omang wrote: > - Fix comment typo in pcie_cap_slot_write_config > - Simplify code in pcie_cap_slot_hot_unplug_request_cb. > > Signed-off-by: Knut Omang > --- > 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) && > Reviewed-by: Marcel Apfelbaum Thanks, Marcel