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 <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
1 parent bc7aaf5 commit 0be4838

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)