From: Colin Ian King Date: Wed, 18 May 2022 08:45:36 +0000 (+0100) Subject: powercap: intel_rapl: remove redundant store to value after multiply X-Git-Tag: v5.19-rc1~182^2~4^4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59cafa728c373551423d67a1369289a717006a4b;p=thirdparty%2Flinux.git 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 Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c index e45c1c3b0caef..a9c99d9e8b428 100644 --- a/drivers/powercap/intel_rapl_common.c +++ b/drivers/powercap/intel_rapl_common.c @@ -1010,7 +1010,7 @@ static u64 rapl_compute_time_window_atom(struct rapl_package *rp, u64 value, * where time_unit is default to 1 sec. Never 0. */ if (!to_raw) - return (value) ? value *= rp->time_unit : rp->time_unit; + return (value) ? value * rp->time_unit : rp->time_unit; value = div64_u64(value, rp->time_unit);