lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1943275.8rWz7lOq5N@mobilepool36.emlix.com>
Date:   Thu, 03 Jun 2021 10:41:19 +0200
From:   Rolf Eike Beer <eb@...ix.com>
To:     David Woodhouse <dwmw2@...radead.org>
Cc:     Lu Baolu <baolu.lu@...ux.intel.com>,
        Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
        iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: [PATCH] iommu/vt-d: move variable to more local scope

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

Signed-off-by: Rolf Eike Beer <eb@...ix.com>
---
 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ