* [PATCH net-next] selftests/bpf: eliminate warning of get_cgroup_id_from_path()
@ 2024-04-06 14:46 Jason Xing
2024-04-08 15:31 ` Yonghong Song
2024-04-09 0:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jason Xing @ 2024-04-06 14:46 UTC (permalink / raw)
To: davem, edumazet, kuba, pabeni, ast, daniel, andrii, martin.lau,
eddyz87, song, yonghong.song, john.fastabend, kpsingh, sdf,
haoluo, jolsa, mykolal, shuah
Cc: bpf, linux-kselftest, netdev, kerneljasonxing, Jason Xing
From: Jason Xing <kernelxing@tencent.com>
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.
Signed-off-by: Jason Xing <kernelxing@tencent.com>
---
tools/testing/selftests/bpf/cgroup_helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/cgroup_helpers.c b/tools/testing/selftests/bpf/cgroup_helpers.c
index 19be9c63d5e8..f2952a65dcc2 100644
--- a/tools/testing/selftests/bpf/cgroup_helpers.c
+++ b/tools/testing/selftests/bpf/cgroup_helpers.c
@@ -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 {
--
2.37.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] selftests/bpf: eliminate warning of get_cgroup_id_from_path()
2024-04-06 14:46 [PATCH net-next] selftests/bpf: eliminate warning of get_cgroup_id_from_path() Jason Xing
@ 2024-04-08 15:31 ` Yonghong Song
2024-04-09 0:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Yonghong Song @ 2024-04-08 15:31 UTC (permalink / raw)
To: Jason Xing, davem, edumazet, kuba, pabeni, ast, daniel, andrii,
martin.lau, eddyz87, song, john.fastabend, kpsingh, sdf, haoluo,
jolsa, mykolal, shuah
Cc: bpf, linux-kselftest, netdev, Jason Xing
On 4/6/24 7:46 AM, Jason Xing wrote:
> From: Jason Xing <kernelxing@tencent.com>
>
> 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...
>
> Make this function static could solve the warning problem since
> no one outside of the file calls it.
>
> Signed-off-by: Jason Xing <kernelxing@tencent.com>
But your change looks fine.
Acked-by: Yonghong Song <yonghong.song@linux.dev>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] selftests/bpf: eliminate warning of get_cgroup_id_from_path()
2024-04-06 14:46 [PATCH net-next] selftests/bpf: eliminate warning of get_cgroup_id_from_path() Jason Xing
2024-04-08 15:31 ` Yonghong Song
@ 2024-04-09 0:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-09 0:00 UTC (permalink / raw)
To: Jason Xing
Cc: davem, edumazet, kuba, pabeni, ast, daniel, andrii, martin.lau,
eddyz87, song, yonghong.song, john.fastabend, kpsingh, sdf,
haoluo, jolsa, mykolal, shuah, bpf, linux-kselftest, netdev,
kernelxing
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Martin KaFai Lau <martin.lau@kernel.org>:
On Sat, 6 Apr 2024 22:46:13 +0800 you wrote:
> From: Jason Xing <kernelxing@tencent.com>
>
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-09 0:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06 14:46 [PATCH net-next] selftests/bpf: eliminate warning of get_cgroup_id_from_path() Jason Xing
2024-04-08 15:31 ` Yonghong Song
2024-04-09 0:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).