summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValdis Kletnieks <valdis.kletnieks@vt.edu>2019-01-29 01:47:06 -0500
committerDaniel Borkmann <daniel@iogearbox.net>2019-01-31 04:32:01 -0500
commit1832f4ef5867fd3898d8a6c6c1978b75d76fc246 (patch)
tree47c9430cba4f805fc9394ccb84172cf6ac74e400
parent116bfa96a255123ed209da6544f74a4f2eaca5da (diff)
bpf, cgroups: clean up kerneldoc warnings
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>
-rw-r--r--include/linux/bpf-cgroup.h2
-rw-r--r--kernel/bpf/cgroup.c3
-rw-r--r--kernel/cgroup/cgroup.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h
index 588dd5f0bd85..695b2a880d9a 100644
--- a/include/linux/bpf-cgroup.h
+++ b/include/linux/bpf-cgroup.h
@@ -78,7 +78,7 @@ int cgroup_bpf_inherit(struct cgroup *cgrp);
78int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog, 78int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
79 enum bpf_attach_type type, u32 flags); 79 enum bpf_attach_type type, u32 flags);
80int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, 80int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
81 enum bpf_attach_type type, u32 flags); 81 enum bpf_attach_type type);
82int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr, 82int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
83 union bpf_attr __user *uattr); 83 union bpf_attr __user *uattr);
84 84
diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
index ab612fe9862f..d78cfec5807d 100644
--- a/kernel/bpf/cgroup.c
+++ b/kernel/bpf/cgroup.c
@@ -230,6 +230,7 @@ cleanup:
230 * @cgrp: The cgroup which descendants to traverse 230 * @cgrp: The cgroup which descendants to traverse
231 * @prog: A program to attach 231 * @prog: A program to attach
232 * @type: Type of attach operation 232 * @type: Type of attach operation
233 * @flags: Option flags
233 * 234 *
234 * Must be called with cgroup_mutex held. 235 * Must be called with cgroup_mutex held.
235 */ 236 */
@@ -363,7 +364,7 @@ cleanup:
363 * Must be called with cgroup_mutex held. 364 * Must be called with cgroup_mutex held.
364 */ 365 */
365int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog, 366int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
366 enum bpf_attach_type type, u32 unused_flags) 367 enum bpf_attach_type type)
367{ 368{
368 struct list_head *progs = &cgrp->bpf.progs[type]; 369 struct list_head *progs = &cgrp->bpf.progs[type];
369 enum bpf_cgroup_storage_type stype; 370 enum bpf_cgroup_storage_type stype;
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index f31bd61c9466..9f617605dacb 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -5996,7 +5996,7 @@ int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
5996 int ret; 5996 int ret;
5997 5997
5998 mutex_lock(&cgroup_mutex); 5998 mutex_lock(&cgroup_mutex);
5999 ret = __cgroup_bpf_detach(cgrp, prog, type, flags); 5999 ret = __cgroup_bpf_detach(cgrp, prog, type);
6000 mutex_unlock(&cgroup_mutex); 6000 mutex_unlock(&cgroup_mutex);
6001 return ret; 6001 return ret;
6002} 6002}