summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorBabanpreet Singh <bbnpreetsingh@gmail.com>2026-09-15 05:25:29 +0000
committerSebastian Reichel <sebastian.reichel@collabora.com>2026-10-04 20:12:09 +0200
commitdf2914e2048556478980df4da89d16390c368e4d (patch)
treee4cb2c7e02b5e1b8ac3391e15e47b0084ba8940e /rust/kernel/alloc
parent8761a4577c4fd489fb7af435f4b11ab6762dab66 (diff)
power: supply: max17042_battery: Make the fractional macros safe
The fractional LSB macros expand to a plain division, so they only work when multiplied first and evaluate to 0 anywhere else. Take the value as a macro argument and apply it with mult_frac(), which properly handles it. Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <error27@gmail.com> Closes: https://lore.kernel.org/r/202606062322.TyvCPB3l-lkp@intel.com/ Assisted-by: LLM Signed-off-by: Babanpreet Singh <bbnpreetsingh@gmail.com> Link: https://patch.msgid.link/20260915052529.7-1-bbnpreetsingh@gmail.com [fixed commit message, dropped useless AI comment] Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions