diff options
author | Joerg Roedel <jroedel@suse.de> | 2019-10-15 17:16:50 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2019-10-15 14:07:01 -0600 |
commit | 95f89e090618efca63918b658c2002e57d393036 (patch) | |
tree | d28948664f6756eb4acb9d174dc5f99da142cc2f /fs/nsfs.c | |
parent | 4f5cafb5cb8471e54afdc9054d973535614f7675 (diff) | |
download | linux-95f89e090618efca63918b658c2002e57d393036.tar.bz2 |
vfio/type1: Initialize resv_msi_base
After enabling CONFIG_IOMMU_DMA on X86 a new warning appears when
compiling vfio:
drivers/vfio/vfio_iommu_type1.c: In function ‘vfio_iommu_type1_attach_group’:
drivers/vfio/vfio_iommu_type1.c:1827:7: warning: ‘resv_msi_base’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ret = iommu_get_msi_cookie(domain->domain, resv_msi_base);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The warning is a false positive, because the call to iommu_get_msi_cookie()
only happens when vfio_iommu_has_sw_msi() returned true. And that only
happens when it also set resv_msi_base.
But initialize the variable anyway to get rid of the warning.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'fs/nsfs.c')
0 files changed, 0 insertions, 0 deletions