Mauro Carvalho Chehab
84ce5b9877
scripts: kernel-doc: improve nested logic to handle multiple identifiers
...
It is possible to use nested structs like:
struct {
struct {
void *arg1;
} st1, st2, *st3, st4;
};
Handling it requires to split each parameter. Change the logic
to allow such definitions.
In order to test the new nested logic, the following file
was used to test
<code>
struct foo { int a; }; /* Just to avoid errors if compiled */
/**
* struct my_struct - a struct with nested unions and structs
* @arg1: first argument of anonymous union/anonymous struct
* @arg2: second argument of anonymous union/anonymous struct
* @arg1b: first argument of anonymous union/anonymous struct
* @arg2b: second argument of anonymous union/anonymous struct
* @arg3: third argument of anonymous union/anonymous struct
* @arg4: fourth argument of anonymous union/anonymous struct
* @bar.st1.arg1: first argument of struct st1 on union bar
* @bar.st1.arg2: second argument of struct st1 on union bar
* @bar.st1.bar1: bar1 at st1
* @bar.st1.bar2: bar2 at st1
* @bar.st2.arg1: first argument of struct st2 on union bar
* @bar.st2.arg2: second argument of struct st2 on union bar
* @bar.st3.arg2: second argument of struct st3 on union bar
* @f1: nested function on anonimous union/struct
* @bar.st2.f2: nested function on named union/struct
*/
struct my_struct {
/* Anonymous union/struct*/
union {
struct {
char arg1 : 1;
char arg2 : 3;
};
struct {
int arg1b;
int arg2b;
};
struct {
void *arg3;
int arg4;
int (*f1)(char foo, int bar);
};
};
union {
struct {
int arg1;
int arg2;
struct foo bar1, *bar2;
} st1; /* bar.st1 is undocumented, cause a warning */
struct {
void *arg1; /* bar.st3.arg1 is undocumented, cause a warning */
int arg2;
int (*f2)(char foo, int bar); /* bar.st3.fn2 is undocumented, cause a warning */
} st2, st3, *st4;
int (*f3)(char foo, int bar); /* f3 is undocumented, cause a warning */
} bar; /* bar is undocumented, cause a warning */
/* private: */
int undoc_privat; /* is undocumented but private, no warning */
/* public: */
int undoc_public; /* is undocumented, cause a warning */
};
</code>
It produces the following warnings, as expected:
test2.h:57: warning: Function parameter or member 'bar' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'bar.st1' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'bar.st2' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'bar.st3' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'bar.st3.arg1' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'bar.st3.f2' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'bar.st4' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'bar.st4.arg1' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'bar.st4.arg2' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'bar.st4.f2' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'bar.f3' not described in 'my_struct'
test2.h:57: warning: Function parameter or member 'undoc_public' not described in 'my_struct'
Suggested-by: Markus Heiser <markus.heiser@darmarit.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-12-21 13:41:47 -07:00
..
basic
fixdep: trivial: typo fix and correction
2017-08-10 01:01:03 +09:00
coccinelle
Coccinelle: Remove setup_timer.cocci
2017-11-21 15:57:11 -08:00
dtc
DeviceTree for 4.15:
2017-11-14 18:25:40 -08:00
gcc-plugins
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
gdb
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
genksyms
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
kconfig
kconfig/symbol.c: use correct pointer type argument for sizeof
2017-11-23 23:12:02 +09:00
ksymoops
Fix dead URLs to ftp.kernel.org
2017-03-28 16:16:52 +02:00
mod
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2017-11-15 11:56:19 -08:00
package
kbuild: rpm: prompt to use "rpm-pkg" if "rpm" target is used
2017-11-23 23:12:05 +09:00
selinux
Kbuild updates for v4.15
2017-11-17 17:45:29 -08:00
tracing
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
.gitignore
Docs: clean up some DocBook loose ends
2017-06-23 14:17:38 -06:00
adjust_autoksyms.sh
asn1_compiler.c
bloat-o-meter
scripts/bloat-o-meter: don't fail with division by 0
2017-11-29 18:40:43 -08:00
bootgraph.pl
scripts: Switch to more portable Perl shebang
2017-05-14 11:20:44 +09:00
check_00index.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
check_extable.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
checkincludes.pl
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
checkkconfigsymbols.py
checkpatch.pl
vsprintf: add printk specifier %px
2017-11-29 12:13:14 +11:00
checkstack.pl
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
checksyscalls.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
checkversion.pl
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
cleanfile
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
cleanpatch
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
coccicheck
coccinelle: fix parallel build with CHECK=scripts/coccicheck
2017-11-23 23:12:03 +09:00
config
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
conmakehash.c
const_structs.checkpatch
decode_stacktrace.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
decodecode
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
depmod.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
diffconfig
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
documentation-file-ref-check
Documentation: add script and build target to check for broken file references
2017-10-12 11:07:42 -06:00
export_report.pl
scripts: Switch to more portable Perl shebang
2017-05-14 11:20:44 +09:00
extract-cert.c
extract-ikconfig
extract-module-sig.pl
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
extract-sys-certs.pl
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
extract-vmlinux
extract_xc3028.pl
scripts: Switch to more portable Perl shebang
2017-05-14 11:20:44 +09:00
faddr2line
scripts/faddr2line: extend usage on generic arch
2017-11-29 18:40:42 -08:00
find-unused-docs.sh
scripts: Add a script to find unused documentation
2017-10-23 08:01:37 -06:00
gcc-goto.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
gcc-ld
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
gcc-plugin.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
gcc-version.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
gcc-x86_32-has-stack-protector.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
gcc-x86_64-has-stack-protector.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
gen_initramfs_list.sh
Kbuild misc updates for 4.13
2017-07-07 15:09:09 -07:00
get_dvb_firmware
scripts: Switch to more portable Perl shebang
2017-05-14 11:20:44 +09:00
get_maintainer.pl
get_maintainer: add more --self-test options
2017-11-17 16:10:01 -08:00
gfp-translate
headerdep.pl
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
headers.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
headers_check.pl
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
headers_install.sh
Merge branch 'linus' into locking/core, to resolve conflicts
2017-11-07 10:32:44 +01:00
insert-sys-cert.c
kallsyms.c
scripts/kallsyms.c: ignore symbol type 'n'
2017-10-13 16:18:32 -07:00
Kbuild.include
kbuild: create directory for make cache only when necessary
2017-11-16 09:07:32 +09:00
kernel-doc
scripts: kernel-doc: improve nested logic to handle multiple identifiers
2017-12-21 13:41:47 -07:00
ld-version.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
leaking_addresses.pl
leaking_addresses: add SigIgn to false positives
2017-11-14 09:29:27 +11:00
Lindent
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
link-vmlinux.sh
Kbuild updates for v4.15
2017-11-17 17:45:29 -08:00
Makefile
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
Makefile.asm-generic
Kbuild updates for v4.15
2017-11-17 17:45:29 -08:00
Makefile.build
Kbuild updates for v4.15 (2nd)
2017-11-25 08:06:30 -10:00
Makefile.clean
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
Makefile.dtbinst
DeviceTree for 4.15:
2017-11-14 18:25:40 -08:00
Makefile.extrawarn
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
Makefile.gcc-plugins
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
Makefile.headersinst
Kbuild updates for v4.15
2017-11-17 17:45:29 -08:00
Makefile.host
Kbuild updates for v4.15
2017-11-17 17:45:29 -08:00
Makefile.kasan
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
Makefile.kcov
Makefile: support flag -fsanitizer-coverage=trace-cmp
2017-11-17 16:10:04 -08:00
Makefile.lib
kbuild: drop $(extra-y) from real-objs-y
2017-11-23 23:29:26 +09:00
Makefile.modbuiltin
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
Makefile.modinst
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
Makefile.modpost
Kbuild updates for v4.15
2017-11-17 17:45:29 -08:00
Makefile.modsign
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
Makefile.ubsan
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
makelst
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
markup_oops.pl
scripts: Switch to more portable Perl shebang
2017-05-14 11:20:44 +09:00
mkcompile_h
Kbuild updates for v4.15
2017-11-17 17:45:29 -08:00
mkmakefile
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
mksysmap
mkuboot.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
module-common.lds
module: set .init_array alignment to 8
2017-03-13 09:40:28 -07:00
namespace.pl
scripts: Switch to more portable Perl shebang
2017-05-14 11:20:44 +09:00
objdiff
scripts: objdiff: Ignore debug info when comparing
2017-03-11 11:13:38 +09:00
parse-maintainers.pl
parse-maintainers: add ability to specify filenames
2017-11-17 16:10:01 -08:00
patch-kernel
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
pnmtologo.c
profile2linkerlist.pl
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
prune-kernel
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
recordmcount.c
ftrace: Allow for function tracing to record init functions on boot up
2017-03-24 20:51:49 -04:00
recordmcount.h
recordmcount.pl
scripts: Switch to more portable Perl shebang
2017-05-14 11:20:44 +09:00
setlocalversion
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
show_delta
sign-file.c
sortextable.c
sortextable.h
spelling.txt
spelling.txt: add "unnecessary" typo variants
2017-11-17 16:10:00 -08:00
sphinx-pre-install
docs-rst: don't require adjustbox anymore
2017-09-08 10:02:55 -06:00
stackdelta
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
stackusage
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
tags.sh
tags: honor COMPILED_SOURCE with apart output directory
2017-06-06 08:42:34 +09:00
unifdef.c
ver_linux
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
xen-hypercalls.sh
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
xz_wrap.sh