From: Jan Beulich Date: Thu, 29 Oct 2015 13:23:35 +0000 (+0100) Subject: AMD Vi: fix HPET ID check X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e06f1c36d36260b7d82f8563f1a6f226160d4b23;p=xen.git AMD Vi: fix HPET ID check Cherry picked from commit 2ca9fbd739 ("AMD IOMMU: allocate IRTE entries instead of using a static mapping") mainly to fix build with gcc 5.x. Signed-off-by: Jan Beulich --- diff --git a/xen/drivers/passthrough/amd/iommu_intr.c b/xen/drivers/passthrough/amd/iommu_intr.c index 794304936b..789f564f61 100644 --- a/xen/drivers/passthrough/amd/iommu_intr.c +++ b/xen/drivers/passthrough/amd/iommu_intr.c @@ -449,8 +449,7 @@ void* __init amd_iommu_alloc_intremap_table(void) int __init amd_setup_hpet_msi(struct msi_desc *msi_desc) { - if ( (!msi_desc->hpet_id != hpet_sbdf.id) || - (hpet_sbdf.iommu == NULL) ) + if ( msi_desc->hpet_id != hpet_sbdf.id || !hpet_sbdf.iommu ) { AMD_IOMMU_DEBUG("Fail to setup HPET MSI remapping\n"); return 1;