* [Qemu-devel] [PATCH] msi: minor cleanups
@ 2010-10-27 14:30 Michael S. Tsirkin
2010-10-28 2:03 ` [Qemu-devel] " Isaku Yamahata
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2010-10-27 14:30 UTC (permalink / raw)
To: qemu-devel, yamahata
Comment fixup (tell what it does not what it does not do),
typo fix, whitespace fix.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/msi.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/msi.c b/hw/msi.c
index 016e7a4..f03f519 100644
--- a/hw/msi.c
+++ b/hw/msi.c
@@ -155,9 +155,8 @@ int msi_init(struct PCIDevice *dev, uint8_t offset,
pci_set_word(dev->wmask + msi_data_off(dev, msi64bit), 0xffff);
if (msi_per_vector_mask) {
+ /* Make mask bits 0 to nr_vectors - 1 writeable. */
pci_set_long(dev->wmask + msi_mask_off(dev, msi64bit),
- /* (1U << nr_vectors) - 1 is undefined
- when nr_vectors = 32 */
0xffffffff >> (PCI_MSI_VECTORS_MAX - nr_vectors));
}
return config_offset;
@@ -225,7 +224,7 @@ void msi_notify(PCIDevice *dev, unsigned int vector)
return;
}
- if (msi64bit){
+ if (msi64bit) {
address = pci_get_quad(dev->config + msi_address_lo_off(dev));
} else {
address = pci_get_long(dev->config + msi_address_lo_off(dev));
@@ -269,7 +268,7 @@ void msi_write_config(PCIDevice *dev, uint32_t addr, uint32_t val, int len)
flags,
pci_get_long(dev->config + msi_address_lo_off(dev)));
if (msi64bit) {
- fprintf(stderr, " addrss-hi: 0x%"PRIx32,
+ fprintf(stderr, " address-hi: 0x%"PRIx32,
pci_get_long(dev->config + msi_address_hi_off(dev)));
}
fprintf(stderr, " data: 0x%"PRIx16,
--
1.7.3.2.91.g446ac
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [PATCH] msi: minor cleanups
2010-10-27 14:30 [Qemu-devel] [PATCH] msi: minor cleanups Michael S. Tsirkin
@ 2010-10-28 2:03 ` Isaku Yamahata
0 siblings, 0 replies; 2+ messages in thread
From: Isaku Yamahata @ 2010-10-28 2:03 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
Looks good.
On Wed, Oct 27, 2010 at 04:30:03PM +0200, Michael S. Tsirkin wrote:
> Comment fixup (tell what it does not what it does not do),
> typo fix, whitespace fix.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/msi.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/hw/msi.c b/hw/msi.c
> index 016e7a4..f03f519 100644
> --- a/hw/msi.c
> +++ b/hw/msi.c
> @@ -155,9 +155,8 @@ int msi_init(struct PCIDevice *dev, uint8_t offset,
> pci_set_word(dev->wmask + msi_data_off(dev, msi64bit), 0xffff);
>
> if (msi_per_vector_mask) {
> + /* Make mask bits 0 to nr_vectors - 1 writeable. */
> pci_set_long(dev->wmask + msi_mask_off(dev, msi64bit),
> - /* (1U << nr_vectors) - 1 is undefined
> - when nr_vectors = 32 */
> 0xffffffff >> (PCI_MSI_VECTORS_MAX - nr_vectors));
> }
> return config_offset;
> @@ -225,7 +224,7 @@ void msi_notify(PCIDevice *dev, unsigned int vector)
> return;
> }
>
> - if (msi64bit){
> + if (msi64bit) {
> address = pci_get_quad(dev->config + msi_address_lo_off(dev));
> } else {
> address = pci_get_long(dev->config + msi_address_lo_off(dev));
> @@ -269,7 +268,7 @@ void msi_write_config(PCIDevice *dev, uint32_t addr, uint32_t val, int len)
> flags,
> pci_get_long(dev->config + msi_address_lo_off(dev)));
> if (msi64bit) {
> - fprintf(stderr, " addrss-hi: 0x%"PRIx32,
> + fprintf(stderr, " address-hi: 0x%"PRIx32,
> pci_get_long(dev->config + msi_address_hi_off(dev)));
> }
> fprintf(stderr, " data: 0x%"PRIx16,
> --
> 1.7.3.2.91.g446ac
>
--
yamahata
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-28 2:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-27 14:30 [Qemu-devel] [PATCH] msi: minor cleanups Michael S. Tsirkin
2010-10-28 2:03 ` [Qemu-devel] " Isaku Yamahata
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).