linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* about make mandocs warnings
@ 2025-10-25 23:49 Randy Dunlap
  2025-10-26 11:59 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 6+ messages in thread
From: Randy Dunlap @ 2025-10-25 23:49 UTC (permalink / raw)
  To: Linux Documentation, Mauro Carvalho Chehab

Hi Mauro,


'make mandocs' on the full kernel tree generates a little over 10,000
lines of Warning:s.  Then it says:
  Warning: kernel-doc returned 138 warnings

What does that number mean?

kernel-doc is doing a very good job at finding issues in kernel-doc
notation, but there are a few cases of erroneous reporting. These are not
numerous and may not be worth much effort to fix them, although
some of them should not take much effort (I think). But I am just
reporting these in case someone wants to fix them.


Examples:

Warning: drivers/misc/vmw_balloon.c:259 struct member '5' not described in 'vmballoon_batch_entry'
"5" is part of an expression "PAGE_SHIFT - 5" for number of bits in a bitfield:
struct vmballoon_batch_entry {
	u64 status : 5;
	u64 reserved : PAGE_SHIFT - 5;
	u64 pfn : 52;
} __packed;

Warning: net/netfilter/nft_set_pipapo.h:102 union member '32' not described in 'nft_pipapo_map_bucket'
"32" is part of a static_assert() expression. Probably just
ignore the entire static_assert() [any number of lines].


Warning: include/linux/hrtimer_types.h:47 Invalid param: enum hrtimer_restart            (*__private function)(struct hrtimer *)
Warning: include/linux/hrtimer_types.h:47 struct member 'enum hrtimer_restart            (*__private function' not described in 'hrtimer'
"__private" is an attribute from <linux/compiler_types.h> and the
struct member here should be "function", which is described.


Warning: include/linux/rethook.h:38 Invalid param: void (__rcu *handler) (struct rethook_node *, void *, unsigned long, struct pt_regs *)
Warning: include/linux/rethook.h:38 struct member 'void (__rcu *handler' not described in 'rethook'
"__rcu" is an attribute from <linux/compiler_types.h> and the
struct member here is "handler", which is described.

Warning: security/ipe/hooks.c:54 function parameter '__always_unused' not described in 'ipe_mmap_file'
Warning: security/ipe/hooks.c:82 function parameter '__always_unused' not described in 'ipe_file_mprotect'
"__always_unused" is an attribute from <linux/compiler_attributes.h>.



Warning: security/landlock/fs.c:765 Invalid param: layer_mask_t (*const layer_masks_parent1)[LANDLOCK_NUM_ACCESS_FS]
Warning: security/landlock/fs.c:765 function parameter 'layer_mask_t (*const layer_masks_parent1' not described in 'is_access_to_paths_allowed'
Warning: security/landlock/fs.c:765 Invalid param: layer_mask_t (*const layer_masks_parent2)[LANDLOCK_NUM_ACCESS_FS]
Warning: security/landlock/fs.c:765 function parameter 'layer_mask_t (*const layer_masks_parent2' not described in 'is_access_to_paths_allowed'
@layer_masks_parent1 and @layer_masks_parent2 are described in kernel-doc.

Warning: security/landlock/fs.c:1142 Invalid param: layer_mask_t (*const layer_masks_dom)[LANDLOCK_NUM_ACCESS_FS]
Warning: security/landlock/fs.c:1142 function parameter 'layer_mask_t (*const layer_masks_dom' not described in 'collect_domain_accesses'
@layer_masks_dom is described in kernel-doc.

Warning: security/landlock/ruleset.c:210 Invalid param: const struct landlock_layer (*const layers)[]
Warning: security/landlock/ruleset.c:210 function parameter 'const struct landlock_layer (*const layers' not described in 'insert_rule'
@layers is described in kernel-doc.

Warning: security/landlock/ruleset.c:693 Invalid param: layer_mask_t (*const layer_masks)[]
Warning: security/landlock/ruleset.c:693 function parameter 'layer_mask_t (*const layer_masks' not described in 'landlock_init_layer_masks'
@layer_masks is described in kernel-doc.



Note: hundreds (probably thousands) of the mandocs warnings would disappear
if kernel-doc accepted '-' in addition to ':' as a function parameter
or struct/union/enum member separator (like it does for
function/struct/union/enum short description).

-- 
~Randy


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-11-07 22:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-25 23:49 about make mandocs warnings Randy Dunlap
2025-10-26 11:59 ` Mauro Carvalho Chehab
2025-10-26 16:43   ` Randy Dunlap
2025-11-07 10:15     ` Mauro Carvalho Chehab
2025-11-07 21:33       ` about make mandocs warnings (1) Randy Dunlap
2025-11-07 22:54         ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).