linux-stable/drivers/clk
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
..
actions clk: actions: Terminate clk_div_table with sentinel element 2022-04-15 14:14:52 +02:00
at91 clk: at91: generated: consider range when calculating best rate 2022-05-25 09:10:39 +02:00
axis
axs10x
bcm clk: bcm2835: Make peripheral PLLC critical 2022-10-26 13:19:41 +02:00
berlin clk: berlin: Add of_node_put() for of_get_parent() 2022-10-26 13:19:30 +02:00
davinci clk: davinci: Use the correct size when allocating memory 2020-09-23 12:10:59 +02:00
h8300
hisilicon clk: hi3660: Mark clk_gate_ufs_subsys as critical 2019-05-25 18:23:28 +02:00
imgtec clk: boston: unregister clks on failure in clk_boston_setup() 2019-11-06 13:05:26 +01:00
imx clk: vf610: fix refcount leak in vf610_clocks_init() 2020-01-27 14:50:09 +01:00
ingenic clk: ingenic/jz4770: Exit with error if CGU init failed 2020-04-17 10:48:52 +02:00
keystone clk: keystone: Enable TISCI clocks if K3_ARCH 2019-11-24 08:19:48 +01:00
loongson1 clk: loongson1: Terminate clk_div_table with sentinel element 2022-04-15 14:14:52 +02:00
mediatek clk: mediatek: Drop more __init markings for driver probe 2019-12-13 08:52:16 +01:00
meson clk: meson: clk-pll: fix initializing the old rate (fallback) for a PLL 2021-03-04 09:39:42 +01:00
microchip
mmp clk: mmp2: Fix the order of timer mux parents 2020-02-05 14:43:43 +00:00
mvebu clk: kirkwood: Fix a clocking boot regression 2021-09-22 11:47:57 +02:00
mxs
nxp
pistachio
pxa clk: pxa: fix one of the pxa RTC clocks 2020-01-04 19:12:57 +01:00
qcom clk: qcom: ipq8074: dont disable gcc_sleep_clk_src 2022-08-25 11:15:43 +02:00
renesas clk: renesas: r9a06g032: Fix UART clkgrp bitsel 2022-08-25 11:15:13 +02:00
rockchip clk: rockchip: rk3399: allow clk_cifout to force clk_cifout_src to reparent 2023-05-17 11:13:21 +02:00
samsung clk: samsung: Fix memory leak in _samsung_clk_register_pll() 2023-01-18 11:30:17 +01:00
sirf clk: clk-atlas6: fix return value check in atlas6_clk_init() 2020-08-21 11:05:36 +02:00
socfpga clk: socfpga: use clk_hw_register for a5/c5 2023-01-18 11:30:18 +01:00
spear
sprd clk: sprd: return correct type of value for _sprd_pll_recalc_rate 2020-06-25 15:33:00 +02:00
st clk: st: Fix memory leak in st_of_quadfs_setup() 2023-01-18 11:30:37 +01:00
sunxi clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource() 2022-05-12 12:20:22 +02:00
sunxi-ng clk: sunxi-ng: h6: Fix clock divider range on some clocks 2021-03-04 09:39:44 +01:00
tegra clk: tegra20: fix gcc-7 constant overflow warning 2023-05-30 12:42:10 +01:00
ti clk: ti: dra7-atl: Fix reference leak in of_dra7_atl_clk_probe 2022-10-26 13:19:34 +02:00
uniphier clk: uniphier: Fix fixed-rate initialization 2022-04-15 14:14:38 +02:00
ux500
versatile
x86 clk: x86: Add system specific quirk to mark clocks as critical 2019-05-08 07:21:54 +02:00
zte clk: zx296718: Don't reference clk_init_data after registration 2019-10-07 18:56:46 +02:00
zynq
clk-asm9260.c
clk-aspeed.c The new and exciting feature this time around is in the clk core. 2018-08-15 21:41:21 -07:00
clk-axi-clkgen.c
clk-axm5516.c
clk-bulk.c
clk-cdce706.c
clk-cdce925.c
clk-clps711x.c clk: clps711x: Terminate clk_div_table with sentinel element 2022-04-15 14:14:52 +02:00
clk-composite.c
clk-conf.c clk: add missing of_node_put() in "assigned-clocks" property parsing 2023-05-17 11:13:19 +02:00
clk-cs2000-cp.c clk: cs2000-cp: convert to SPDX identifiers 2018-08-02 13:55:00 -07:00
clk-devres.c
clk-divider.c
clk-efm32gg.c
clk-fixed-factor.c clk: fixed-factor: fix of_node_get-put imbalance 2018-11-27 16:13:04 +01:00
clk-fixed-rate.c clk: fixed-rate: fix of_node_get-put imbalance 2018-11-27 16:13:00 +01:00
clk-fractional-divider.c clk: fractional-divider: check parent rate only if flag is set 2019-04-05 22:33:03 +02:00
clk-gate.c treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
clk-gemini.c
clk-gpio.c clk: clk-gpio: propagate rate change to parent 2020-01-04 19:12:52 +01:00
clk-hi655x.c
clk-highbank.c clk: highbank: fix refcount leak in hb_clk_init() 2020-01-27 14:50:08 +01:00
clk-hsdk-pll.c
clk-max9485.c
clk-max77686.c
clk-moxart.c
clk-multiplier.c
clk-mux.c
clk-nomadik.c
clk-npcm7xx.c clk: npcm7xx: fix memory allocation 2018-08-28 15:12:59 -07:00
clk-nspire.c
clk-oxnas.c clk: oxnas: Hold reference returned by of_get_parent() 2022-10-26 13:19:30 +02:00
clk-palmas.c
clk-pwm.c
clk-qoriq.c clk: qoriq: fix refcount leak in clockgen_init() 2020-01-27 14:50:08 +01:00
clk-rk808.c
clk-s2mps11.c clk: s2mps11: Fix a resource leak in error handling paths in the probe function 2020-12-30 11:26:05 +01:00
clk-scmi.c clk: scmi: Fix min and max rate when registering clocks with discrete rates 2020-08-19 08:14:49 +02:00
clk-scpi.c
clk-si514.c
clk-si544.c
clk-si570.c
clk-si5351.c
clk-si5351.h
clk-stm32f4.c clk: stm32f4: fix post divisor setup for I2S/SAI PLLs 2021-08-12 13:19:39 +02:00
clk-stm32h7.c
clk-stm32mp1.c clk: stm32mp1: parent clocks update 2019-12-05 09:21:35 +01:00
clk-tango4.c
clk-twl6040.c clk: clk-twl6040: Fix imprecise external abort for pdmclk 2019-03-23 20:10:03 +01:00
clk-u300.c
clk-versaclock5.c clk: vc5: Abort clock configuration without upstream clock 2019-03-05 17:58:46 +01:00
clk-vt8500.c
clk-wm831x.c
clk-xgene.c
clk.c clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled() 2023-03-11 16:31:44 +01:00
clk.h
clkdev.c ARM: 8778/1: clkdev: don't call __of_clk_get_by_name() unnecessarily from clk_get() 2018-08-13 16:27:52 +01:00
Kconfig clk: HI655X: select REGMAP instead of depending on it 2023-03-22 13:27:08 +01:00
Makefile clk: keystone: Enable TISCI clocks if K3_ARCH 2019-11-24 08:19:48 +01:00