Hi stable folks,
Please apply commit 5b1e38c0792c ("dpaa2-mac: bail if the dpmacs fwnode
is not found") to 5.15, where it addresses an instance of
-Wsometimes-uninitialized with clang-21 and newer, introduced by commit
3264f599c1a8 ("net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver")
in 5.14.
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c:54:13: error: variable 'parent' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
54 | } else if (is_acpi_node(fwnode)) {
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c:58:29: note: uninitialized use occurs here
58 | fwnode_for_each_child_node(parent, child) {
| ^~~~~~
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c:54:9: note: remove the 'if' if its condition is always true
54 | } else if (is_acpi_node(fwnode)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c:43:39: note: initialize the variable 'parent' to silence this warning
43 | struct fwnode_handle *fwnode, *parent, *child = NULL;
| ^
| = NULL
It applies and builds cleanly for me. If there are any issues, please
let me know.
Cheers,
Nathan
Hi stable folks,
Please apply commit fc7bf4c0d65a ("drm/i915/selftests: Fix inconsistent
IS_ERR and PTR_ERR") to 5.15, where it resolves a couple of instances of
-Wuninitialized with clang-21 or newer that were introduced by commit
cdb35d1ed6d2 ("drm/i915/gem: Migrate to system at dma-buf attach time
(v7)") in 5.15.
In file included from drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c:329:
drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c:105:18: error: variable 'dmabuf' is uninitialized when used here [-Werror,-Wuninitialized]
105 | PTR_ERR(dmabuf));
| ^~~~~~
drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c:94:24: note: initialize the variable 'dmabuf' to silence this warning
94 | struct dma_buf *dmabuf;
| ^
| = NULL
drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c:161:18: error: variable 'dmabuf' is uninitialized when used here [-Werror,-Wuninitialized]
161 | PTR_ERR(dmabuf));
| ^~~~~~
drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c:149:24: note: initialize the variable 'dmabuf' to silence this warning
149 | struct dma_buf *dmabuf;
| ^
| = NULL
It applies and builds cleanly for me. If there are any issues, please
let me know.
Cheers,
Nathan
Hi stable folks,
Please apply commit ccc35ff2fd29 ("leds: spi-byte: Use
devm_led_classdev_register_ext()") to 5.15, 6.1, and 6.6. It
inadvertently addresses an instance of -Wuninitialized visible with
clang-21 and newer:
drivers/leds/leds-spi-byte.c:99:26: error: variable 'child' is uninitialized when used here [-Werror,-Wuninitialized]
99 | of_property_read_string(child, "label", &name);
| ^~~~~
drivers/leds/leds-spi-byte.c:83:27: note: initialize the variable 'child' to silence this warning
83 | struct device_node *child;
| ^
| = NULL
It applies cleanly to 6.6. I have attached a backport for 6.1 and 5.15,
which can be generated locally with:
$ git format-patch -1 --stdout ccc35ff2fd2911986b716a87fe65e03fac2312c9 | sed 's;strscpy;strlcpy;' | patch -p1
This change seems safe to me but if I am missing a massive dependency
chain, an alternative would be moving child's initialization up in these
stable branches.
Cheers,
Nathan
diff --git a/drivers/leds/leds-spi-byte.c b/drivers/leds/leds-spi-byte.c
index 82696e0607a5..7dd876df8b36 100644
--- a/drivers/leds/leds-spi-byte.c
+++ b/drivers/leds/leds-spi-byte.c
@@ -96,6 +96,7 @@ static int spi_byte_probe(struct spi_device *spi)
if (!led)
return -ENOMEM;
+ child = of_get_next_available_child(dev_of_node(dev), NULL);
of_property_read_string(child, "label", &name);
strlcpy(led->name, name, sizeof(led->name));
led->spi = spi;
@@ -106,7 +107,6 @@ static int spi_byte_probe(struct spi_device *spi)
led->ldev.max_brightness = led->cdef->max_value - led->cdef->off_value;
led->ldev.brightness_set_blocking = spi_byte_brightness_set_blocking;
- child = of_get_next_available_child(dev_of_node(dev), NULL);
state = of_get_property(child, "default-state", NULL);
if (state) {
if (!strcmp(state, "on")) {