diff mbox series

[bpf-next,1/2] selftests/bpf: add static to enable_all_controllers()

Message ID 20191002120404.26962-2-ivan.khoronzhuk@linaro.org
State New
Headers show
Series [bpf-next,1/2] selftests/bpf: add static to enable_all_controllers() | expand

Commit Message

Ivan Khoronzhuk Oct. 2, 2019, 12:04 p.m. UTC
Add static to enable_all_controllers() to get rid from annoying warn:

samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:44:5:
warning: no previous prototype for ‘enable_all_controllers’
[-Wmissing-prototypes]
 int enable_all_controllers(char *cgroup_path)

while samples/bpf build.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>

---
 tools/testing/selftests/bpf/cgroup_helpers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Song Liu Oct. 2, 2019, 4:26 p.m. UTC | #1
> On Oct 2, 2019, at 5:04 AM, Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> wrote:

> 

> Add static to enable_all_controllers() to get rid from annoying warn:

> 

> samples/bpf/../../tools/testing/selftests/bpf/cgroup_helpers.c:44:5:

> warning: no previous prototype for ‘enable_all_controllers’

> [-Wmissing-prototypes]

> int enable_all_controllers(char *cgroup_path)

> 

> while samples/bpf build.

> 

> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>


Acked-by: Song Liu <songliubraving@fb.com>
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/cgroup_helpers.c b/tools/testing/selftests/bpf/cgroup_helpers.c
index e95c33e333a4..4d74f3c4619b 100644
--- a/tools/testing/selftests/bpf/cgroup_helpers.c
+++ b/tools/testing/selftests/bpf/cgroup_helpers.c
@@ -41,7 +41,7 @@ 
  *
  * If successful, 0 is returned.
  */
-int enable_all_controllers(char *cgroup_path)
+static int enable_all_controllers(char *cgroup_path)
 {
 	char path[PATH_MAX + 1];
 	char buf[PATH_MAX];