]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bpf_doc: Fix build error with older python versions
authorMichal Suchanek <msuchanek@suse.de>
Mon, 9 Jan 2023 11:34:42 +0000 (12:34 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 14 Mar 2023 15:46:23 +0000 (16:46 +0100)
commit77874f2e2dc1740ccd09a827dd5639bdd040c7ec
tree0ab0fc6406df9e26aa59aab12b3de6c53b3622f8
parent225166e8b3999edc9d526f100fc6155fba33eae3
bpf_doc: Fix build error with older python versions

BugLink: https://bugs.launchpad.net/bugs/2011425
[ Upstream commit 5fbea42387eba1c7517fcad79099df706def7054 ]

The ability to subscript match result as an array is only available
since python 3.6. Existing code in bpf_doc uses the older group()
interface but commit 8a76145a2ec2 adds code using the new interface.

Use the old interface consistently to avoid build error on older
distributions like the below:

+ make -j48 -s -C /dev/shm/kbuild/linux.33946/current ARCH=powerpc HOSTCC=gcc CROSS_COMPILE=powerpc64-suse-linux- clean
TypeError: '_sre.SRE_Match' object is not subscriptable

Fixes: 8a76145a2ec2 ("bpf: explicitly define BPF_FUNC_xxx integer values")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20230109113442.20946-1-msuchanek@suse.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
scripts/bpf_doc.py