selftests/bpf: eliminate warning of get_cgroup_id_from_path()
Subsystems (5)
PATCH 1/1 selftests/bpf: eliminate warning of get_cgroup_id_from_path()
From: Jason Xing <[email protected]>
The output goes like this if I make samples/bpf:
...warning: no previous prototype for ‘get_cgroup_id_from_path’...
Make this function static could solve the warning problem since no one outside of the file calls it.
--- tools/testing/selftests/bpf/cgroup_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/cgroup_helpers.c +1 -1
@@ -429,7 +429,7 @@ int create_and_get_cgroup(const char *relative_path)* which is an invalid cgroup id. * If there is a failure, it prints the error to stderr. */ -unsigned long long get_cgroup_id_from_path (const char *cgroup_workdir) +static unsigned long long get_cgroup_id_from_path (const char *cgroup_workdir) {int dirfd, err, flags, mount_id, fhsize;union {
Signature · 1 line
2.37.3
Quoted 4 lines · Jason Xing
From: Jason Xing <[email protected]>
The output goes like this if I make
samples/bpf:
...warning: no previous prototype for ‘get_cgroup_id_from_path’...
The CI does not build samples/bpf...
Quoted 5 lines
Make this function static could solve the warning problem since no one outside of the file calls it.
Signed-off-by Jason Xing <[email protected]>
But your change looks fine.
This patch was applied to bpf/bpf-next.git (master) by Martin KaFai Lau <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Martin KaFai Lau <[email protected]>:
Quoted 9 lines · On Sat, 6 Apr 2024 22:46:13 +0800 you wrote:
From: Jason Xing <[email protected]>
The output goes like this if I make
samples/bpf:
...warning: no previous prototype for ‘get_cgroup_id_from_path’...Make this function static could solve the warning problem since no one outside of the file calls it.
[...]
Here is the summary with links:
- [net-next] selftests/bpf: eliminate warning of get_cgroup_id_from_path()
https://git.kernel.org/bpf/bpf-next/c/bb761fcb8217
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html