bpf, cgroups: clean up kerneldoc warnings
authorValdis Kletnieks <valdis.kletnieks@vt.edu>
Tue, 29 Jan 2019 06:47:06 +0000 (01:47 -0500)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 31 Jan 2019 09:32:01 +0000 (10:32 +0100)
Building with W=1 reveals some bitrot:

  CC      kernel/bpf/cgroup.o
kernel/bpf/cgroup.c:238: warning: Function parameter or member 'flags' not described in '__cgroup_bpf_attach'
kernel/bpf/cgroup.c:367: warning: Function parameter or member 'unused_flags' not described in '__cgroup_bpf_detach'

Add a kerneldoc line for 'flags'.

Fixing the warning for 'unused_flags' is best approached by
removing the unused parameter on the function call.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/bpf-cgroup.h
kernel/bpf/cgroup.c
kernel/cgroup/cgroup.c

index 588dd5f0bd85aae59a7062ba2e46af05c61c8c80..695b2a880d9ad4bb97a27d3bd06da22236a3a5ff 100644 (file)
@@ -78,7 +78,7 @@ int cgroup_bpf_inherit(struct cgroup *cgrp);
 int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
                        enum bpf_attach_type type, u32 flags);
 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
-                       enum bpf_attach_type type, u32 flags);
+                       enum bpf_attach_type type);
 int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
                       union bpf_attr __user *uattr);
 
index ab612fe9862f0668b566722c413d366d598f10ca..d78cfec5807d4fa69aa76bf27b1cab676b3a946f 100644 (file)
@@ -230,6 +230,7 @@ cleanup:
  * @cgrp: The cgroup which descendants to traverse
  * @prog: A program to attach
  * @type: Type of attach operation
+ * @flags: Option flags
  *
  * Must be called with cgroup_mutex held.
  */
@@ -363,7 +364,7 @@ cleanup:
  * Must be called with cgroup_mutex held.
  */
 int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
-                       enum bpf_attach_type type, u32 unused_flags)
+                       enum bpf_attach_type type)
 {
        struct list_head *progs = &cgrp->bpf.progs[type];
        enum bpf_cgroup_storage_type stype;
index f31bd61c946645a30c9f43814bec588c9034677c..9f617605dacbfe5b2c75f0e04d88ad77e6922531 100644 (file)
@@ -5996,7 +5996,7 @@ int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
        int ret;
 
        mutex_lock(&cgroup_mutex);
-       ret = __cgroup_bpf_detach(cgrp, prog, type, flags);
+       ret = __cgroup_bpf_detach(cgrp, prog, type);
        mutex_unlock(&cgroup_mutex);
        return ret;
 }