[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] i440fx: implement reset
From: |
David Woodhouse |
Subject: |
Re: [Qemu-devel] [PATCH] i440fx: implement reset |
Date: |
Wed, 20 Feb 2013 17:24:25 +0000 |
On Wed, 2013-02-20 at 17:17 +0100, Andreas Färber wrote:
> > +static void i440fx_reset(DeviceState *ds)
> > +{
> > + PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, ds);
> > + PCII440FXState *d = DO_UPCAST(PCII440FXState, dev, dev);
>
> Please don't use DO_UPCAST() on QOM objects, there's QOM cast macros for
> this, like PCI_DEVICE(). If there's one missing for PCII440FXState (I
> think I only added them for the PHB itself?), it's two lines to add.
Would you care to elaborate on exactly what those two lines would look
like? Being *completely* unfamiliar with qemu code, it took me long
enough to work out the DO_UPCAST version.
> > + uint8_t *pci_conf = d->dev.config;
> > +
> > + pci_conf[0x59] = 0x00; // Reset PAM setup
>
> scripts/checkpatch.pl will complain about this comment style.
Inherited from the code in PIIX3_reset. Will fix. Thanks.
--
dwmw2
smime.p7s
Description: S/MIME cryptographic signature