All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kunit: fix kernel-doc warnings in doc. build
@ 2021-10-05  5:30 Randy Dunlap
  2021-10-05 16:21 ` Daniel Latypov
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2021-10-05  5:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Brendan Higgins, linux-kselftest, kunit-dev,
	Daniel Latypov, Shuah Khan

Fix documentation build warnings in <kunit/test.h>:

../include/kunit/test.h:616: warning: Function parameter or member 'flags' not described in 'kunit_kmalloc_array'
../include/kunit/test.h:616: warning: Excess function parameter 'gfp' description in 'kunit_kmalloc_array'
../include/kunit/test.h:661: warning: Function parameter or member 'flags' not described in 'kunit_kcalloc'
../include/kunit/test.h:661: warning: Excess function parameter 'gfp' description in 'kunit_kcalloc'

Fixes: 0a756853586c ("kunit: test: add test resource management API")
Fixes: 7122debb4367 ("kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: linux-kselftest@vger.kernel.org
Cc: kunit-dev@googlegroups.com
Cc: Daniel Latypov <dlatypov@google.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
---
 include/kunit/test.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- lnx-515-rc4.orig/include/kunit/test.h
+++ lnx-515-rc4/include/kunit/test.h
@@ -607,7 +607,7 @@ void kunit_remove_resource(struct kunit
  * @test: The test context object.
  * @n: number of elements.
  * @size: The size in bytes of the desired memory.
- * @gfp: flags passed to underlying kmalloc().
+ * @flags: gfp flags passed to underlying kmalloc().
  *
  * Just like `kmalloc_array(...)`, except the allocation is managed by the test case
  * and is automatically cleaned up after the test case concludes. See &struct
@@ -653,7 +653,7 @@ static inline void *kunit_kzalloc(struct
  * @test: The test context object.
  * @n: number of elements.
  * @size: The size in bytes of the desired memory.
- * @gfp: flags passed to underlying kmalloc().
+ * @flags: gfp flags passed to underlying kmalloc().
  *
  * See kcalloc() and kunit_kmalloc_array() for more information.
  */

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

* Re: [PATCH] kunit: fix kernel-doc warnings in doc. build
  2021-10-05  5:30 [PATCH] kunit: fix kernel-doc warnings in doc. build Randy Dunlap
@ 2021-10-05 16:21 ` Daniel Latypov
  2021-10-05 18:54   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Latypov @ 2021-10-05 16:21 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Brendan Higgins, linux-kselftest, kunit-dev, Shuah Khan

On Mon, Oct 4, 2021 at 10:30 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Fix documentation build warnings in <kunit/test.h>:
>
> ../include/kunit/test.h:616: warning: Function parameter or member 'flags' not described in 'kunit_kmalloc_array'
> ../include/kunit/test.h:616: warning: Excess function parameter 'gfp' description in 'kunit_kmalloc_array'
> ../include/kunit/test.h:661: warning: Function parameter or member 'flags' not described in 'kunit_kcalloc'
> ../include/kunit/test.h:661: warning: Excess function parameter 'gfp' description in 'kunit_kcalloc'
>
> Fixes: 0a756853586c ("kunit: test: add test resource management API")
> Fixes: 7122debb4367 ("kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Brendan Higgins <brendanhiggins@google.com>
> Cc: linux-kselftest@vger.kernel.org
> Cc: kunit-dev@googlegroups.com
> Cc: Daniel Latypov <dlatypov@google.com>
> Cc: Shuah Khan <skhan@linuxfoundation.org>
> ---
>  include/kunit/test.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- lnx-515-rc4.orig/include/kunit/test.h
> +++ lnx-515-rc4/include/kunit/test.h
> @@ -607,7 +607,7 @@ void kunit_remove_resource(struct kunit
>   * @test: The test context object.
>   * @n: number of elements.
>   * @size: The size in bytes of the desired memory.
> - * @gfp: flags passed to underlying kmalloc().
> + * @flags: gfp flags passed to underlying kmalloc().

Thanks for catching this.
But can we instead rename the parameters?
I can send out a patch for that if you'd prefer.

The other funcs here use `gfp_t gfp`, which is why this copy-pasted
comment does too.
In test.c, kmalloc_array() actually calls the parameter `gfp` as well.

>   *
>   * Just like `kmalloc_array(...)`, except the allocation is managed by the test case
>   * and is automatically cleaned up after the test case concludes. See &struct
> @@ -653,7 +653,7 @@ static inline void *kunit_kzalloc(struct
>   * @test: The test context object.
>   * @n: number of elements.
>   * @size: The size in bytes of the desired memory.
> - * @gfp: flags passed to underlying kmalloc().
> + * @flags: gfp flags passed to underlying kmalloc().
>   *
>   * See kcalloc() and kunit_kmalloc_array() for more information.
>   */

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

* Re: [PATCH] kunit: fix kernel-doc warnings in doc. build
  2021-10-05 16:21 ` Daniel Latypov
@ 2021-10-05 18:54   ` Randy Dunlap
  2021-10-05 20:48     ` Daniel Latypov
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2021-10-05 18:54 UTC (permalink / raw)
  To: Daniel Latypov
  Cc: linux-kernel, Brendan Higgins, linux-kselftest, kunit-dev, Shuah Khan

On 10/5/21 9:21 AM, Daniel Latypov wrote:
> On Mon, Oct 4, 2021 at 10:30 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> Fix documentation build warnings in <kunit/test.h>:
>>
>> ../include/kunit/test.h:616: warning: Function parameter or member 'flags' not described in 'kunit_kmalloc_array'
>> ../include/kunit/test.h:616: warning: Excess function parameter 'gfp' description in 'kunit_kmalloc_array'
>> ../include/kunit/test.h:661: warning: Function parameter or member 'flags' not described in 'kunit_kcalloc'
>> ../include/kunit/test.h:661: warning: Excess function parameter 'gfp' description in 'kunit_kcalloc'
>>
>> Fixes: 0a756853586c ("kunit: test: add test resource management API")
>> Fixes: 7122debb4367 ("kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers")
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Brendan Higgins <brendanhiggins@google.com>
>> Cc: linux-kselftest@vger.kernel.org
>> Cc: kunit-dev@googlegroups.com
>> Cc: Daniel Latypov <dlatypov@google.com>
>> Cc: Shuah Khan <skhan@linuxfoundation.org>
>> ---
>>   include/kunit/test.h |    4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> --- lnx-515-rc4.orig/include/kunit/test.h
>> +++ lnx-515-rc4/include/kunit/test.h
>> @@ -607,7 +607,7 @@ void kunit_remove_resource(struct kunit
>>    * @test: The test context object.
>>    * @n: number of elements.
>>    * @size: The size in bytes of the desired memory.
>> - * @gfp: flags passed to underlying kmalloc().
>> + * @flags: gfp flags passed to underlying kmalloc().
> 
> Thanks for catching this.
> But can we instead rename the parameters?
> I can send out a patch for that if you'd prefer.
> 
> The other funcs here use `gfp_t gfp`, which is why this copy-pasted
> comment does too.
> In test.c, kmalloc_array() actually calls the parameter `gfp` as well.
> 

Sure, go ahead with it, please.

-- 
~Randy

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

* Re: [PATCH] kunit: fix kernel-doc warnings in doc. build
  2021-10-05 18:54   ` Randy Dunlap
@ 2021-10-05 20:48     ` Daniel Latypov
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Latypov @ 2021-10-05 20:48 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, Brendan Higgins, linux-kselftest, kunit-dev, Shuah Khan

On Tue, Oct 5, 2021 at 11:54 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 10/5/21 9:21 AM, Daniel Latypov wrote:
> > On Mon, Oct 4, 2021 at 10:30 PM Randy Dunlap <rdunlap@infradead.org> wrote:
> >>
> >> Fix documentation build warnings in <kunit/test.h>:
> >>
> >> ../include/kunit/test.h:616: warning: Function parameter or member 'flags' not described in 'kunit_kmalloc_array'
> >> ../include/kunit/test.h:616: warning: Excess function parameter 'gfp' description in 'kunit_kmalloc_array'
> >> ../include/kunit/test.h:661: warning: Function parameter or member 'flags' not described in 'kunit_kcalloc'
> >> ../include/kunit/test.h:661: warning: Excess function parameter 'gfp' description in 'kunit_kcalloc'
> >>
> >> Fixes: 0a756853586c ("kunit: test: add test resource management API")
> >> Fixes: 7122debb4367 ("kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers")
> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >> Cc: Brendan Higgins <brendanhiggins@google.com>
> >> Cc: linux-kselftest@vger.kernel.org
> >> Cc: kunit-dev@googlegroups.com
> >> Cc: Daniel Latypov <dlatypov@google.com>
> >> Cc: Shuah Khan <skhan@linuxfoundation.org>
> >> ---
> >>   include/kunit/test.h |    4 ++--
> >>   1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> --- lnx-515-rc4.orig/include/kunit/test.h
> >> +++ lnx-515-rc4/include/kunit/test.h
> >> @@ -607,7 +607,7 @@ void kunit_remove_resource(struct kunit
> >>    * @test: The test context object.
> >>    * @n: number of elements.
> >>    * @size: The size in bytes of the desired memory.
> >> - * @gfp: flags passed to underlying kmalloc().
> >> + * @flags: gfp flags passed to underlying kmalloc().
> >
> > Thanks for catching this.
> > But can we instead rename the parameters?
> > I can send out a patch for that if you'd prefer.
> >
> > The other funcs here use `gfp_t gfp`, which is why this copy-pasted
> > comment does too.
> > In test.c, kmalloc_array() actually calls the parameter `gfp` as well.
> >
>
> Sure, go ahead with it, please.

https://lore.kernel.org/linux-kselftest/20211005204632.3132652-1-dlatypov@google.com

Ran `make htmldocs` and I don't see any references to kunit in the
stdout or stderr, so I assume we're good now.

>
> --
> ~Randy

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

end of thread, other threads:[~2021-10-05 20:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05  5:30 [PATCH] kunit: fix kernel-doc warnings in doc. build Randy Dunlap
2021-10-05 16:21 ` Daniel Latypov
2021-10-05 18:54   ` Randy Dunlap
2021-10-05 20:48     ` Daniel Latypov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.