Skip to content

Commit f973cce

Browse files
committed
kexec: Fix pointer-to-int-cast warnings
Fix two pointer-to-int-cast warnings when compiling for the 32-bit parisc platform: kernel/kexec_file.c: In function ‘crash_prepare_elf64_headers’: kernel/kexec_file.c:1307:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] phdr->p_vaddr = (Elf64_Addr)_text; ^ kernel/kexec_file.c:1324:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] phdr->p_vaddr = (unsigned long long) __va(mstart); ^ Signed-off-by: Helge Deller <[email protected]>
1 parent 52b2d91 commit f973cce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/kexec_file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ int crash_prepare_elf64_headers(struct crash_mem *mem, int kernel_map,
13041304
if (kernel_map) {
13051305
phdr->p_type = PT_LOAD;
13061306
phdr->p_flags = PF_R|PF_W|PF_X;
1307-
phdr->p_vaddr = (Elf64_Addr)_text;
1307+
phdr->p_vaddr = (unsigned long) _text;
13081308
phdr->p_filesz = phdr->p_memsz = _end - _text;
13091309
phdr->p_offset = phdr->p_paddr = __pa_symbol(_text);
13101310
ehdr->e_phnum++;
@@ -1321,7 +1321,7 @@ int crash_prepare_elf64_headers(struct crash_mem *mem, int kernel_map,
13211321
phdr->p_offset = mstart;
13221322

13231323
phdr->p_paddr = mstart;
1324-
phdr->p_vaddr = (unsigned long long) __va(mstart);
1324+
phdr->p_vaddr = (unsigned long) __va(mstart);
13251325
phdr->p_filesz = phdr->p_memsz = mend - mstart + 1;
13261326
phdr->p_align = 0;
13271327
ehdr->e_phnum++;

0 commit comments

Comments
 (0)