diff mbox series

kunit: Fix missing kerneldoc comment

Message ID 20240905024757.3600609-1-davidgow@google.com (mailing list archive)
State Accepted
Commit 521b1b9ed01aff11bd16cce534eb414f57dc8dd2
Delegated to: Brendan Higgins
Headers show
Series kunit: Fix missing kerneldoc comment | expand

Commit Message

David Gow Sept. 5, 2024, 2:47 a.m. UTC
Add a missing kerneldoc comment for the 'test' test context parameter,
fixing the following warning:

include/kunit/test.h:492: warning: Function parameter or struct member 'test' not described in 'kunit_kfree_const'

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/lkml/20240827160631.67e121ed@canb.auug.org.au/
Fixes: f2c6dbd22017 ("kunit: Device wrappers should also manage driver name")
Signed-off-by: David Gow <davidgow@google.com>
---
 include/kunit/test.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Shuah Khan Sept. 5, 2024, 3:31 p.m. UTC | #1
On 9/4/24 20:47, David Gow wrote:
> Add a missing kerneldoc comment for the 'test' test context parameter,
> fixing the following warning:
> 
> include/kunit/test.h:492: warning: Function parameter or struct member 'test' not described in 'kunit_kfree_const'
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/lkml/20240827160631.67e121ed@canb.auug.org.au/
> Fixes: f2c6dbd22017 ("kunit: Device wrappers should also manage driver name")
> Signed-off-by: David Gow <davidgow@google.com>
> ---
>   include/kunit/test.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/include/kunit/test.h b/include/kunit/test.h
> index 5ac237c949a0..34b71e42fb10 100644
> --- a/include/kunit/test.h
> +++ b/include/kunit/test.h
> @@ -484,6 +484,7 @@ static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp
>   
>   /**
>    * kunit_kfree_const() - conditionally free test managed memory
> + * @test: The test context object.
>    * @x: pointer to the memory
>    *
>    * Calls kunit_kfree() only if @x is not in .rodata section.

David,

I sent PR for 6.11-rc7 for the following since it is a critical
fix.

kunit: Device wrappers should also manage driver name

I will take this in once the pr clears applying for 6.12-rc1

thanks,
-- Shuah
Kees Cook Sept. 5, 2024, 4:56 p.m. UTC | #2
On Thu, Sep 05, 2024 at 10:47:55AM +0800, David Gow wrote:
> Add a missing kerneldoc comment for the 'test' test context parameter,
> fixing the following warning:
> 
> include/kunit/test.h:492: warning: Function parameter or struct member 'test' not described in 'kunit_kfree_const'
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/lkml/20240827160631.67e121ed@canb.auug.org.au/
> Fixes: f2c6dbd22017 ("kunit: Device wrappers should also manage driver name")
> Signed-off-by: David Gow <davidgow@google.com>

Reviewed-by: Kees Cook <kees@kernel.org>
diff mbox series

Patch

diff --git a/include/kunit/test.h b/include/kunit/test.h
index 5ac237c949a0..34b71e42fb10 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -484,6 +484,7 @@  static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp
 
 /**
  * kunit_kfree_const() - conditionally free test managed memory
+ * @test: The test context object.
  * @x: pointer to the memory
  *
  * Calls kunit_kfree() only if @x is not in .rodata section.