diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-14 09:04:47 +0100 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2021-01-18 13:33:26 -0700 |
commit | 52042e2db45290f6a512d525518488b7bf143531 (patch) | |
tree | 32e986fa690964afe751ab8ed0aeaea068de2935 /scripts/Makefile | |
parent | 96c0f7c0b9ac00fff928b9e81d134639a4e4ba56 (diff) |
scripts: kernel-doc: validate kernel-doc markup with the actual names
Kernel-doc currently expects that the kernel-doc markup to come
just before the function/enum/struct/union/typedef prototype.
Yet, if it find things like:
/**
* refcount_add - add a value to a refcount
* @i: the value to add to the refcount
* @r: the refcount
*/
static inline void __refcount_add(int i, refcount_t *r, int *oldp);
static inline void refcount_add(int i, refcount_t *r);
Kernel-doc will do the wrong thing:
foobar.h:6: warning: Function parameter or member 'oldp' not described in '__refcount_add'
.. c:function:: void __refcount_add (int i, refcount_t *r, int *oldp)
add a value to a refcount
**Parameters**
``int i``
the value to add to the refcount
``refcount_t *r``
the refcount
``int *oldp``
*undescribed*
Basically, it will document "__refcount_add" with the kernel-doc
markup for refcount_add.
If both functions have the same arguments, this won't even
produce any warning!
Add a logic to check if the kernel-doc identifier matches the actual
name of the C function or data structure that will be documented.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/081546f141a496d6cabb99a4adc140444c705e93.1610610937.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts/Makefile')
0 files changed, 0 insertions, 0 deletions