From d0baea0a7cfd002339cb3c090f6fe27559ba97a6 Mon Sep 17 00:00:00 2001 From: Konsta Date: Mon, 27 Oct 2025 20:41:17 +0200 Subject: [PATCH 1/7] fixup! dmaengine: dw-axi-dmac: Add DMA channel selection * Fixes build with Clang. drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1513:3: error: variable 'chan_flags_all' is uninitialized when used here [-Werror,-Wuninitialized] 1513 | chan_flags_all |= dw->chan_flags[i]; | ^~~~~~~~~~~~~~ drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1502:25: note: initialize the variable 'chan_flags_all' to silence this warning 1502 | uint32_t chan_flags_all; | ^ | = 0 1 error generated. --- drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c index 95a24db73bf692..ac4a770250bad1 100644 --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c @@ -1499,7 +1499,7 @@ static struct dma_chan *dw_axi_dma_of_xlate(struct of_phandle_args *dma_spec, { struct dw_axi_dma *dw = ofdma->of_dma_data; struct axi_dma_chan *chan; - uint32_t chan_flags_all; + uint32_t chan_flags_all = 0; uint32_t busy_channels; struct dma_chan *dchan; dma_cap_mask_t mask; From 19d9da60ae5ab07648c78e369ba8bb89e7df5990 Mon Sep 17 00:00:00 2001 From: Konsta Date: Fri, 6 Feb 2026 17:07:10 +0200 Subject: [PATCH 2/7] fixup! drm/vc4: Assign 32 overlay planes to writeback only * Fixes build with Clang. drivers/gpu/drm/vc4/vc4_plane.c:2799:2: error: variable 'txp_crtc' is used uninitialized whenever 'for' loop exits because its condition is false [-Werror,-Wsometimes-uninitialized] 2799 | drm_for_each_crtc(crtc, drm) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/drm/drm_crtc.h:1312:2: note: expanded from macro 'drm_for_each_crtc' 1312 | list_for_each_entry(crtc, &(dev)->mode_config.crtc_list, head) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/list.h:783:7: note: expanded from macro 'list_for_each_entry' 783 | !list_entry_is_head(pos, head, member); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/vc4/vc4_plane.c:2809:20: note: uninitialized use occurs here 2809 | drm_crtc_mask(txp_crtc); | ^~~~~~~~ drivers/gpu/drm/vc4/vc4_plane.c:2799:2: note: remove the condition if it is always true 2799 | drm_for_each_crtc(crtc, drm) { | ^ include/drm/drm_crtc.h:1312:2: note: expanded from macro 'drm_for_each_crtc' 1312 | list_for_each_entry(crtc, &(dev)->mode_config.crtc_list, head) | ^ include/linux/list.h:783:7: note: expanded from macro 'list_for_each_entry' 783 | !list_entry_is_head(pos, head, member); \ | ^ drivers/gpu/drm/vc4/vc4_plane.c:2796:27: note: initialize the variable 'txp_crtc' to silence this warning 2796 | struct drm_crtc *txp_crtc; | ^ | = NULL 1 error generated. --- drivers/gpu/drm/vc4/vc4_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index f0154b17458ec0..2c4826ede21b8d 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -2817,7 +2817,7 @@ int vc4_plane_create_additional_planes(struct drm_device *drm) struct drm_plane *cursor_plane; struct drm_crtc *crtc; unsigned int i; - struct drm_crtc *txp_crtc; + struct drm_crtc *txp_crtc = NULL; uint32_t non_txp_crtc_mask; drm_for_each_crtc(crtc, drm) { From 5a9927e5c54e690a3fbd9c9012af925c93c92d9d Mon Sep 17 00:00:00 2001 From: Konsta Date: Mon, 29 Apr 2024 16:12:36 +0300 Subject: [PATCH 3/7] fixup! non-upstream: support DS1 exit firmware re-download * Fixes build with Clang. drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c:461:10: error: array index 18 is past the end of the array (that has type 'u8[1]' (aka 'unsigned char[1]')) [-Werror,-Warray-bounds] 461 | setbit(eventmask_msg->mask, BRCMF_E_ULP); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/broadcom/brcm80211/brcmfmac/../include/brcmu_utils.h:37:30: note: expanded from macro 'setbit' 37 | #define setbit(a, i) (((u8 *)a)[(i)/NBBY] |= 1<<((i)%NBBY)) | ^ ~~~~~~~~ drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h:313:2: note: array 'mask' declared here 313 | u8 mask[1]; | ^ 1 error generated. --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h index b2be07d11c67a3..d8c9d6bee80982 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.h @@ -310,7 +310,7 @@ struct eventmsgs_ext { u8 command; u8 len; u8 maxgetsize; - u8 mask[1]; + u8 mask[]; }; typedef int (*brcmf_fweh_handler_t)(struct brcmf_if *ifp, From 85c90c32d4813205a8ac9a6de70d876a02b0aea4 Mon Sep 17 00:00:00 2001 From: Konsta Date: Fri, 6 Feb 2026 16:30:50 +0200 Subject: [PATCH 4/7] fixup! pcie-brcmstb: move the unilateral disable of CLKREQ# before link-up * Fixes build with Clang. drivers/pci/controller/pcie-brcmstb.c:1595:3: error: variable 'clkreq_cntl' is uninitialized when used here [-Werror,-Wuninitialized] 1595 | clkreq_cntl |= PCIE_MISC_HARD_PCIE_HARD_DEBUG_CLKREQ_DEBUG_ENABLE_MASK; | ^~~~~~~~~~~ drivers/pci/controller/pcie-brcmstb.c:1578:17: note: initialize the variable 'clkreq_cntl' to silence this warning 1578 | u32 clkreq_cntl; | ^ | = 0 1 error generated. --- drivers/pci/controller/pcie-brcmstb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index 095795a5bb0aee..b182ab75a8fc50 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1575,7 +1575,7 @@ static void brcm_config_clkreq(struct brcm_pcie *pcie) { static const char err_msg[] = "invalid 'brcm,clkreq-mode' DT string\n"; const char *mode = "default"; - u32 clkreq_cntl; + u32 clkreq_cntl = 0; int ret, tmp; ret = of_property_read_string(pcie->np, "brcm,clkreq-mode", &mode); From 32253af8138c820fc99f8ab040f361e61797600b Mon Sep 17 00:00:00 2001 From: Konsta Date: Sat, 14 Mar 2026 17:52:29 +0200 Subject: [PATCH 5/7] fixup! misc: Add RP1 PIO driver * Fixes build with Clang. In file included from drivers/pwm/pwm-pio-rp1.c:20: include/linux/pio_rp1.h:283:42: error: implicit conversion from 'uint' (aka 'unsigned int') to 'uint16_t' (aka 'unsigned short') changes value from 4294967295 to 65535 [-Werror,-Wconstant-conversion] 283 | args.origin = (program->origin == -1) ? PIO_ORIGIN_ANY : program->origin; | ~ ^~~~~~~~~~~~~~ include/linux/pio_rp1.h:44:27: note: expanded from macro 'PIO_ORIGIN_ANY' 44 | #define PIO_ORIGIN_ANY ((uint)(~0)) | ^~~~~~~~~~ include/linux/pio_rp1.h:312:42: error: implicit conversion from 'uint' (aka 'unsigned int') to 'uint16_t' (aka 'unsigned short') changes value from 4294967295 to 65535 [-Werror,-Wconstant-conversion] 312 | args.origin = (program->origin == -1) ? PIO_ORIGIN_ANY : program->origin; | ~ ^~~~~~~~~~~~~~ include/linux/pio_rp1.h:44:27: note: expanded from macro 'PIO_ORIGIN_ANY' 44 | #define PIO_ORIGIN_ANY ((uint)(~0)) | ^~~~~~~~~~ 2 errors generated. --- include/linux/pio_rp1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pio_rp1.h b/include/linux/pio_rp1.h index f262fdd9c8f1c3..cbec0595496234 100644 --- a/include/linux/pio_rp1.h +++ b/include/linux/pio_rp1.h @@ -41,7 +41,7 @@ #define NUM_PIO_STATE_MACHINES 4 #define PIO_INSTRUCTION_COUNT 32 -#define PIO_ORIGIN_ANY ((uint)(~0)) +#define PIO_ORIGIN_ANY ((uint16_t)(~0)) #define GPIOS_MASK ((1 << RP1_PIO_GPIO_COUNT) - 1) #define PICO_NO_HARDWARE 0 From 86367b65808851e859280897920fe1697f557bef Mon Sep 17 00:00:00 2001 From: Konsta Date: Thu, 2 Apr 2026 13:47:55 +0300 Subject: [PATCH 6/7] fixup! ASoC: Add support for all the downstream rpi sound card drivers * Change SND_PIMIDI and SND_PISOUND_MICRO to select CRC8 instead of depend on it. * Fixes build with Clang. sound/drivers/upisnd/upisnd_codec.c:741:6: error: variable 'ret' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] 741 | if (adau->clk_src != ADAU1961_CLK_SRC_MCLK) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/drivers/upisnd/upisnd_codec.c:744:9: note: uninitialized use occurs here 744 | return ret; | ^~~ sound/drivers/upisnd/upisnd_codec.c:741:2: note: remove the 'if' if its condition is always true 741 | if (adau->clk_src != ADAU1961_CLK_SRC_MCLK) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 742 | ret = snd_soc_dapm_add_routes(dapm, &adau1961_dapm_pll_route, 1); sound/drivers/upisnd/upisnd_codec.c:739:9: note: initialize the variable 'ret' to silence this warning 739 | int ret; | ^ | = 0 1 error generated. --- sound/drivers/Kconfig | 6 ++++-- sound/drivers/upisnd/upisnd_codec.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/drivers/Kconfig b/sound/drivers/Kconfig index d6fd0c6be56a56..51b17967f206a9 100644 --- a/sound/drivers/Kconfig +++ b/sound/drivers/Kconfig @@ -265,8 +265,9 @@ config SND_AC97_POWER_SAVE_DEFAULT config SND_PIMIDI tristate "Pimidi driver" - depends on SND_SEQUENCER && CRC8 + depends on SND_SEQUENCER select SND_RAWMIDI + select CRC8 help Say Y here to include support for Blokas Pimidi. @@ -275,7 +276,8 @@ config SND_PIMIDI config SND_PISOUND_MICRO tristate "Pisound Micro driver" - depends on SND_SEQUENCER && CRC8 + depends on SND_SEQUENCER + select CRC8 help Say Y here to include support for Blokas Pisound Micro. diff --git a/sound/drivers/upisnd/upisnd_codec.c b/sound/drivers/upisnd/upisnd_codec.c index 9d0fe01e9a7d5e..1ca77255504859 100644 --- a/sound/drivers/upisnd/upisnd_codec.c +++ b/sound/drivers/upisnd/upisnd_codec.c @@ -736,7 +736,7 @@ static int adau1961_add_routes(struct snd_soc_component *component) { struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); struct adau *adau = snd_soc_component_get_drvdata(component); - int ret; + int ret = 0; if (adau->clk_src != ADAU1961_CLK_SRC_MCLK) ret = snd_soc_dapm_add_routes(dapm, &adau1961_dapm_pll_route, 1); From cc6a4fbf8c0c4cf033816a3c02545b5e0d62f644 Mon Sep 17 00:00:00 2001 From: Konsta Date: Wed, 28 Jan 2026 20:04:11 +0200 Subject: [PATCH 7/7] fixup! ASoC:Add Hifiberry Studio DAC8x soundcard driver * Fixes build with Clang. sound/soc/bcm/hifiberry_studio_dac8x.c:770:41: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] 770 | if ((priv->card_info.card_clk_options == 0x02)) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ sound/soc/bcm/hifiberry_studio_dac8x.c:770:41: note: remove extraneous parentheses around the comparison to silence this warning 770 | if ((priv->card_info.card_clk_options == 0x02)) { | ~ ^ ~ sound/soc/bcm/hifiberry_studio_dac8x.c:770:41: note: use '=' to turn this equality comparison into an assignment 770 | if ((priv->card_info.card_clk_options == 0x02)) { | ^~ | = 1 error generated. --- sound/soc/bcm/hifiberry_studio_dac8x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/bcm/hifiberry_studio_dac8x.c b/sound/soc/bcm/hifiberry_studio_dac8x.c index 75843084a7c973..a4553c2d2432ea 100644 --- a/sound/soc/bcm/hifiberry_studio_dac8x.c +++ b/sound/soc/bcm/hifiberry_studio_dac8x.c @@ -767,7 +767,7 @@ static int hb_uni_read_card_info(struct platform_device *pdev) return -EINVAL; } } else { - if ((priv->card_info.card_clk_options == 0x02)) { + if (priv->card_info.card_clk_options == 0x02) { dev_err(&pdev->dev, "Card cannot run as i2s clock consumer\n"); return -EINVAL;