It is only used inside the loop and the old value is not reused.

Signed-off-by: Rolf Eike Beer <[email protected]>
---
 drivers/iommu/intel/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index be35284a2016..fa262b805dd6 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -2340,7 +2340,6 @@ __domain_mapping(struct dmar_domain *domain, unsigned 
long iov_pfn,
                 unsigned long phys_pfn, unsigned long nr_pages, int prot)
 {
        unsigned int largepage_lvl = 0;
-       unsigned long lvl_pages = 0;
        struct dma_pte *pte = NULL;
        phys_addr_t pteval;
        u64 attr;
@@ -2366,6 +2365,7 @@ __domain_mapping(struct dmar_domain *domain, unsigned 
long iov_pfn,
 
        while (nr_pages > 0) {
                uint64_t tmp;
+               unsigned long lvl_pages;
 
                if (!pte) {
                        largepage_lvl = hardware_largepage_caps(domain, iov_pfn,
-- 
2.31.1


-- 
Rolf Eike Beer, emlix GmbH, https://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source


_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to