scripts: kernel-doc: don't mangle with parameter list
commit0c77185233391cf984192efa4caa77c37579e159
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 17 Nov 2020 16:53:04 +0000 (17 17:53 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Dec 2020 17:15:23 +0000 (10 12:15 -0500)
tree8bb58cc86e2a3f30af61f70558cf387435122bc7
parent3999ffcf132e0dc39c9cce1a616f2f4c5fbdc630
scripts: kernel-doc: don't mangle with parameter list

While kernel-doc needs to parse parameters in order to
identify its name, it shouldn't be touching the type,
as parsing it is very difficult, and errors happen.

One current error is when parsing this parameter:

const u32 (*tab)[256]

Found at ./lib/crc32.c, on this function:

u32 __pure crc32_be_generic (u32 crc, unsigned char const *p, size_t len, const u32 (*tab)[256], u32 polynomial);

The current logic mangles it, producing this output:

const u32 ( *tab

That's something that it is not recognizeable.

So, instead, let's push the argument as-is, and use it
when printing the function prototype and when describing
each argument.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20201117165312.118257-22-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scripts/kernel-doc