Messages in this thread | | | Date | Thu, 25 Nov 2021 10:53:28 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH 1/2] sched/pelt: Remove redundant variable in __accumulate_pelt_segments |
| |
On Thu, Nov 25, 2021 at 11:00:18AM +0800, Tang Yizhou wrote: > As the comment of function accumulate_sum() describes the equation clearly, > There is no need to use a redundant variable c3. Let's make a comment for > d3 directly.
Why bother? Surely the compiler is clever enough to figure out the same and avoid instantiating the variable. All you've done is made the code less obvious.
| |