projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc7aaf5
)
x86/events/amd/iommu: Remove redundant assignment to variable shift
author
Colin Ian King
<colin.i.king@gmail.com>
Tue, 7 Dec 2021 18:50:01 +0000
(18:50 +0000)
committer
Borislav Petkov
<bp@suse.de>
Tue, 28 Dec 2021 20:30:05 +0000
(21:30 +0100)
Variable shift is being initialized with a value that is never read, it
is being re-assigned later inside a loop. The assignment is redundant
and can be removed.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link:
https://lore.kernel.org/r/20211207185001.1412413-1-colin.i.king@gmail.com
arch/x86/events/amd/iommu.c
patch
|
blob
|
history
diff --git
a/arch/x86/events/amd/iommu.c
b/arch/x86/events/amd/iommu.c
index 913745f1419baf994f38e64ab75cfe9d1545f119..b15f7b950d2e01ba07889e1bf08b327ad00b9f6b 100644
(file)
--- a/
arch/x86/events/amd/iommu.c
+++ b/
arch/x86/events/amd/iommu.c
@@
-161,7
+161,7
@@
static int get_next_avail_iommu_bnk_cntr(struct perf_event *event)
raw_spin_lock_irqsave(&piommu->lock, flags);
- for (bank = 0
, shift = 0
; bank < max_banks; bank++) {
+ for (bank = 0; bank < max_banks; bank++) {
for (cntr = 0; cntr < max_cntrs; cntr++) {
shift = bank + (bank*3) + cntr;
if (piommu->cntr_assign_mask & BIT_ULL(shift)) {