Skip to contentSkip to conversation

Please apply 5b1e38c0792cc7a44997328de37d393f81b2501a to 5.15

DISCUSSION Applied Nathan Chancellor 2 participants 2 messages Dec 4, 2025 – Dec 7, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

maintainer Applied
#1 lore raw
Quoted 22 lines · Nathan Chancellor

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
Quoted 2 lines

It applies and builds cleanly for me. If there are any issues, please let me know.

Queued up, thanks.

Signature · 2 lines
Thanks,
Sasha