docs: kernel-doc: fix parsing of function pointers
PATCH 1/1 docs: kernel-doc: fix parsing of function pointers
kernel-doc fails to parse function definitions like the one below
efi_status_t efi_create_event(uint32_t type, efi_uintn_t notify_tpl,
void (EFIAPI *notify_function) (
struct efi_event *event, void *context),
void *notify_context, efi_guid_t *group, struct efi_event **event)
{
due to the "EFIAPI" attribute preceding the function name.
---
I am submitted the same patch to the Kernel upstream:
https://lkml.org/lkml/2018/9/3/1185
--- scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kernel-doc +1 -1
@@ -1381,7 +1381,7 @@ sub create_parameterlist($$$$) { } elsif ($arg =~ m/\(.+\)\s*\(/) { # pointer-to-function $arg =~ tr/#/,/; - $arg =~ m/[^\(]+\(\*?\s*([\w\.]*)\s*\)/; + $arg =~ m/[^\(]+\([\w\s]*\*?\s*([\w\.]*)\s*\)/; $param = $1; $type = $arg; $type =~ s/([^\(]+\(\*?)\s*$param/$1/;
Signature · 1 line
2.18.0
PATCH 1/1 docs: kernel-doc: fix parsing of function pointers
Quoted 10 lines · Heinrich Schuchardt
kernel-doc fails to parse function definitions like the one below
efi_status_tefi_create_event(uint32_t type,efi_uintn_tnotify_tpl,
void (EFIAPI*notify_function) (
structefi_event*event, void *context),
void*notify_context,efi_guid_t*group, structefi_event**event)
{
Quoted 6 lines
due to the "EFIAPI" attribute preceding the function name.
Signed-off-by Heinrich Schuchardt <[email protected]>---
I am submitted the same patch to the Kernel upstream:
https://lkml.org/lkml/2018/9/3/1185
Looking at the lkml thread this seems to have not reached a conclusion. Are you planning to push some v2 there that tries to address some of the oddities there? Or should we just make this a local correction? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181008/ea5bc487/attachment.sig>
PATCH 1/1 docs: kernel-doc: fix parsing of function pointers
Quoted 19 lines · Tom Rini
Quoted 10 lines · Heinrich Schuchardt
kernel-doc fails to parse function definitions like the one below
efi_status_tefi_create_event(uint32_t type,efi_uintn_tnotify_tpl,
void (EFIAPI*notify_function) (
structefi_event*event, void *context),
void*notify_context,efi_guid_t*group, structefi_event**event)
{Quoted 6 lines
due to the "EFIAPI" attribute preceding the function name.
Signed-off-by Heinrich Schuchardt <[email protected]>---
I am submitted the same patch to the Kernel upstream:
https://lkml.org/lkml/2018/9/3/1185
Quoted 5 lines
Looking at the lkml thread this seems to have not reached a conclusion. Are you planning to push some v2 there that tries to address some of the oddities there? Or should we just make this a local correction? Thanks!
Hello Tom,
I will have to rework the patch. We should stay in sync with the Linux version.
I have marked it as "changes requested" in Patchwork now.
Best regards
Heinrich