linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kasan: use correct kernel-doc format
@ 2025-01-11  6:32 Randy Dunlap
  2025-01-11 13:18 ` Andrey Konovalov
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2025-01-11  6:32 UTC (permalink / raw)
  To: linux-mm
  Cc: Randy Dunlap, Andrey Ryabinin, Alexander Potapenko,
	Andrey Konovalov, Dmitry Vyukov, Vincenzo Frascino,
	Andrew Morton, kasan-dev

Use the correct kernel-doc character following function parameters
or struct members (':' instead of '-') to eliminate kernel-doc
warnings.

kasan.h:509: warning: Function parameter or struct member 'addr' not described in 'kasan_poison'
kasan.h:509: warning: Function parameter or struct member 'size' not described in 'kasan_poison'
kasan.h:509: warning: Function parameter or struct member 'value' not described in 'kasan_poison'
kasan.h:509: warning: Function parameter or struct member 'init' not described in 'kasan_poison'
kasan.h:522: warning: Function parameter or struct member 'addr' not described in 'kasan_unpoison'
kasan.h:522: warning: Function parameter or struct member 'size' not described in 'kasan_unpoison'
kasan.h:522: warning: Function parameter or struct member 'init' not described in 'kasan_unpoison'
kasan.h:539: warning: Function parameter or struct member 'address' not described in 'kasan_poison_last_granule'
kasan.h:539: warning: Function parameter or struct member 'size' not described in 'kasan_poison_last_granule'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: kasan-dev@googlegroups.com
---
 mm/kasan/kasan.h |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

--- linux-next-20250108.orig/mm/kasan/kasan.h
+++ linux-next-20250108/mm/kasan/kasan.h
@@ -501,18 +501,18 @@ static inline bool kasan_byte_accessible
 
 /**
  * kasan_poison - mark the memory range as inaccessible
- * @addr - range start address, must be aligned to KASAN_GRANULE_SIZE
- * @size - range size, must be aligned to KASAN_GRANULE_SIZE
- * @value - value that's written to metadata for the range
- * @init - whether to initialize the memory range (only for hardware tag-based)
+ * @addr: range start address, must be aligned to KASAN_GRANULE_SIZE
+ * @size: range size, must be aligned to KASAN_GRANULE_SIZE
+ * @value: value that's written to metadata for the range
+ * @init: whether to initialize the memory range (only for hardware tag-based)
  */
 void kasan_poison(const void *addr, size_t size, u8 value, bool init);
 
 /**
  * kasan_unpoison - mark the memory range as accessible
- * @addr - range start address, must be aligned to KASAN_GRANULE_SIZE
- * @size - range size, can be unaligned
- * @init - whether to initialize the memory range (only for hardware tag-based)
+ * @addr: range start address, must be aligned to KASAN_GRANULE_SIZE
+ * @size: range size, can be unaligned
+ * @init: whether to initialize the memory range (only for hardware tag-based)
  *
  * For the tag-based modes, the @size gets aligned to KASAN_GRANULE_SIZE before
  * marking the range.
@@ -530,8 +530,8 @@ bool kasan_byte_accessible(const void *a
 /**
  * kasan_poison_last_granule - mark the last granule of the memory range as
  * inaccessible
- * @addr - range start address, must be aligned to KASAN_GRANULE_SIZE
- * @size - range size
+ * @address: range start address, must be aligned to KASAN_GRANULE_SIZE
+ * @size: range size
  *
  * This function is only available for the generic mode, as it's the only mode
  * that has partially poisoned memory granules.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] kasan: use correct kernel-doc format
  2025-01-11  6:32 [PATCH] kasan: use correct kernel-doc format Randy Dunlap
@ 2025-01-11 13:18 ` Andrey Konovalov
  0 siblings, 0 replies; 2+ messages in thread
From: Andrey Konovalov @ 2025-01-11 13:18 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-mm, Andrey Ryabinin, Alexander Potapenko, Dmitry Vyukov,
	Vincenzo Frascino, Andrew Morton, kasan-dev

On Sat, Jan 11, 2025 at 7:32 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Use the correct kernel-doc character following function parameters
> or struct members (':' instead of '-') to eliminate kernel-doc
> warnings.
>
> kasan.h:509: warning: Function parameter or struct member 'addr' not described in 'kasan_poison'
> kasan.h:509: warning: Function parameter or struct member 'size' not described in 'kasan_poison'
> kasan.h:509: warning: Function parameter or struct member 'value' not described in 'kasan_poison'
> kasan.h:509: warning: Function parameter or struct member 'init' not described in 'kasan_poison'
> kasan.h:522: warning: Function parameter or struct member 'addr' not described in 'kasan_unpoison'
> kasan.h:522: warning: Function parameter or struct member 'size' not described in 'kasan_unpoison'
> kasan.h:522: warning: Function parameter or struct member 'init' not described in 'kasan_unpoison'
> kasan.h:539: warning: Function parameter or struct member 'address' not described in 'kasan_poison_last_granule'
> kasan.h:539: warning: Function parameter or struct member 'size' not described in 'kasan_poison_last_granule'
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
> Cc: Alexander Potapenko <glider@google.com>
> Cc: Andrey Konovalov <andreyknvl@gmail.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: kasan-dev@googlegroups.com
> ---
>  mm/kasan/kasan.h |   18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> --- linux-next-20250108.orig/mm/kasan/kasan.h
> +++ linux-next-20250108/mm/kasan/kasan.h
> @@ -501,18 +501,18 @@ static inline bool kasan_byte_accessible
>
>  /**
>   * kasan_poison - mark the memory range as inaccessible
> - * @addr - range start address, must be aligned to KASAN_GRANULE_SIZE
> - * @size - range size, must be aligned to KASAN_GRANULE_SIZE
> - * @value - value that's written to metadata for the range
> - * @init - whether to initialize the memory range (only for hardware tag-based)
> + * @addr: range start address, must be aligned to KASAN_GRANULE_SIZE
> + * @size: range size, must be aligned to KASAN_GRANULE_SIZE
> + * @value: value that's written to metadata for the range
> + * @init: whether to initialize the memory range (only for hardware tag-based)
>   */
>  void kasan_poison(const void *addr, size_t size, u8 value, bool init);
>
>  /**
>   * kasan_unpoison - mark the memory range as accessible
> - * @addr - range start address, must be aligned to KASAN_GRANULE_SIZE
> - * @size - range size, can be unaligned
> - * @init - whether to initialize the memory range (only for hardware tag-based)
> + * @addr: range start address, must be aligned to KASAN_GRANULE_SIZE
> + * @size: range size, can be unaligned
> + * @init: whether to initialize the memory range (only for hardware tag-based)
>   *
>   * For the tag-based modes, the @size gets aligned to KASAN_GRANULE_SIZE before
>   * marking the range.
> @@ -530,8 +530,8 @@ bool kasan_byte_accessible(const void *a
>  /**
>   * kasan_poison_last_granule - mark the last granule of the memory range as
>   * inaccessible
> - * @addr - range start address, must be aligned to KASAN_GRANULE_SIZE
> - * @size - range size
> + * @address: range start address, must be aligned to KASAN_GRANULE_SIZE
> + * @size: range size
>   *
>   * This function is only available for the generic mode, as it's the only mode
>   * that has partially poisoned memory granules.

Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>

Thank you!


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-11 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-11  6:32 [PATCH] kasan: use correct kernel-doc format Randy Dunlap
2025-01-11 13:18 ` Andrey Konovalov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox