Skip to content

Commit

Permalink
kexec-bzimage64: fix sparse warnings
Browse files Browse the repository at this point in the history
David Howells brought to my attention the mails generated by kbuild test
bot and following sparse warnings were present.  This patch fixes these
warnings.

  arch/x86/kernel/kexec-bzimage64.c:270:5: warning: symbol 'bzImage64_probe' was not declared. Should it be static?
  arch/x86/kernel/kexec-bzimage64.c:328:6: warning: symbol 'bzImage64_load' was not declared. Should it be static?
  arch/x86/kernel/kexec-bzimage64.c:517:5: warning: symbol 'bzImage64_cleanup' was not declared. Should it be static?
  arch/x86/kernel/kexec-bzimage64.c:531:5: warning: symbol 'bzImage64_verify_sig' was not declared. Should it be static?
  arch/x86/kernel/kexec-bzimage64.c:546:23: warning: symbol 'kexec_bzImage64_ops' was not declared. Should it be static?

Signed-off-by: Vivek Goyal <[email protected]>
Reported-by: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rhvgoyal authored and torvalds committed Oct 14, 2014
1 parent 36f3f50 commit f8da964
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions arch/x86/kernel/kexec-bzimage64.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <asm/setup.h>
#include <asm/crash.h>
#include <asm/efi.h>
#include <asm/kexec-bzimage64.h>

#define MAX_ELFCOREHDR_STR_LEN 30 /* elfcorehdr=0x<64bit-value> */

Expand Down Expand Up @@ -267,7 +268,7 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params,
return ret;
}

int bzImage64_probe(const char *buf, unsigned long len)
static int bzImage64_probe(const char *buf, unsigned long len)
{
int ret = -ENOEXEC;
struct setup_header *header;
Expand Down Expand Up @@ -325,10 +326,10 @@ int bzImage64_probe(const char *buf, unsigned long len)
return ret;
}

void *bzImage64_load(struct kimage *image, char *kernel,
unsigned long kernel_len, char *initrd,
unsigned long initrd_len, char *cmdline,
unsigned long cmdline_len)
static void *bzImage64_load(struct kimage *image, char *kernel,
unsigned long kernel_len, char *initrd,
unsigned long initrd_len, char *cmdline,
unsigned long cmdline_len)
{

struct setup_header *header;
Expand Down Expand Up @@ -514,7 +515,7 @@ void *bzImage64_load(struct kimage *image, char *kernel,
}

/* This cleanup function is called after various segments have been loaded */
int bzImage64_cleanup(void *loader_data)
static int bzImage64_cleanup(void *loader_data)
{
struct bzimage64_data *ldata = loader_data;

Expand All @@ -528,7 +529,7 @@ int bzImage64_cleanup(void *loader_data)
}

#ifdef CONFIG_KEXEC_BZIMAGE_VERIFY_SIG
int bzImage64_verify_sig(const char *kernel, unsigned long kernel_len)
static int bzImage64_verify_sig(const char *kernel, unsigned long kernel_len)
{
bool trusted;
int ret;
Expand Down

0 comments on commit f8da964

Please sign in to comment.