Skip to content

Commit 0be4838

Browse files
ColinIanKingsuryasaimadhu
authored andcommitted
x86/events/amd/iommu: Remove redundant assignment to variable shift
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 <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent bc7aaf5 commit 0be4838

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/events/amd/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static int get_next_avail_iommu_bnk_cntr(struct perf_event *event)
161161

162162
raw_spin_lock_irqsave(&piommu->lock, flags);
163163

164-
for (bank = 0, shift = 0; bank < max_banks; bank++) {
164+
for (bank = 0; bank < max_banks; bank++) {
165165
for (cntr = 0; cntr < max_cntrs; cntr++) {
166166
shift = bank + (bank*3) + cntr;
167167
if (piommu->cntr_assign_mask & BIT_ULL(shift)) {

0 commit comments

Comments
 (0)