linux/fs/gfs2
Kees Cook 3f649ab728 treewide: Remove uninitialized_var() usage
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>
2020-07-16 12:35:15 -07:00
..
acl.c gfs2: Change inode qa_data to allow multiple users 2020-03-27 14:08:04 -05:00
acl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
aops.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
aops.h gfs2: mark stuffed_readpage static 2019-07-03 14:45:18 +02:00
bmap.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
bmap.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
dentry.c gfs2: untangle the logic in gfs2_drevalidate 2019-09-03 09:42:41 +02:00
dir.c mm: remove the pgprot argument to __vmalloc 2020-06-02 10:59:11 -07:00
dir.h gfs2: Delete an unnecessary check before brelse() 2019-09-04 20:22:17 +02:00
export.c gfs2: Minor gfs2_lookup_by_inum cleanup 2020-06-05 20:19:21 +02:00
file.c gfs2: Remove unnecessary gfs2_qa_{get,put} pairs 2020-03-27 14:08:05 -05:00
gfs2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
glock.c Merge branch 'gfs2-iopen' into for-next 2020-06-05 21:25:36 +02:00
glock.h Merge branch 'gfs2-iopen' into for-next 2020-06-05 21:25:36 +02:00
glops.c Merge branch 'gfs2-iopen' into for-next 2020-06-05 21:25:36 +02:00
glops.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
incore.h gfs2: Check inode generation number in delete_work_func 2020-06-05 20:19:21 +02:00
inode.c Changes in gfs2: 2020-06-08 12:47:09 -07:00
inode.h gfs2: Minor gfs2_lookup_by_inum cleanup 2020-06-05 20:19:21 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
lock_dlm.c gfs2: Force withdraw to replay journals and wait for it to finish 2020-02-27 07:53:12 -06:00
log.c gfs2: fix use-after-free on transaction ail lists 2020-06-05 21:24:25 +02:00
log.h gfs2: Do log_flush in gfs2_ail_empty_gl even if ail list is empty 2020-02-27 07:53:18 -06:00
lops.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
lops.h gfs2: Remove active journal side effect from gfs2_write_log_header 2019-11-12 15:17:53 +01:00
main.c gfs2: new slab for transactions 2020-06-05 21:24:25 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
meta_io.c gfs2: fix withdraw sequence deadlock 2020-05-06 21:25:26 +02:00
meta_io.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
ops_fstype.c gfs2: Allow lock_nolock mount to specify jid=X 2020-06-02 19:45:05 +02:00
quota.c mm: remove the pgprot argument to __vmalloc 2020-06-02 10:59:11 -07:00
quota.h gfs2: move privileged user check to gfs2_quota_lock_check 2020-05-08 18:47:58 +02:00
recovery.c gfs2: change from write to read lock for sd_log_flush_lock in journal replay 2020-03-27 14:08:05 -05:00
recovery.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
rgrp.c gfs2: Turn gl_delete into a delayed work 2020-06-05 20:19:21 +02:00
rgrp.h gfs2: Split gfs2_rsqa_delete into gfs2_rs_delete and gfs2_qa_put 2020-03-27 14:08:04 -05:00
super.c gfs2: Smarter iopen glock waiting 2020-06-05 20:19:21 +02:00
super.h gfs2: Force withdraw to replay journals and wait for it to finish 2020-02-27 07:53:12 -06:00
sys.c gfs2: Force withdraw to replay journals and wait for it to finish 2020-02-27 07:53:12 -06:00
sys.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00
trace_gfs2.h gfs2: eliminate rs_inum and reduce the size of gfs2 inodes 2018-06-21 07:39:31 -05:00
trans.c gfs2: new slab for transactions 2020-06-05 21:24:25 +02:00
trans.h gfs2: new slab for transactions 2020-06-05 21:24:25 +02:00
util.c gfs2: new slab for transactions 2020-06-05 21:24:25 +02:00
util.h gfs2: new slab for transactions 2020-06-05 21:24:25 +02:00
xattr.c gfs2: Change inode qa_data to allow multiple users 2020-03-27 14:08:04 -05:00
xattr.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 398 2019-06-05 17:37:12 +02:00