diff mbox

[v2,09/38] hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids

Message ID 769ccda905c18b6bed03de5356dcb5d3e99d0f4e.1305650874.git.yamahata@valinux.co.jp
State New
Headers show

Commit Message

Isaku Yamahata May 17, 2011, 4:55 p.m. UTC
use PCIDeviceInfo to initialize ids.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
 hw/acpi_piix4.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Comments

Markus Armbruster May 19, 2011, 8:10 a.m. UTC | #1
Isaku Yamahata <yamahata@valinux.co.jp> writes:

> use PCIDeviceInfo to initialize ids.
>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> ---
>  hw/acpi_piix4.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
> index 96f5222..03d833a 100644
> --- a/hw/acpi_piix4.c
> +++ b/hw/acpi_piix4.c
> @@ -317,13 +317,9 @@ static int piix4_pm_initfn(PCIDevice *dev)
>      uint8_t *pci_conf;
>  
>      pci_conf = s->dev.config;
> -    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
> -    pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371AB_3);
>      pci_conf[0x06] = 0x80;
>      pci_conf[0x07] = 0x02;
> -    pci_conf[0x08] = 0x03; // revision number
>      pci_conf[0x09] = 0x00;
> -    pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_OTHER);
>      pci_conf[0x3d] = 0x01; // interrupt pin 1
>  
>      pci_conf[0x40] = 0x01; /* PM io base read only bit */
> @@ -394,6 +390,10 @@ static PCIDeviceInfo piix4_pm_info = {
>      .no_hotplug         = 1,
>      .init               = piix4_pm_initfn,
>      .config_write       = pm_write_config,
> +    .vendor_id          = PCI_VENDOR_ID_INTEL,
> +    .device_id          = PCI_DEVICE_ID_INTEL_82371AB_3,
> +    .revision           = 0x03, // revision number

The comment is now redundant.  Drop it?

> +    .class_id           = PCI_CLASS_BRIDGE_OTHER,
>      .qdev.props         = (Property[]) {
>          DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0),
>          DEFINE_PROP_END_OF_LIST(),
Isaku Yamahata May 19, 2011, 11:55 a.m. UTC | #2
On Thu, May 19, 2011 at 10:10:09AM +0200, Markus Armbruster wrote:
> Isaku Yamahata <yamahata@valinux.co.jp> writes:
> 
> > use PCIDeviceInfo to initialize ids.
> >
> > Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> > ---
> >  hw/acpi_piix4.c |    8 ++++----
> >  1 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
> > index 96f5222..03d833a 100644
> > --- a/hw/acpi_piix4.c
> > +++ b/hw/acpi_piix4.c
> > @@ -317,13 +317,9 @@ static int piix4_pm_initfn(PCIDevice *dev)
> >      uint8_t *pci_conf;
> >  
> >      pci_conf = s->dev.config;
> > -    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
> > -    pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371AB_3);
> >      pci_conf[0x06] = 0x80;
> >      pci_conf[0x07] = 0x02;
> > -    pci_conf[0x08] = 0x03; // revision number
> >      pci_conf[0x09] = 0x00;
> > -    pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_OTHER);
> >      pci_conf[0x3d] = 0x01; // interrupt pin 1
> >  
> >      pci_conf[0x40] = 0x01; /* PM io base read only bit */
> > @@ -394,6 +390,10 @@ static PCIDeviceInfo piix4_pm_info = {
> >      .no_hotplug         = 1,
> >      .init               = piix4_pm_initfn,
> >      .config_write       = pm_write_config,
> > +    .vendor_id          = PCI_VENDOR_ID_INTEL,
> > +    .device_id          = PCI_DEVICE_ID_INTEL_82371AB_3,
> > +    .revision           = 0x03, // revision number
> 
> The comment is now redundant.  Drop it?

Okay, will do.

> 
> > +    .class_id           = PCI_CLASS_BRIDGE_OTHER,
> >      .qdev.props         = (Property[]) {
> >          DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0),
> >          DEFINE_PROP_END_OF_LIST(),
>
Michael S. Tsirkin May 19, 2011, 11:59 a.m. UTC | #3
On Thu, May 19, 2011 at 08:55:13PM +0900, Isaku Yamahata wrote:
> On Thu, May 19, 2011 at 10:10:09AM +0200, Markus Armbruster wrote:
> > Isaku Yamahata <yamahata@valinux.co.jp> writes:
> > 
> > > use PCIDeviceInfo to initialize ids.
> > >
> > > Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> > > ---
> > >  hw/acpi_piix4.c |    8 ++++----
> > >  1 files changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
> > > index 96f5222..03d833a 100644
> > > --- a/hw/acpi_piix4.c
> > > +++ b/hw/acpi_piix4.c
> > > @@ -317,13 +317,9 @@ static int piix4_pm_initfn(PCIDevice *dev)
> > >      uint8_t *pci_conf;
> > >  
> > >      pci_conf = s->dev.config;
> > > -    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
> > > -    pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371AB_3);
> > >      pci_conf[0x06] = 0x80;
> > >      pci_conf[0x07] = 0x02;
> > > -    pci_conf[0x08] = 0x03; // revision number
> > >      pci_conf[0x09] = 0x00;
> > > -    pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_OTHER);
> > >      pci_conf[0x3d] = 0x01; // interrupt pin 1
> > >  
> > >      pci_conf[0x40] = 0x01; /* PM io base read only bit */
> > > @@ -394,6 +390,10 @@ static PCIDeviceInfo piix4_pm_info = {
> > >      .no_hotplug         = 1,
> > >      .init               = piix4_pm_initfn,
> > >      .config_write       = pm_write_config,
> > > +    .vendor_id          = PCI_VENDOR_ID_INTEL,
> > > +    .device_id          = PCI_DEVICE_ID_INTEL_82371AB_3,
> > > +    .revision           = 0x03, // revision number
> > 
> > The comment is now redundant.  Drop it?
> 
> Okay, will do.

no reason to respin the whole patchset, just this patch.

> > 
> > > +    .class_id           = PCI_CLASS_BRIDGE_OTHER,
> > >      .qdev.props         = (Property[]) {
> > >          DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0),
> > >          DEFINE_PROP_END_OF_LIST(),
> > 
> 
> -- 
> yamahata
Markus Armbruster May 19, 2011, 12:36 p.m. UTC | #4
"Michael S. Tsirkin" <mst@redhat.com> writes:

> On Thu, May 19, 2011 at 08:55:13PM +0900, Isaku Yamahata wrote:
>> On Thu, May 19, 2011 at 10:10:09AM +0200, Markus Armbruster wrote:
>> > Isaku Yamahata <yamahata@valinux.co.jp> writes:
>> > 
>> > > use PCIDeviceInfo to initialize ids.
>> > >
>> > > Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
>> > > ---
>> > >  hw/acpi_piix4.c |    8 ++++----
>> > >  1 files changed, 4 insertions(+), 4 deletions(-)
>> > >
>> > > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
>> > > index 96f5222..03d833a 100644
>> > > --- a/hw/acpi_piix4.c
>> > > +++ b/hw/acpi_piix4.c
>> > > @@ -317,13 +317,9 @@ static int piix4_pm_initfn(PCIDevice *dev)
>> > >      uint8_t *pci_conf;
>> > >  
>> > >      pci_conf = s->dev.config;
>> > > -    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
>> > > -    pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371AB_3);
>> > >      pci_conf[0x06] = 0x80;
>> > >      pci_conf[0x07] = 0x02;
>> > > -    pci_conf[0x08] = 0x03; // revision number
>> > >      pci_conf[0x09] = 0x00;
>> > > -    pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_OTHER);
>> > >      pci_conf[0x3d] = 0x01; // interrupt pin 1
>> > >  
>> > >      pci_conf[0x40] = 0x01; /* PM io base read only bit */
>> > > @@ -394,6 +390,10 @@ static PCIDeviceInfo piix4_pm_info = {
>> > >      .no_hotplug         = 1,
>> > >      .init               = piix4_pm_initfn,
>> > >      .config_write       = pm_write_config,
>> > > +    .vendor_id          = PCI_VENDOR_ID_INTEL,
>> > > +    .device_id          = PCI_DEVICE_ID_INTEL_82371AB_3,
>> > > +    .revision           = 0x03, // revision number
>> > 
>> > The comment is now redundant.  Drop it?
>> 
>> Okay, will do.
>
> no reason to respin the whole patchset, just this patch.

Same comment in 14/38 and possibly more.  Suggest a quick grep.

[...]
Isaku Yamahata May 19, 2011, 1:06 p.m. UTC | #5
On Thu, May 19, 2011 at 02:36:04PM +0200, Markus Armbruster wrote:
> > no reason to respin the whole patchset, just this patch.
> 
> Same comment in 14/38 and possibly more.  Suggest a quick grep.

I revised the series and fixed the followings.
03, 08, 11, 14, 18, 22, 26, 30, 31, 33, 35, 39, 40, 41

Should I send only the updated one or resend the whole series?
Michael S. Tsirkin May 19, 2011, 1:43 p.m. UTC | #6
On Thu, May 19, 2011 at 10:06:20PM +0900, Isaku Yamahata wrote:
> On Thu, May 19, 2011 at 02:36:04PM +0200, Markus Armbruster wrote:
> > > no reason to respin the whole patchset, just this patch.
> > 
> > Same comment in 14/38 and possibly more.  Suggest a quick grep.
> 
> I revised the series and fixed the followings.
> 03, 08, 11, 14, 18, 22, 26, 30, 31, 33, 35, 39, 40, 41
> 
> Should I send only the updated one or resend the whole series?

whole series.
But assuming comment is the only change let's wait a couple of days for more comments,
reduce the load on the list.

> yamahata
diff mbox

Patch

diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index 96f5222..03d833a 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -317,13 +317,9 @@  static int piix4_pm_initfn(PCIDevice *dev)
     uint8_t *pci_conf;
 
     pci_conf = s->dev.config;
-    pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
-    pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371AB_3);
     pci_conf[0x06] = 0x80;
     pci_conf[0x07] = 0x02;
-    pci_conf[0x08] = 0x03; // revision number
     pci_conf[0x09] = 0x00;
-    pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_OTHER);
     pci_conf[0x3d] = 0x01; // interrupt pin 1
 
     pci_conf[0x40] = 0x01; /* PM io base read only bit */
@@ -394,6 +390,10 @@  static PCIDeviceInfo piix4_pm_info = {
     .no_hotplug         = 1,
     .init               = piix4_pm_initfn,
     .config_write       = pm_write_config,
+    .vendor_id          = PCI_VENDOR_ID_INTEL,
+    .device_id          = PCI_DEVICE_ID_INTEL_82371AB_3,
+    .revision           = 0x03, // revision number
+    .class_id           = PCI_CLASS_BRIDGE_OTHER,
     .qdev.props         = (Property[]) {
         DEFINE_PROP_UINT32("smb_io_base", PIIX4PMState, smb_io_base, 0),
         DEFINE_PROP_END_OF_LIST(),