]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
powercap: intel_rapl: Use unit conversion macros from units.h
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Thu, 12 Feb 2026 23:30:39 +0000 (15:30 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 Mar 2026 14:52:39 +0000 (15:52 +0100)
commit90503f9ffee927c3abdc94a4862d13ae71ea9442
tree1c8e0c1678848723458d7f9eabb9288a700c88bd
parent71bb2c50e0248217dd3999621b06bd69c31e6e90
powercap: intel_rapl: Use unit conversion macros from units.h

Replace hardcoded numeric constants with standard unit conversion
macros from linux/units.h for better code clarity and
self-documentation.

Add MICROJOULE_PER_JOULE and NANOJOULE_PER_JOULE to units.h to
support energy unit conversions, following the existing pattern
for power units.

No functional changes.

Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20260212233044.329790-8-sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/intel_rapl_common.c
include/linux/units.h