Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

landlock: Fix kernel-doc warning for pointer-to-array parameters

The insert_rule() and create_rule() functions take a
pointer-to-flexible-array parameter declared as:

const struct landlock_layer (*const layers)[]

The kernel-doc parser cannot handle a qualifier between * and the
parameter name in this syntax, producing spurious "Invalid param" and
"not described" warnings.

Remove the const qualifier of the "layers" argument to avoid this
parsing issue.

Cc: Günther Noack <gnoack@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20260310172004.1839864-1-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>

+2 -2
+2 -2
security/landlock/ruleset.c
··· 107 107 108 108 static struct landlock_rule * 109 109 create_rule(const struct landlock_id id, 110 - const struct landlock_layer (*const layers)[], const u32 num_layers, 110 + const struct landlock_layer (*layers)[], const u32 num_layers, 111 111 const struct landlock_layer *const new_layer) 112 112 { 113 113 struct landlock_rule *new_rule; ··· 206 206 */ 207 207 static int insert_rule(struct landlock_ruleset *const ruleset, 208 208 const struct landlock_id id, 209 - const struct landlock_layer (*const layers)[], 209 + const struct landlock_layer (*layers)[], 210 210 const size_t num_layers) 211 211 { 212 212 struct rb_node **walker_node;