From: Andrew Cooper Date: Tue, 22 Sep 2020 19:05:22 +0000 (+0100) Subject: x86/msi: Fold pci_conf_write16() calls in write_msi_msg() X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~1600 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=af3c913f03b5f9eab15b168ef87cde80f9addc6e;p=xen.git x86/msi: Fold pci_conf_write16() calls in write_msi_msg() In addition, this removes the unqualified 0/1 passed to msi_data_reg() No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index a899c43e8d..5febc0ea4b 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -214,13 +214,10 @@ static int write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) pci_conf_write32(dev->sbdf, msi_lower_address_reg(pos), msg->address_lo); if ( entry->msi_attrib.is_64 ) - { pci_conf_write32(dev->sbdf, msi_upper_address_reg(pos), msg->address_hi); - pci_conf_write16(dev->sbdf, msi_data_reg(pos, 1), msg->data); - } - else - pci_conf_write16(dev->sbdf, msi_data_reg(pos, 0), msg->data); + pci_conf_write16(dev->sbdf, msi_data_reg(pos, entry->msi_attrib.is_64), + msg->data); break; } case PCI_CAP_ID_MSIX: