Skip to content

Commit

Permalink
iommu/amd: Remove local variables
Browse files Browse the repository at this point in the history
The usage of the local variables 'range' and 'misc' was removed
from commit 226e889 ("iommu/amd: Remove first/last_device handling")
and commit 23c742d ("iommu/amd: Split out PCI related parts of
IOMMU initialization"). So, remove them accrodingly.

Signed-off-by: Adrian Huang <ahuang12@lenovo.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Adrian Huang authored and Joerg Roedel committed Jan 7, 2020
1 parent 2ca6b6d commit 858defa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/iommu/amd_iommu_init.c
Original file line number Diff line number Diff line change
@@ -1718,7 +1718,7 @@ static const struct attribute_group *amd_iommu_groups[] = {
static int __init iommu_init_pci(struct amd_iommu *iommu)
{
int cap_ptr = iommu->cap_ptr;
u32 range, misc, low, high;
u32 low, high;
int ret;

iommu->dev = pci_get_domain_bus_and_slot(0, PCI_BUS_NUM(iommu->devid),
@@ -1731,10 +1731,6 @@ static int __init iommu_init_pci(struct amd_iommu *iommu)

pci_read_config_dword(iommu->dev, cap_ptr + MMIO_CAP_HDR_OFFSET,
&iommu->cap);
pci_read_config_dword(iommu->dev, cap_ptr + MMIO_RANGE_OFFSET,
&range);
pci_read_config_dword(iommu->dev, cap_ptr + MMIO_MISC_OFFSET,
&misc);

if (!(iommu->cap & (1 << IOMMU_CAP_IOTLB)))
amd_iommu_iotlb_sup = false;

0 comments on commit 858defa

Please sign in to comment.