linux/drivers/firmware
Morduan Zang d7f1b4bdc7 efi/cper: Fix cper_bits_to_str buffer handling and return value
The return value calculation was incorrect: `return len - buf_size;`
Initially `len = buf_size`, then `len` decreases with each operation.
This results in a negative return value on success.

Fix by returning `buf_size - len` which correctly calculates the actual
number of bytes written.

Fixes: a976d790f4 ("efi/cper: Add a new helper function to print bitmasks")
Signed-off-by: Morduan Zang <zhangdandan@uniontech.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2026-01-14 11:34:42 +01:00
..
arm_ffa
arm_scmi
broadcom
cirrus
efi efi/cper: Fix cper_bits_to_str buffer handling and return value 2026-01-14 11:34:42 +01:00
google
imx
meson
microchip
psci
qcom
samsung
smccc
tegra
xilinx
Kconfig
Makefile
arm_scpi.c
arm_sdei.c
dmi-id.c
dmi-sysfs.c
dmi_scan.c
edd.c
iscsi_ibft.c
iscsi_ibft_find.c
memmap.c
mtk-adsp-ipc.c
qemu_fw_cfg.c
raspberrypi.c
stratix10-rsu.c
stratix10-svc.c
sysfb.c
sysfb_simplefb.c
thead,th1520-aon.c
ti_sci.c
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c