Skip to content

Commit df0114f

Browse files
ColinIanKinghansendc
authored andcommitted
x86/resctrl: Remove redundant assignment to variable chunks
The variable chunks is being shifted right and re-assinged the shifted value which is then returned. Since chunks is not being read afterwards the assignment is redundant and the >>= operator can be replaced with a shift >> operator instead. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Reviewed-by: Fenghua Yu <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 0fcfb00 commit df0114f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/cpu/resctrl/monitor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static u64 mbm_overflow_count(u64 prev_msr, u64 cur_msr, unsigned int width)
282282
u64 shift = 64 - width, chunks;
283283

284284
chunks = (cur_msr << shift) - (prev_msr << shift);
285-
return chunks >>= shift;
285+
return chunks >> shift;
286286
}
287287

288288
static u64 __mon_event_count(u32 rmid, struct rmid_read *rr)

0 commit comments

Comments
 (0)