I have this code:
/**
* struct tst_cap - A capability to alter.
*
* @action: What should we do, i.e. drop or add a capability.
* @id: A capability id.
* @name: A capability name.
*
* This structure is usually constructed with the TST_CAP() macro so that the
* name is created automatically.
*/
struct tst_cap {
uint32_t action;
uint32_t id;
char *name;
};
/**
* TST_CAP() - Create a struct tst_cap entry.
*
* @action: What should we do, i.e. drop or add capability.
* @capability: A capability id, e.g. CAP_BPF.
*/
#define TST_CAP(action, capability) {action, capability, #capability}
tst_cap() and TST_CAP() are duplicate:
../include/tst_capability.h:74: WARNING: Duplicate explicit target name: "tst_cap". [docutils]
ERROR: ../include/tst_cmd.h:89: [kernel-doc ERROR] : name 'tst_cmd' used several times
ERROR: ../include/tst_cmd.h:125: [kernel-doc ERROR] : name 'tst_cmd' used several times
../include/tst_cmd.h:73: WARNING: Duplicate explicit target name: "tst_cmd". [docutils]
../include/tst_cmd.h:73: WARNING: Duplicate C declaration, also defined at developers/api_c_tests:24.
Declaration is '.. c:function:: int tst_cmd(const char *const argv, const char *stdout_path, const char *stderr_path, enum tst_cmd_flags flags)'. [duplicate_declaration.c]
I suppose due using flags=re.IGNORECASE but that is really needed.
|
doc_sect_reST = RE( |
|
doc_com_section.pattern |
|
+ r"(" |
|
+ r"@\w[^:]*" # "@foo: lorem" or |
|
+ r"|" |
|
+ r"@\w[.\w]+[^:]*" # "@foo.bar: lorem" or |
|
+ r"|" |
|
+ r"\@\.\.\." # ellipsis "@...: lorem" or |
|
# a tribute to vintage markups, when in reST mode ... |
|
+ r"|description|context|returns?|notes?|examples?|introduction|intro" |
|
+ r")" |
|
+ r":(.*?)\s*$", # this matches also strings like "http://..." (doc_sect_except) |
|
flags=re.IGNORECASE, |
Is there a way to document these two? Or do I need to rename one of them?
I have this code:
tst_cap()andTST_CAP()are duplicate:I suppose due using
flags=re.IGNORECASEbut that is really needed.linuxdoc/linuxdoc/kernel_doc.py
Lines 137 to 149 in 3948427
Is there a way to document these two? Or do I need to rename one of them?