Skip to content

Commit 64617ec

Browse files
committed
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>
1 parent aba1de9 commit 64617ec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

security/landlock/ruleset.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static bool is_object_pointer(const enum landlock_key_type key_type)
107107

108108
static struct landlock_rule *
109109
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,
111111
const struct landlock_layer *const new_layer)
112112
{
113113
struct landlock_rule *new_rule;
@@ -206,7 +206,7 @@ static void build_check_ruleset(void)
206206
*/
207207
static int insert_rule(struct landlock_ruleset *const ruleset,
208208
const struct landlock_id id,
209-
const struct landlock_layer (*const layers)[],
209+
const struct landlock_layer (*layers)[],
210210
const size_t num_layers)
211211
{
212212
struct rb_node **walker_node;

0 commit comments

Comments
 (0)