linux/arch/loongarch
Huacai Chen 8cb75d920e LoongArch: BPF: Fix uninitialized symbol 'retval_off'
commit 7b6c2d172d upstream.

In __arch_prepare_bpf_trampoline(), retval_off is meaningful only when
save_ret is not 0, so the current logic is correct. But it may cause a
build warning:

arch/loongarch/net/bpf_jit.c:1547 __arch_prepare_bpf_trampoline() error: uninitialized symbol 'retval_off'.

So initialize retval_off unconditionally to fix it.

Cc: stable@vger.kernel.org
Fixes: f9b6b41f0c ("LoongArch: BPF: Add basic bpf trampoline support")
Closes: https://lore.kernel.org/r/202508191020.PBBh07cK-lkp@intel.com/
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-15 12:04:19 +02:00
..
boot LoongArch: dts: Add eMMC/SDIO controller support to Loongson-2K2000 2025-08-05 19:00:22 +08:00
configs sound updates #2 for 6.17-rc1 2025-08-01 12:26:24 -07:00
crypto loongarch/crc32: expose CRC32 functions through lib 2024-12-01 17:23:01 -08:00
include LoongArch: KVM: Fix VM migration failure with PTW enabled 2025-09-18 19:44:22 +08:00
kernel LoongArch: Automatically disable kaslr if boot from kexec_file 2025-10-15 12:04:18 +02:00
kvm LoongArch: KVM: Avoid copy_*_user() with lock hold in kvm_pch_pic_regs_access() 2025-09-18 19:44:25 +08:00
lib lib/crc: loongarch: Migrate optimized CRC code into lib/crc/ 2025-06-30 09:31:57 -07:00
mm mm/pagewalk: split walk_page_range_novma() into kernel/user parts 2025-07-09 22:42:05 -07:00
net LoongArch: BPF: Fix uninitialized symbol 'retval_off' 2025-10-15 12:04:19 +02:00
pci LoongArch: Fix build warnings about export.h 2025-06-26 20:07:18 +08:00
power LoongArch: Save and restore CSR.CNTC for hibernation 2025-05-14 22:17:52 +08:00
vdso LoongArch: vDSO: Remove -nostdlib complier flag 2025-08-05 19:00:22 +08:00
Kbuild LoongArch: Migrate to the generic rule for built-in DTB 2025-01-25 18:51:33 +08:00
Kconfig LoongArch: Update help info of ARCH_STRICT_ALIGN 2025-09-18 19:43:42 +08:00
Kconfig.debug LoongArch: Only allow OBJTOOL & ORC unwinder if toolchain supports -mthin-add-sub 2024-06-21 10:18:40 +08:00
Makefile LoongArch: Handle jump tables options for RUST 2025-09-18 19:43:42 +08:00