Skip to content

Commit 1832f4e

Browse files
valdiskborkmann
authored andcommitted
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>
1 parent 116bfa9 commit 1832f4e

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎include/linux/bpf-cgroup.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ int cgroup_bpf_inherit(struct cgroup *cgrp);
7878
int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
7979
enum bpf_attach_type type, u32 flags);
8080
int __cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
81-
enum bpf_attach_type type, u32 flags);
81+
enum bpf_attach_type type);
8282
int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
8383
union bpf_attr __user *uattr);
8484

‎kernel/bpf/cgroup.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ static int update_effective_progs(struct cgroup *cgrp,
230230
* @cgrp: The cgroup which descendants to traverse
231231
* @prog: A program to attach
232232
* @type: Type of attach operation
233+
* @flags: Option flags
233234
*
234235
* Must be called with cgroup_mutex held.
235236
*/
@@ -363,7 +364,7 @@ int __cgroup_bpf_attach(struct cgroup *cgrp, struct bpf_prog *prog,
363364
* Must be called with cgroup_mutex held.
364365
*/
365366
int __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)
367368
{
368369
struct list_head *progs = &cgrp->bpf.progs[type];
369370
enum bpf_cgroup_storage_type stype;

‎kernel/cgroup/cgroup.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5996,7 +5996,7 @@ int cgroup_bpf_detach(struct cgroup *cgrp, struct bpf_prog *prog,
59965996
int ret;
59975997

59985998
mutex_lock(&cgroup_mutex);
5999-
ret = __cgroup_bpf_detach(cgrp, prog, type, flags);
5999+
ret = __cgroup_bpf_detach(cgrp, prog, type);
60006000
mutex_unlock(&cgroup_mutex);
60016001
return ret;
60026002
}

0 commit comments

Comments
 (0)