kernel_optimize_test/kernel/trace
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
..
blktrace.c blktrace: Avoid sparse warnings when assigning q->blk_trace 2020-06-17 09:07:11 -06:00
bpf_trace.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-06-25 18:27:40 -07:00
fgraph.c
ftrace_internal.h
ftrace.c ftrace: Fix maybe-uninitialized compiler warning 2020-06-17 17:13:18 -04:00
Kconfig Tracing updates for 5.8: 2020-06-09 10:06:18 -07:00
kprobe_event_gen_test.c
Makefile Rebase locking/kcsan to locking/urgent 2020-06-11 20:02:46 +02:00
power-traces.c
preemptirq_delay_test.c
ring_buffer_benchmark.c
ring_buffer.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
rpm-traces.c
synth_event_gen_test.c
trace_benchmark.c
trace_benchmark.h
trace_boot.c tracing/boottime: Fix kprobe multiple events 2020-06-23 21:51:50 -04:00
trace_branch.c
trace_clock.c
trace_dynevent.c
trace_dynevent.h
trace_entries.h tracing: Make ftrace packed events have align of 1 2020-06-16 21:21:02 -04:00
trace_event_perf.c
trace_events_filter_test.h
trace_events_filter.c
trace_events_hist.c
trace_events_inject.c
trace_events_synth.c
trace_events_trigger.c tracing: Fix event trigger to accept redundant spaces 2020-06-23 21:51:40 -04:00
trace_events.c
trace_export.c tracing: Make ftrace packed events have align of 1 2020-06-16 21:21:02 -04:00
trace_functions_graph.c
trace_functions.c trace: Fix typo in allocate_ftrace_ops()'s comment 2020-06-16 21:21:02 -04:00
trace_hwlat.c
trace_irqsoff.c
trace_kdb.c
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_kprobe.c maccess: rename probe_user_{read,write} to copy_{from,to}_user_nofault 2020-06-17 10:57:41 -07:00
trace_mmiotrace.c
trace_nop.c
trace_output.c
trace_output.h
trace_preemptirq.c x86/entry: Rename trace_hardirqs_off_prepare() 2020-06-11 15:15:24 +02:00
trace_printk.c
trace_probe_tmpl.h
trace_probe.c tracing/probe: Fix memleak in fetch_op_data operations 2020-06-16 21:21:02 -04:00
trace_probe.h tracing/probe: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
trace_sched_switch.c
trace_sched_wakeup.c
trace_selftest_dynamic.c
trace_selftest.c
trace_seq.c
trace_stack.c
trace_stat.c
trace_stat.h
trace_synth.h
trace_syscalls.c
trace_uprobe.c tracing/probe: Fix bpf_task_fd_query() for kprobes and uprobes 2020-06-09 11:10:12 -07:00
trace.c tracing: Remove unused event variable in tracing_iter_reset 2020-06-16 21:21:03 -04:00
trace.h tracing: Make ftrace packed events have align of 1 2020-06-16 21:21:02 -04:00
tracing_map.c
tracing_map.h