public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] initramfs_test: mark testcases as __refdata
Date: Thu, 6 Mar 2025 09:09:06 +1100	[thread overview]
Message-ID: <20250306090906.06efe934.ddiss@suse.de> (raw)
In-Reply-To: <20250305172707.3418080-1-arnd@kernel.org>

Hi Arnd, 

Thanks for the patch. A fix for this was already submitted via:
https://lore.kernel.org/linux-fsdevel/20250305130955.24658-2-ddiss@suse.de/T/#u

On Wed,  5 Mar 2025 18:27:01 +0100, Arnd Bergmann wrote:

> From: Arnd Bergmann <arnd@arndb.de>
> 
> The testcase calls an __init function, so it must have a corresponding
> annotation:
> 
> WARNING: modpost: vmlinux: section mismatch in reference: initramfs_test_cases+0x0 (section: .data) -> initramfs_test_extract (section: .init.text)
> 
> As with other kunit tests, using __refdata suppresses the warning without
> annotating the structure itself as __initdata.
> 
> Fixes: b6736cfccb58 ("initramfs_test: kunit tests for initramfs unpacking")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  init/initramfs_test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/init/initramfs_test.c b/init/initramfs_test.c
> index 6231fe012583..3539891ae081 100644
> --- a/init/initramfs_test.c
> +++ b/init/initramfs_test.c
> @@ -387,7 +387,7 @@ static void __init initramfs_test_many(struct kunit *test)
>   * The kunit_case/_suite struct cannot be marked as __initdata as this will be
>   * used in debugfs to retrieve results after test has run.
>   */
> -static struct kunit_case initramfs_test_cases[] = {
> +static struct kunit_case initramfs_test_cases[] __refdata = {
>  	KUNIT_CASE(initramfs_test_extract),
>  	KUNIT_CASE(initramfs_test_fname_overrun),
>  	KUNIT_CASE(initramfs_test_data),


      reply	other threads:[~2025-03-05 22:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 17:27 [PATCH] initramfs_test: mark testcases as __refdata Arnd Bergmann
2025-03-05 22:09 ` David Disseldorp [this message]

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=20250306090906.06efe934.ddiss@suse.de \
    --to=ddiss@suse.de \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.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