Skip to content

Commit bb761fc

Browse files
JasonXingMartin KaFai Lau
authored andcommitted
selftests/bpf: eliminate warning of get_cgroup_id_from_path()
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 <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin KaFai Lau <[email protected]>
1 parent 50408d7 commit bb761fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/bpf/cgroup_helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ int create_and_get_cgroup(const char *relative_path)
429429
* which is an invalid cgroup id.
430430
* If there is a failure, it prints the error to stderr.
431431
*/
432-
unsigned long long get_cgroup_id_from_path(const char *cgroup_workdir)
432+
static unsigned long long get_cgroup_id_from_path(const char *cgroup_workdir)
433433
{
434434
int dirfd, err, flags, mount_id, fhsize;
435435
union {

0 commit comments

Comments
 (0)