Skip to content

Commit 902cb38

Browse files
zeddiirpurdie
authored andcommitted
linux-yocto/6.12: libbpf: silence maybe-uninitialized warning from clang
Integrating the following commit(s) to linux-yocto/6.12: 1/1 [ Author: Ross Burton Email: ross.burton@arm.com Subject: libbpf: silence maybe-uninitialized warning from clang Date: Wed, 4 Jun 2025 21:22:23 +0100 perf is build with -Werror, but clang 20.1.6 (incorrectly) finds that mod_len may be used uninitialized: libbpf.c: In function 'find_kernel_btf_id.constprop': libbpf.c:10009:33: error: 'mod_len' may be used uninitialized [-Werror=maybe-uninitialized] 10009 | if (mod_name && strncmp(mod->name, mod_name, mod_len) != 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libbpf.c:9979:21: note: 'mod_len' was declared here 9979 | int ret, i, mod_len; | ^~~~~~~ Inspecting the code it can be seen that mod_len is set if mod_name is set, and the strncmp() is only called if mod_name is set, so this is a false positive (interestingly, clang doesn't spot the same issue above). Silence the false positive by explicitly initializing mod_len to 0. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> ] Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 parent 1f8d433 commit 902cb38

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

meta/recipes-kernel/linux/linux-yocto-rt_6.12.bb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ python () {
1414
raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
1515
}
1616

17-
SRCREV_machine ?= "4127c6137af28c2c91ec79acee60fe4d4d70db9b"
18-
SRCREV_meta ?= "f2f3b6cbd91743920e2cb55998c53326855b2e9c"
17+
SRCREV_machine ?= "7cb6d42c40de351ecab0a083aef260f84407de0d"
18+
SRCREV_meta ?= "60b8562e9989f268ad5d241989f56b71cfa1f648"
1919

2020
SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https \
2121
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.12;destsuffix=${KMETA};protocol=https"

meta/recipes-kernel/linux/linux-yocto-tiny_6.12.bb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ DEPENDS += "openssl-native util-linux-native"
1717
KMETA = "kernel-meta"
1818
KCONF_BSP_AUDIT_LEVEL = "2"
1919

20-
SRCREV_machine ?= "fee8195f8412ff8f1bfc50ba86cdb8f20de22750"
21-
SRCREV_meta ?= "f2f3b6cbd91743920e2cb55998c53326855b2e9c"
20+
SRCREV_machine ?= "298aefdf4112e7c0a84522e4acf2c722e433c8a0"
21+
SRCREV_meta ?= "60b8562e9989f268ad5d241989f56b71cfa1f648"
2222

2323
PV = "${LINUX_VERSION}+git"
2424

meta/recipes-kernel/linux/linux-yocto_6.12.bb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ KBRANCH:qemux86.104 ?= "v6.12/standard/base"
1818
KBRANCH:qemuloongarch64 ?= "v6.12/standard/base"
1919
KBRANCH:qemumips64 ?= "v6.12/standard/mti-malta64"
2020

21-
SRCREV_machine:qemuarm ?= "4260a7bd706072e6bec438cdc29f44845d380b21"
22-
SRCREV_machine:qemuarm64 ?= "fee8195f8412ff8f1bfc50ba86cdb8f20de22750"
23-
SRCREV_machine:qemuloongarch64 ?= "fee8195f8412ff8f1bfc50ba86cdb8f20de22750"
24-
SRCREV_machine:qemumips ?= "681fad27d382f2e0eb53d1b46f9d35aa2332248f"
25-
SRCREV_machine:qemuppc ?= "fee8195f8412ff8f1bfc50ba86cdb8f20de22750"
26-
SRCREV_machine:qemuriscv64 ?= "fee8195f8412ff8f1bfc50ba86cdb8f20de22750"
27-
SRCREV_machine:qemuriscv32 ?= "fee8195f8412ff8f1bfc50ba86cdb8f20de22750"
28-
SRCREV_machine:qemux86 ?= "fee8195f8412ff8f1bfc50ba86cdb8f20de22750"
29-
SRCREV_machine:qemux86-64 ?= "fee8195f8412ff8f1bfc50ba86cdb8f20de22750"
30-
SRCREV_machine:qemumips64 ?= "c32033ad8eac09b074c44a42e7d34d398df9d172"
31-
SRCREV_machine ?= "fee8195f8412ff8f1bfc50ba86cdb8f20de22750"
32-
SRCREV_meta ?= "f2f3b6cbd91743920e2cb55998c53326855b2e9c"
21+
SRCREV_machine:qemuarm ?= "37a1fd13ca538e7785daf01434495a614bc55ead"
22+
SRCREV_machine:qemuarm64 ?= "298aefdf4112e7c0a84522e4acf2c722e433c8a0"
23+
SRCREV_machine:qemuloongarch64 ?= "298aefdf4112e7c0a84522e4acf2c722e433c8a0"
24+
SRCREV_machine:qemumips ?= "2bcf58ea5aa19d54c436e63c59ab09b307e9ee8e"
25+
SRCREV_machine:qemuppc ?= "298aefdf4112e7c0a84522e4acf2c722e433c8a0"
26+
SRCREV_machine:qemuriscv64 ?= "298aefdf4112e7c0a84522e4acf2c722e433c8a0"
27+
SRCREV_machine:qemuriscv32 ?= "298aefdf4112e7c0a84522e4acf2c722e433c8a0"
28+
SRCREV_machine:qemux86 ?= "298aefdf4112e7c0a84522e4acf2c722e433c8a0"
29+
SRCREV_machine:qemux86-64 ?= "298aefdf4112e7c0a84522e4acf2c722e433c8a0"
30+
SRCREV_machine:qemumips64 ?= "6470f58a8f04951f202cf85afb4421d2e7ec9995"
31+
SRCREV_machine ?= "298aefdf4112e7c0a84522e4acf2c722e433c8a0"
32+
SRCREV_meta ?= "60b8562e9989f268ad5d241989f56b71cfa1f648"
3333

3434
# set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll
3535
# get the <version>/base branch, which is pure upstream -stable, and the same

0 commit comments

Comments
 (0)