linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Leo Stone <leocstone@gmail.com>
Cc: SeongJae Park <sj@kernel.org>,
	akpm@linux-foundation.org, ruanjinjie@huawei.com,
	damon@lists.linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	linux-kernel-mentees@lists.linuxfoundation.org,
	skhan@linuxfoundation.org
Subject: Re: [PATCH] mm/damon: fix sparse warning for zero initializer
Date: Sun, 22 Sep 2024 08:11:20 -0700	[thread overview]
Message-ID: <20240922151121.469051-1-sj@kernel.org> (raw)
In-Reply-To: <20240921195511.364023-1-leocstone@gmail.com>

Hi Leo,


Thank you for this patch!

On Sat, 21 Sep 2024 12:54:45 -0700 Leo Stone <leocstone@gmail.com> wrote:

> sparse warns about zero initializing an array with {0,}, change it to
> the equivalent {0}.
> 
> Fixes the sparse warning:
> mm/damon/tests/vaddr-kunit.h:69:47: warning: missing braces around initializer
> 
> Signed-off-by: Leo Stone <leocstone@gmail.com>

Reviewed-by: SeongJae Park <sj@kernel.org>

I also think below tag would be good to add?

17ccae8bb5c9 ("mm/damon: add kunit tests")

Thanks,
SJ

> ---
>  mm/damon/tests/vaddr-kunit.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/damon/tests/vaddr-kunit.h b/mm/damon/tests/vaddr-kunit.h
> index a339d117150f..3dad8dfd9005 100644
> --- a/mm/damon/tests/vaddr-kunit.h
> +++ b/mm/damon/tests/vaddr-kunit.h
> @@ -66,7 +66,7 @@ static int __link_vmas(struct maple_tree *mt, struct vm_area_struct *vmas,
>  static void damon_test_three_regions_in_vmas(struct kunit *test)
>  {
>  	static struct mm_struct mm;
> -	struct damon_addr_range regions[3] = {0,};
> +	struct damon_addr_range regions[3] = {0};
>  	/* 10-20-25, 200-210-220, 300-305, 307-330 */
>  	struct vm_area_struct vmas[] = {
>  		(struct vm_area_struct) {.vm_start = 10, .vm_end = 20},
> -- 
> 2.43.0


  reply	other threads:[~2024-09-22 15:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-21 19:54 Leo Stone
2024-09-22 15:11 ` SeongJae Park [this message]
2024-09-23  2:25   ` [PATCH v2] " Leo Stone

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=20240922151121.469051-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=leocstone@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ruanjinjie@huawei.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox