mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baokun Li <libaokun@linux.alibaba.com>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Cc: linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>,
	Ritesh Harjani <ritesh.list@gmail.com>,
	Zhang Yi <yi.zhang@huawei.com>,
	linux-kernel@vger.kernel.org, Jan Kara <jack@suse.cz>,
	Ye Bin <yebin10@huawei.com>, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] ext4: Fix sparse warning in extents kunit test when EXT4_KUNIT_TESTS=m
Date: Thu, 24 Sep 2026 14:57:50 +0800	[thread overview]
Message-ID: <0d6aab78-ad58-457b-b880-03edb73a68eb@linux.alibaba.com> (raw)
In-Reply-To: <20260922135808.3371159-1-ojaswin@linux.ibm.com>

Hi Ojaswin,

On 2026/9/22 21:58, Ojaswin Mujoo wrote:
> When kunit tests are compiled as modules, the extents kunit test emits
> a sparse warning:

This is not module-specific, it also shows up with
EXT4_KUNIT_TESTS=y, so maybe the "=m" can be dropped.

>>> fs/ext4/extents-test.c:59:3: sparse: sparse: symbol 'k_ctx' was not
>    declared. Should it be static?
>
> Fix this by declaring it as static.
>
> Fixes: cb1e0c1d1fad ("ext4: kunit tests for extent splitting and conversion")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202609221900.Pgwrcp41-lkp@intel.com/


Missing Signed-off-by, otherwise looks good to me.

Reviewed-by: Baokun Li <libaokun@linux.alibaba.com>


> ---
>  fs/ext4/extents-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/extents-test.c b/fs/ext4/extents-test.c
> index bd7795a82607..9669b2197fca 100644
> --- a/fs/ext4/extents-test.c
> +++ b/fs/ext4/extents-test.c
> @@ -48,7 +48,7 @@
>  #define EXT_DATA_LBLK 10
>  #define EXT_DATA_LEN 3
>  
> -struct kunit_ctx {
> +static struct kunit_ctx {
>  	/*
>  	 * Ext4 inode which has only 1 unwrit extent
>  	 */



  parent reply	other threads:[~2026-09-24  6:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 13:58 Ojaswin Mujoo
2026-09-23 11:38 ` Jan Kara
2026-09-23 12:54 ` Zhang Yi
2026-09-24  6:57 ` Baokun Li [this message]
2026-09-24  7:34   ` Ojaswin Mujoo

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=0d6aab78-ad58-457b-b880-03edb73a68eb@linux.alibaba.com \
    --to=libaokun@linux.alibaba.com \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.com \
    --cc=tytso@mit.edu \
    --cc=yebin10@huawei.com \
    --cc=yi.zhang@huawei.com \
    /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

all inboxes | Powered by JetHome®