Skip to content

Commit 59cafa7

Browse files
ColinIanKingrafaeljw
authored andcommitted
powercap: intel_rapl: remove redundant store to value after multiply
There is no need to store the result of the multiply back to variable value after the multiplication. The store is redundant, replace *= with just *. Cleans up clang scan build warning: warning: Although the value stored to 'value' is used in the enclosing expression, the value is never actually read from 'value' [deadcode.DeadStores] Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent f125bdb commit 59cafa7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/powercap/intel_rapl_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ static u64 rapl_compute_time_window_atom(struct rapl_package *rp, u64 value,
10101010
* where time_unit is default to 1 sec. Never 0.
10111011
*/
10121012
if (!to_raw)
1013-
return (value) ? value *= rp->time_unit : rp->time_unit;
1013+
return (value) ? value * rp->time_unit : rp->time_unit;
10141014

10151015
value = div64_u64(value, rp->time_unit);
10161016

0 commit comments

Comments
 (0)