linux-stable/drivers/atm
Kees Cook b7e389235c treewide: Remove uninitialized_var() usage
commit 3f649ab728 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-08-11 11:45:01 +02:00
..
.gitignore
Kconfig Kconfig: Fix the reference to the IDT77105 Phy driver in the description of ATM_NICSTAR_USE_IDT77105 2019-09-21 07:16:57 +02:00
Makefile
adummy.c
ambassador.c
ambassador.h
atmtcp.c atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent 2020-08-11 15:32:33 +02:00
eni.c atm: eni: Add check for dma_map_single 2022-03-23 09:10:44 +01:00
eni.h
firestream.c atm: firestream: check the return value of ioremap() in fs_init() 2022-03-23 09:10:41 +01:00
firestream.h
fore200e.c fore200e: Fix incorrect checks of NULL pointer dereference 2020-02-24 08:34:42 +01:00
fore200e.h
he.c atm: he: fix sign-extension overflow on large shift 2019-02-27 10:08:57 +01:00
he.h
horizon.c
horizon.h
idt77105.c atm: idt77252: fix null-ptr-dereference 2021-03-30 14:36:58 +02:00
idt77105.h
idt77252.c atm: idt77252: fix kmemleak when rmmod idt77252 2023-04-05 11:15:34 +02:00
idt77252.h
idt77252_tables.h
iphase.c atm: iphase: fix possible use-after-free in ia_module_exit() 2021-07-20 16:15:59 +02:00
iphase.h
lanai.c atm: lanai: dont run lanai_dev_close if not open 2021-03-30 14:36:57 +02:00
midway.h
nicstar.c atm: nicstar: register the interrupt handler in the right place 2021-07-20 16:16:01 +02:00
nicstar.h
nicstarmac.c
nicstarmac.copyright
solos-attrlist.c
solos-pci.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
suni.c
suni.h
tonga.h
uPD98401.h
uPD98402.c atm: uPD98402: fix incorrect allocation 2021-03-30 14:36:58 +02:00
uPD98402.h
zatm.c treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
zatm.h
zeprom.h