linux_dsm_epyc7002/drivers/infiniband/hw/mthca
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
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mthca_allocator.c IB: Remove unneeded memset 2019-07-03 14:26:49 -03:00
mthca_av.c RDMA: Convert drivers to use the AH's sgid_attr in post_wr paths 2018-06-18 11:11:27 -06:00
mthca_catas.c treewide: setup_timer() -> timer_setup() (2 field) 2017-11-21 15:57:09 -08:00
mthca_cmd.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
mthca_cmd.h IB/core cleanup: Add const on args - device->process_mad 2015-06-02 09:33:13 -04:00
mthca_config_reg.h IB/mthca: Remove unnecessary include of <asm/page.h> 2009-09-05 20:36:13 -07:00
mthca_cq.c 5.2 Merge Window pull request 2019-05-09 09:02:46 -07:00
mthca_dev.h RDMA/mthca: Remove FMR support for memory registration 2020-06-02 20:32:54 -03:00
mthca_doorbell.h RDMA: Remove subversion $Id tags 2008-07-14 23:48:44 -07:00
mthca_eq.c RDMA: Use __packed annotation instead of __attribute__ ((packed)) 2019-03-25 21:14:12 -03:00
mthca_mad.c RDMA: Change MAD processing function to remove extra casting and parameter 2019-11-12 20:20:15 -04:00
mthca_main.c RDMA: Provide safe ib_alloc_device() function 2019-01-30 15:52:30 -07:00
mthca_mcg.c IB/mthca: Stop returning separate error and status from FW commands 2011-07-15 13:33:20 -07:00
mthca_memfree.c RDMA: Replace zero-length array with flexible-array member 2020-02-20 13:33:51 -04:00
mthca_memfree.h RDMA: Replace zero-length array with flexible-array member 2020-02-20 13:33:51 -04:00
mthca_mr.c RDMA/mthca: Remove FMR support for memory registration 2020-06-02 20:32:54 -03:00
mthca_pd.c RDMA: Remove subversion $Id tags 2008-07-14 23:48:44 -07:00
mthca_profile.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
mthca_profile.h RDMA: Remove subversion $Id tags 2008-07-14 23:48:44 -07:00
mthca_provider.c RDMA: Remove 'max_map_per_fmr' 2020-06-02 20:32:54 -03:00
mthca_provider.h RDMA/mthca: Remove FMR support for memory registration 2020-06-02 20:32:54 -03:00
mthca_qp.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
mthca_reset.c IB/mthca: Remove debug prints after allocation failure 2016-12-03 13:12:52 -05:00
mthca_srq.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
mthca_uar.c RDMA: Remove subversion $Id tags 2008-07-14 23:48:44 -07:00
mthca_wqe.h RDMA: Remove subversion $Id tags 2008-07-14 23:48:44 -07:00