Skip to content

Commit

Permalink
iommu/vt-d: Suppress compiler warnings
Browse files Browse the repository at this point in the history
suppress compiler warnings:
drivers/iommu/intel-iommu.c: In function ‘device_to_iommu’:
drivers/iommu/intel-iommu.c:673: warning: ‘segment’ may be used uninitialized in this function
drivers/iommu/intel-iommu.c: In function ‘get_domain_for_dev.clone.3’:
drivers/iommu/intel-iommu.c:2217: warning: ‘bridge_bus’ may be used uninitialized in this function
drivers/iommu/intel-iommu.c:2217: warning: ‘bridge_devfn’ may be used uninitialized in this function

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Yijing Wang authored and Joerg Roedel committed Jul 4, 2014
1 parent effad4b commit aa4d066
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devf
struct intel_iommu *iommu;
struct device *tmp;
struct pci_dev *ptmp, *pdev = NULL;
u16 segment;
u16 segment = 0;
int i;

if (dev_is_pci(dev)) {
Expand Down Expand Up @@ -2213,7 +2213,8 @@ static struct dmar_domain *get_domain_for_dev(struct device *dev, int gaw)
struct device_domain_info *info;
struct pci_dev *dev_tmp = NULL;
unsigned long flags;
u8 bus, devfn, bridge_bus, bridge_devfn;
u8 bus, devfn;
u8 bridge_bus = 0, bridge_devfn = 0;

domain = find_domain(dev);
if (domain)
Expand Down

0 comments on commit aa4d066

Please sign in to comment.