qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH] pci: initialize header type register.


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] Re: [PATCH] pci: initialize header type register.
Date: Mon, 08 Feb 2010 20:55:58 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0

  Hi,

This still means we have two copies of same data
and need to maintain code that keeps them in sync,
even if that is called just at init time.

No.  There is nothing to keep in sync.  And there is no extra copy of data.

Today you have pci_set_*() calls somewhere in PCIDeviceInfo->init().
I'd like to see them replaced with PCIDeviceInfo->$field + setup in common code. The information that device $foo has vendor id 42 and device id 4711 (and other properties) just moves from code to data.

It is static information, it should be static data. And having the information in a well defined place in a data structure instead of hidden somewhere in the ->init() code makes it alot easier to reuse the information for something else. That is the whole point.

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]