android_kernel_xiaomi_sm8350/arch/powerpc/kvm
Kees Cook 0638dcc7e7 treewide: Remove uninitialized_var() usage
commit 3f649ab728cda8038259d8f14492fe400fbab911 upstream.

Using uninitialized_var() is dangerous as it papers over real bugs[1]
(or can in the future), and suppresses unrelated compiler warnings
(e.g. "unused variable"). If the compiler thinks it is uninitialized,
either simply initialize the variable or make compiler changes.

In preparation for removing[2] the[3] macro[4], remove all remaining
needless uses with the following script:

git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \
	xargs perl -pi -e \
		's/\buninitialized_var\(([^\)]+)\)/\1/g;
		 s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;'

drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid
pathological white-space.

No outstanding warnings were found building allmodconfig with GCC 9.3.0
for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64,
alpha, and m68k.

[1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
[2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
[3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
[4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

Reviewed-by: Leon Romanovsky <leonro@mellanox.com> # drivers/infiniband and mlx4/mlx5
Acked-by: Jason Gunthorpe <jgg@mellanox.com> # IB
Acked-by: Kalle Valo <kvalo@codeaurora.org> # wireless drivers
Reviewed-by: Chao Yu <yuchao0@huawei.com> # erofs
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:29:01 +02:00
..
book3s_32_mmu_host.c
book3s_32_mmu.c
book3s_32_sr.S
book3s_64_mmu_host.c
book3s_64_mmu_hv.c
book3s_64_mmu_radix.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
book3s_64_mmu.c
book3s_64_slb.S
book3s_64_vio_hv.c KVM: PPC: Fix TCE handling for VFIO 2022-04-27 13:50:49 +02:00
book3s_64_vio.c KVM: PPC: Fix TCE handling for VFIO 2022-04-27 13:50:49 +02:00
book3s_emulate.c
book3s_exports.c
book3s_hv_builtin.c KVM: PPC: Book3S HV: Prevent POWER7/8 TLB flush flushing SLB 2021-12-01 09:23:28 +01:00
book3s_hv_hmi.c
book3s_hv_interrupts.S
book3s_hv_nested.c KVM: PPC: Book3S: Suppress failed alloc warning in H_COPY_TOFROM_GUEST 2022-01-27 09:19:48 +01:00
book3s_hv_ras.c
book3s_hv_rm_mmu.c
book3s_hv_rm_xics.c
book3s_hv_rm_xive.c
book3s_hv_rmhandlers.S KVM: PPC: Book3S HV: Use GLOBAL_TOC for kvmppc_h_set_dabr/xdabr() 2021-11-26 10:47:20 +01:00
book3s_hv_tm_builtin.c
book3s_hv_tm.c
book3s_hv.c KVM: PPC: Book3S HV Nested: Reflect guest PMU in-use to L0 when guest SPRs are live 2021-09-22 12:26:25 +02:00
book3s_interrupts.S
book3s_mmu_hpte.c
book3s_paired_singles.c
book3s_pr_papr.c
book3s_pr.c
book3s_rmhandlers.S
book3s_rtas.c KVM: PPC: Book3S: Fix H_RTAS rets buffer overflow 2021-07-28 13:30:59 +02:00
book3s_segment.S
book3s_xics.c
book3s_xics.h
book3s_xive_native.c
book3s_xive_template.c
book3s_xive.c
book3s_xive.h
book3s.c
book3s.h
booke_emulate.c
booke_interrupts.S
booke.c
booke.h
bookehv_interrupts.S
e500_emulate.c
e500_mmu_host.c
e500_mmu_host.h
e500_mmu.c
e500.c
e500.h
e500mc.c
emulate_loadstore.c
emulate.c
fpu.S
irq.h
Kconfig
Makefile KVM: PPC: Book3S HV: Add a new KVM device for the XIVE native exploitation mode 2019-04-30 19:35:16 +10:00
mpic.c
powerpc.c KVM: PPC: Fix vmx/vsx mixup in mmio emulation 2022-04-15 14:18:11 +02:00
timing.c
timing.h
tm.S
trace_book3s.h
trace_booke.h
trace_hv.h
trace_pr.h
trace.h