[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] ioemu: Enable guest OS to program D0-D3hot states of an assigned device
On Tue, Feb 03, 2009 at 06:54:45PM +0900, Yuji Shimada wrote: > This patch enables guest OS to program D0-D3hot states of assigned > device. > > Thanks, Hi. Just a minor nit. LIST_FOREACH() and LIST_FIRST() should be used instead of direct use of lh_first, le_next for consistency. Many "switch(len) case [124] pci_{read, write}_{byte, word, long}():" are duplicated. The duplication can be removed by using something like the followings (NOTE: I didn't compile it) static uint32_t __pci_read_config(struct pci_dev *pci_dev, uint32_t address, int len) { uint32_t val = 0xffffffff; switch (len) { case 1: val = pci_read_byte(pci_dev, address); break; case 2: val = pci_read_word(pci_dev, address); break; case 4: val = pci_read_long(pci_dev, address); break; } return val; } static void __pci_write_config(struct pci_dev *pci_dev, uint32_t address, int len, uint32_t val) { switch (len) { case 1: pci_write_byte(pci_dev, address, val); break; case 2: pci_write_word(pci_dev, address, val); break; case 4: pci_write_long(pci_dev, address, val); break; } } thanks, -- yamahata _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |