All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Daniel Latypov <dlatypov@google.com>,
	brendanhiggins@google.com, davidgow@google.com
Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com,
	linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org
Subject: Re: [PATCH] kunit: fix kernel-doc warnings due to mismatched arg names
Date: Tue, 5 Oct 2021 13:58:38 -0700	[thread overview]
Message-ID: <e20d43eb-c72e-c297-65a8-76e52437b83c@infradead.org> (raw)
In-Reply-To: <20211005204632.3132652-1-dlatypov@google.com>

On 10/5/21 1:46 PM, Daniel Latypov wrote:
> Commit 7122debb4367 ("kunit: introduce
> kunit_kmalloc_array/kunit_kcalloc() helpers") added new functions but
> called last arg `flags`, unlike the existing code that used `gfp`.
> This only is an issue in test.h, test.c still used `gfp`.
> 
> But the documentation was copy-pasted with the old names, leading to
> kernel-doc warnings.
> 
> Do s/flags/gfp to make the names consistent and fix the warnings.
> 
> Fixes: 7122debb4367 ("kunit: introduce kunit_kmalloc_array/kunit_kcalloc() helpers")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Daniel Latypov <dlatypov@google.com>

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>   include/kunit/test.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/kunit/test.h b/include/kunit/test.h
> index 24b40e5c160b..018e776a34b9 100644
> --- a/include/kunit/test.h
> +++ b/include/kunit/test.h
> @@ -613,7 +613,7 @@ void kunit_remove_resource(struct kunit *test, struct kunit_resource *res);
>    * and is automatically cleaned up after the test case concludes. See &struct
>    * kunit_resource for more information.
>    */
> -void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t flags);
> +void *kunit_kmalloc_array(struct kunit *test, size_t n, size_t size, gfp_t gfp);
>   
>   /**
>    * kunit_kmalloc() - Like kmalloc() except the allocation is *test managed*.
> @@ -657,9 +657,9 @@ static inline void *kunit_kzalloc(struct kunit *test, size_t size, gfp_t gfp)
>    *
>    * See kcalloc() and kunit_kmalloc_array() for more information.
>    */
> -static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp_t flags)
> +static inline void *kunit_kcalloc(struct kunit *test, size_t n, size_t size, gfp_t gfp)
>   {
> -	return kunit_kmalloc_array(test, n, size, flags | __GFP_ZERO);
> +	return kunit_kmalloc_array(test, n, size, gfp | __GFP_ZERO);
>   }
>   
>   void kunit_cleanup(struct kunit *test);
> 
> base-commit: 3b29021ddd10cfb6b2565c623595bd3b02036f33
> 


-- 
~Randy

  reply	other threads:[~2021-10-05 20:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 20:46 [PATCH] kunit: fix kernel-doc warnings due to mismatched arg names Daniel Latypov
2021-10-05 20:58 ` Randy Dunlap [this message]
2021-10-06 17:51 ` Brendan Higgins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e20d43eb-c72e-c297-65a8-76e52437b83c@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.