android_kernel_motorola_sm6375/drivers/atm
Repository files (latest commit first)
Filename Latest commit message Latest commit date
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/[email protected]/
[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 <[email protected]> # drivers/infiniband and mlx4/mlx5
Acked-by: Jason Gunthorpe <[email protected]> # IB
Acked-by: Kalle Valo <[email protected]> # wireless drivers
Reviewed-by: Chao Yu <[email protected]> # erofs
Signed-off-by: Kees Cook <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-06-09 10:29:01 +02:00
..
.gitignore
adummy.c
ambassador.c
ambassador.h
atmtcp.c
eni.c atm: eni: Add check for dma_map_single 2022-03-23 09:12:07 +01:00
eni.h
firestream.c atm: firestream: check the return value of ioremap() in fs_init() 2022-03-19 13:40:17 +01:00
firestream.h
fore200e.c
fore200e.h
he.c
he.h
horizon.c
horizon.h
idt77105.c atm: idt77252: fix null-ptr-dereference 2021-03-30 14:35:21 +02:00
idt77105.h
idt77252.c atm: idt77252: fix kmemleak when rmmod idt77252 2023-04-05 11:16:37 +02:00
idt77252.h
idt77252_tables.h
iphase.c atm: iphase: fix possible use-after-free in ia_module_exit() 2021-07-19 08:53:08 +02:00
iphase.h
Kconfig
lanai.c
Makefile
midway.h
nicstar.c atm: nicstar: register the interrupt handler in the right place 2021-07-19 08:53:12 +02:00
nicstar.h
nicstarmac.c
nicstarmac.copyright
solos-attrlist.c
solos-pci.c
suni.c
suni.h
tonga.h
uPD98401.h
uPD98402.c atm: uPD98402: fix incorrect allocation 2021-03-30 14:35:21 +02:00
uPD98402.h
zatm.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
zatm.h
zeprom.h