2024-02-18 18:59:20

by John Ogness

[permalink] [raw]
Subject: [PATCH printk v2 10/26] printk: nbcon: Fix kerneldoc for enums

Kerneldoc requires enums to be specified as such. Otherwise it is
interpreted as function documentation.

Signed-off-by: John Ogness <[email protected]>
---
include/linux/console.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/console.h b/include/linux/console.h
index 5c55faa013e8..d8922282efa1 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -130,7 +130,7 @@ static inline int con_debug_leave(void)
*/

/**
- * cons_flags - General console flags
+ * enum cons_flags - General console flags
* @CON_PRINTBUFFER: Used by newly registered consoles to avoid duplicate
* output of messages that were already shown by boot
* consoles or read by userspace via syslog() syscall.
@@ -211,7 +211,7 @@ struct nbcon_state {
static_assert(sizeof(struct nbcon_state) <= sizeof(int));

/**
- * nbcon_prio - console owner priority for nbcon consoles
+ * enum nbcon_prio - console owner priority for nbcon consoles
* @NBCON_PRIO_NONE: Unused
* @NBCON_PRIO_NORMAL: Normal (non-emergency) usage
* @NBCON_PRIO_EMERGENCY: Emergency output (WARN/OOPS...)
--
2.39.2



2024-02-18 20:26:18

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH printk v2 10/26] printk: nbcon: Fix kerneldoc for enums



On 2/18/24 10:57, John Ogness wrote:
> Kerneldoc requires enums to be specified as such. Otherwise it is
> interpreted as function documentation.
>
> Signed-off-by: John Ogness <[email protected]>

Reviewed-by: Randy Dunlap <[email protected]>

Thanks.

> ---
> include/linux/console.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/console.h b/include/linux/console.h
> index 5c55faa013e8..d8922282efa1 100644
> --- a/include/linux/console.h
> +++ b/include/linux/console.h
> @@ -130,7 +130,7 @@ static inline int con_debug_leave(void)
> */
>
> /**
> - * cons_flags - General console flags
> + * enum cons_flags - General console flags
> * @CON_PRINTBUFFER: Used by newly registered consoles to avoid duplicate
> * output of messages that were already shown by boot
> * consoles or read by userspace via syslog() syscall.
> @@ -211,7 +211,7 @@ struct nbcon_state {
> static_assert(sizeof(struct nbcon_state) <= sizeof(int));
>
> /**
> - * nbcon_prio - console owner priority for nbcon consoles
> + * enum nbcon_prio - console owner priority for nbcon consoles
> * @NBCON_PRIO_NONE: Unused
> * @NBCON_PRIO_NORMAL: Normal (non-emergency) usage
> * @NBCON_PRIO_EMERGENCY: Emergency output (WARN/OOPS...)

--
#Randy

2024-02-23 13:14:14

by Petr Mladek

[permalink] [raw]
Subject: Re: [PATCH printk v2 10/26] printk: nbcon: Fix kerneldoc for enums

On Sun 2024-02-18 20:03:10, John Ogness wrote:
> Kerneldoc requires enums to be specified as such. Otherwise it is
> interpreted as function documentation.
>
> Signed-off-by: John Ogness <[email protected]>

Good to know. I havn't been aware of it.

Reviewed-by: Petr Mladek <[email protected]>

Best Regards,
Petr