Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Lianbo Jiang <lijiang@redhat.com>
Cc: jgross@suse.com, Thomas.Lendacky@amd.com, bhe@redhat.com,
	horms@verge.net.au, x86@kernel.org, kexec@lists.infradead.org,
	linux-kernel@vger.kernel.org, dhowells@redhat.com,
	mingo@redhat.com, ebiederm@xmission.com, hpa@zytor.com,
	tglx@linutronix.de, dyoung@redhat.com, d.hatayama@fujitsu.com,
	vgoyal@redhat.com
Subject: Re: [PATCH 3/3 v9] kexec: Fix i386 build warnings that missed declaration of struct kimage
Date: Thu, 14 Nov 2019 13:39:20 +0100	[thread overview]
Message-ID: <20191114123920.GA7222@zn.tnic> (raw)
In-Reply-To: <20191108090027.11082-4-lijiang@redhat.com>

On Fri, Nov 08, 2019 at 05:00:27PM +0800, Lianbo Jiang wrote:
> Kbuild test robot reported some build warnings as follow:
> 
> arch/x86/include/asm/crash.h:5:32: warning: 'struct kimage' declared
> inside parameter list will not be visible outside of this definition
> or declaration
>     int crash_load_segments(struct kimage *image);
>                                    ^~~~~~
>     int crash_copy_backup_region(struct kimage *image);
>                                         ^~~~~~
>     int crash_setup_memmap_entries(struct kimage *image,
>                                           ^~~~~~
> The 'struct kimage' is defined in the header file include/linux/kexec.h,
> before using it, need to include its header file or make a declaration.
> Otherwise the above warnings may be triggered.
> 
> Add a declaration of struct kimage to the file arch/x86/include/asm/
> crash.h, that will solve these compile warnings.
> 
> Fixes: dd5f726076cc ("kexec: support for kexec on panic using new system call")

This is, of course, wrong. Your *first* patch is introducing those
warnings and I'm wondering how did you not see them during building?

In file included from arch/x86/realmode/init.c:11:
./arch/x86/include/asm/crash.h:5:32: warning: ‘struct kimage’ declared inside parameter list will not be visible outside of this definition or declaration
    5 | int crash_load_segments(struct kimage *image);
      |                                ^~~~~~
./arch/x86/include/asm/crash.h:6:37: warning: ‘struct kimage’ declared inside parameter list will not be visible outside of this definition or declaration
    6 | int crash_copy_backup_region(struct kimage *image);
      |                                     ^~~~~~
./arch/x86/include/asm/crash.h:7:39: warning: ‘struct kimage’ declared inside parameter list will not be visible outside of this definition or declaration
    7 | int crash_setup_memmap_entries(struct kimage *image,
      |


And that happens because you've included asm/crash.h in
arch/x86/realmode/init.c and it of course complains because it hasn't
seen that struct yet.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2019-11-14 12:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08  9:00 [PATCH 0/3 v9] x86/kdump: Fix 'kmem -s' reported an invalid freepointer when SME was active Lianbo Jiang
2019-11-08  9:00 ` [PATCH 1/3 v9] x86/kdump: always reserve the low 1M when the crashkernel option is specified Lianbo Jiang
2019-11-08  9:00 ` [PATCH 2/3 v9] x86/kdump: clean up all the code related to the backup region Lianbo Jiang
2019-11-08  9:00 ` [PATCH 3/3 v9] kexec: Fix i386 build warnings that missed declaration of struct kimage Lianbo Jiang
2019-11-14 12:39   ` Borislav Petkov [this message]
2019-11-14 14:20     ` lijiang
2019-11-14 14:43       ` Borislav Petkov
2019-11-15  0:18         ` lijiang

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=20191114123920.GA7222@zn.tnic \
    --to=bp@alien8.de \
    --cc=Thomas.Lendacky@amd.com \
    --cc=bhe@redhat.com \
    --cc=d.hatayama@fujitsu.com \
    --cc=dhowells@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=horms@verge.net.au \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=kexec@lists.infradead.org \
    --cc=lijiang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=vgoyal@redhat.com \
    --cc=x86@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