projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8124c8a
)
iommu/vt-d: Remove redundant assignment to variable agaw
author
Colin Ian King
<colin.king@canonical.com>
Thu, 10 Jun 2021 02:00:53 +0000
(10:00 +0800)
committer
Joerg Roedel
<jroedel@suse.de>
Thu, 10 Jun 2021 07:06:12 +0000
(09:06 +0200)
The variable agaw is initialized with a value that is never read and it
is being updated later with a new value as a counter in a for-loop. The
initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link:
https://lore.kernel.org/r/20210416171826.64091-1-colin.king@canonical.com
Link:
https://lore.kernel.org/r/20210610020115.1637656-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/intel/iommu.c
b/drivers/iommu/intel/iommu.c
index be35284a201600a9bf924204e735361bf75cf515..65c2ed7600601f0d778931edd127ed56f59e25c2 100644
(file)
--- a/
drivers/iommu/intel/iommu.c
+++ b/
drivers/iommu/intel/iommu.c
@@
-564,7
+564,7
@@
static inline int domain_pfn_supported(struct dmar_domain *domain,
static int __iommu_calculate_agaw(struct intel_iommu *iommu, int max_gaw)
{
unsigned long sagaw;
- int agaw
= -1
;
+ int agaw;
sagaw = cap_sagaw(iommu->cap);
for (agaw = width_to_agaw(max_gaw);