mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Hellwig <hch@lst.de>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Steven Price <steven.price@arm.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Guan Xuetao <gxt@pku.edu.cn>,
	Russell King <linux@armlinux.org.uk>,
	Will Deacon <will.deacon@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] initramfs: fix another section mismatch
Date: Thu, 30 Apr 2020 11:58:33 +0300	[thread overview]
Message-ID: <20200430085833.GB342687@linux.ibm.com> (raw)
In-Reply-To: <20200429190135.66411-1-arnd@arndb.de>

On Wed, Apr 29, 2020 at 09:01:29PM +0200, Arnd Bergmann wrote:
> Building with gcc-10 causes a harmless warning, similar to the
> gcc-4.6 warning that Geert fixed last year:
> 
> WARNING: modpost: vmlinux.o(.text.unlikely+0xe69): Section mismatch in reference from the function kexec_free_initrd() to the function .init.text:free_initrd_mem()
> The function kexec_free_initrd() references
> the function __init free_initrd_mem().
> This is often because kexec_free_initrd lacks a __init
> annotation or the annotation of free_initrd_mem is wrong.
> 
> Add the missing __init annotations.
> 
> Fixes: 4ada1e810038 ("initramfs: fix populate_initrd_image() section mismatch")
> Fixes: 23091e287355 ("initramfs: cleanup initrd freeing")
>  Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Mike Rapoport <rppt@linux.ibm.com>

> ---
>  init/initramfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/init/initramfs.c b/init/initramfs.c
> index 8ec1be4d7d51..bda77a6c8e50 100644
> --- a/init/initramfs.c
> +++ b/init/initramfs.c
> @@ -542,7 +542,7 @@ void __weak free_initrd_mem(unsigned long start, unsigned long end)
>  }
>  
>  #ifdef CONFIG_KEXEC_CORE
> -static bool kexec_free_initrd(void)
> +static bool __init kexec_free_initrd(void)
>  {
>  	unsigned long crashk_start = (unsigned long)__va(crashk_res.start);
>  	unsigned long crashk_end   = (unsigned long)__va(crashk_res.end);
> @@ -565,7 +565,7 @@ static bool kexec_free_initrd(void)
>  	return true;
>  }
>  #else
> -static inline bool kexec_free_initrd(void)
> +static inline bool __init kexec_free_initrd(void)
>  {
>  	return false;
>  }
> -- 
> 2.26.0
> 

-- 
Sincerely yours,
Mike.

      reply	other threads:[~2020-04-30  8:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 19:01 Arnd Bergmann
2020-04-30  8:58 ` Mike Rapoport [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=20200430085833.GB342687@linux.ibm.com \
    --to=rppt@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=geert@linux-m68k.org \
    --cc=gxt@pku.edu.cn \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=steven.price@arm.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will.deacon@arm.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

Powered by JetHome