scripts: kernel-doc: don't mangle with parameter list
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 30 Sep 2020 10:24:43 +0000 (12:24 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 15 Oct 2020 05:49:36 +0000 (07:49 +0200)
commited8348e23abce79780f3b679c74a48bcdc47c947
tree1dcca8e5e27ca0cf20e593fac9ae00dd054a29e0
parent47bcacfd2b00e3795eac3faf47eb854eb9675a4f
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>
scripts/kernel-doc