Search notes:

scripts/find-unused-docs.sh

scripts/find-unused-docs.sh detects *.c files (in a specified directory) with kernel-doc comments for exported functions that are not referenced in RST files:
$ scripts/find-unused-docs.sh sound/firewire
The following files contain kerneldoc comments for exported functions that are not used in the formatted documentation
sound/firewire/cmp.c
sound/firewire/fcp.c
sound/firewire/packets-buffer.c
sound/firewire/amdtp-stream.c
sound/firewire/amdtp-am824.c
sound/firewire/iso-resources.c
sound/firewire/lib.c
The script first finds all source files referenced by a .. kernel-doc instruction under Documentation/ ( grep -rHR ".. kernel-doc" --include \*.rst | cut -d " " -f 3) and stores the file names in the array FILES_INCLUDED.
It then iterates over each *.c file under the specified directory (this line) and checks if the file contains kernel-doc by calling scripts/kernel-doc. If the file does contain kernel-doc but is not referenced in the set of *.rst files, the name of the file is printed to the console.

See also

Other scripts

Links

https://github.com/torvalds/linux/blob/master/scripts/find-unused-docs.sh

Index