summaryrefslogtreecommitdiff
path: root/kernel/kexec_elf.c
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2019-08-23 21:49:14 +0200
committerHelge Deller <deller@gmx.de>2019-09-06 23:58:43 +0200
commitd34e0ad3eaf45c612cc7b5baa0f6b2f2a6d75612 (patch)
tree2243ffb016f745b0347b295f8f0f72b7eb6f5eb6 /kernel/kexec_elf.c
parent175fca3bf91a1111b7e46f6655666640556b9059 (diff)
kexec_elf: change order of elf_*_to_cpu() functions
Change the order to have a 64/32/16 order, no functional change. Signed-off-by: Sven Schnelle <svens@stackframe.org> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'kernel/kexec_elf.c')
-rw-r--r--kernel/kexec_elf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c
index 26c6310167a0..34376fbc55be 100644
--- a/kernel/kexec_elf.c
+++ b/kernel/kexec_elf.c
@@ -44,22 +44,22 @@ static uint64_t elf64_to_cpu(const struct elfhdr *ehdr, uint64_t value)
return value;
}
-static uint16_t elf16_to_cpu(const struct elfhdr *ehdr, uint16_t value)
+static uint32_t elf32_to_cpu(const struct elfhdr *ehdr, uint32_t value)
{
if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
- value = le16_to_cpu(value);
+ value = le32_to_cpu(value);
else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
- value = be16_to_cpu(value);
+ value = be32_to_cpu(value);
return value;
}
-static uint32_t elf32_to_cpu(const struct elfhdr *ehdr, uint32_t value)
+static uint16_t elf16_to_cpu(const struct elfhdr *ehdr, uint16_t value)
{
if (ehdr->e_ident[EI_DATA] == ELFDATA2LSB)
- value = le32_to_cpu(value);
+ value = le16_to_cpu(value);
else if (ehdr->e_ident[EI_DATA] == ELFDATA2MSB)
- value = be32_to_cpu(value);
+ value = be16_to_cpu(value);
return value;
}