Subject: linux-next: build warnings after merge of the mips tree

From: Stephen Rothwell <[email-masked]>
Date: Wed, 12 Nov 2014 17:26:33 +1100

Hi Ralf,

After merging the mips tree, today's linux-next build (powerpc64
allnoconfig) produced these warnings:

In file included from fs/compat_binfmt_elf.c:145:0:
fs/binfmt_elf.c: In function 'load_elf_binary':
fs/binfmt_elf.c:718:13: warning: passing argument 1 of 'arch_elf_pt_proc' from incompatible pointer type
    retval = arch_elf_pt_proc(&loc->elf_ex, elf_ppnt,
             ^
In file included from include/linux/elfcore-compat.h:4:0,
                 from fs/compat_binfmt_elf.c:20:
include/linux/elf.h:81:19: note: expected 'struct elf64_hdr *' but argument is of type 'struct elf32_hdr *'
 static inline int arch_elf_pt_proc(struct elfhdr *ehdr,
                   ^
In file included from fs/compat_binfmt_elf.c:145:0:
fs/binfmt_elf.c:718:13: warning: passing argument 2 of 'arch_elf_pt_proc' from incompatible pointer type
    retval = arch_elf_pt_proc(&loc->elf_ex, elf_ppnt,
             ^
In file included from include/linux/elfcore-compat.h:4:0,
                 from fs/compat_binfmt_elf.c:20:
include/linux/elf.h:81:19: note: expected 'struct elf64_phdr *' but argument is of type 'struct elf32_phdr *'
 static inline int arch_elf_pt_proc(struct elfhdr *ehdr,
                   ^
In file included from fs/compat_binfmt_elf.c:145:0:
fs/binfmt_elf.c:747:14: warning: passing argument 1 of 'arch_elf_pt_proc' from incompatible pointer type
     retval = arch_elf_pt_proc(&loc->interp_elf_ex,
              ^
In file included from include/linux/elfcore-compat.h:4:0,
                 from fs/compat_binfmt_elf.c:20:
include/linux/elf.h:81:19: note: expected 'struct elf64_hdr *' but argument is of type 'struct elf32_hdr *'
 static inline int arch_elf_pt_proc(struct elfhdr *ehdr,
                   ^
In file included from fs/compat_binfmt_elf.c:145:0:
fs/binfmt_elf.c:747:14: warning: passing argument 2 of 'arch_elf_pt_proc' from incompatible pointer type
     retval = arch_elf_pt_proc(&loc->interp_elf_ex,
              ^
In file included from include/linux/elfcore-compat.h:4:0,
                 from fs/compat_binfmt_elf.c:20:
include/linux/elf.h:81:19: note: expected 'struct elf64_phdr *' but argument is of type 'struct elf32_phdr *'
 static inline int arch_elf_pt_proc(struct elfhdr *ehdr,
                   ^
In file included from fs/compat_binfmt_elf.c:145:0:
fs/binfmt_elf.c:761:11: warning: passing argument 1 of 'arch_check_elf' from incompatible pointer type
  retval = arch_check_elf(&loc->elf_ex, !!interpreter, &arch_state);
           ^
In file included from include/linux/elfcore-compat.h:4:0,
                 from fs/compat_binfmt_elf.c:20:
include/linux/elf.h:104:19: note: expected 'struct elf64_hdr *' but argument is of type 'struct elf32_hdr *'
 static inline int arch_check_elf(struct elfhdr *ehdr, bool has_interp,
                   ^

Probably introduced by commit 7b76fe94c0e4 ("binfmt_elf: allow arch
code to examine PT_LOPROC ... PT_HIPROC headers") and maybe the
preceeding commits as well.

binfmt_elf.c is included by compat_binfmt_elf.c after defining some
things to build the compat versions of things.
-- 
Cheers,
Stephen Rothwell                    [email-masked]