riscv: remove unreachable big endian code
authorChristoph Hellwig <hch@lst.de>
Mon, 15 Apr 2019 09:14:34 +0000 (11:14 +0200)
committerPalmer Dabbelt <palmer@sifive.com>
Thu, 25 Apr 2019 21:51:10 +0000 (14:51 -0700)
RISC-V is always little endian.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/include/asm/elf.h
arch/riscv/include/asm/uaccess.h

index 697fc23b0d5ae4f6d6cd508e8d0a2804c277e0ee..ce0cd7d77eb061a33776c04ac65b2898c2c0ce33 100644 (file)
 #define ELF_CLASS      ELFCLASS32
 #endif
 
-#if defined(__LITTLE_ENDIAN)
 #define ELF_DATA       ELFDATA2LSB
-#elif defined(__BIG_ENDIAN)
-#define ELF_DATA       ELFDATA2MSB
-#else
-#error "Unknown endianness"
-#endif
 
 /*
  * This is used to ensure we don't load something for the wrong architecture.
index c51fc8bfbdde3a60493b2e0c75eca19a840b401d..b26f407be5c8d7a2bb3a353128a6a022b7c82ea8 100644 (file)
@@ -101,15 +101,8 @@ static inline int __access_ok(unsigned long addr, unsigned long size)
  * on our cache or tlb entries.
  */
 
-#if defined(__LITTLE_ENDIAN)
-#define __MSW  1
 #define __LSW  0
-#elif defined(__BIG_ENDIAN)
-#define __MSW  0
-#define        __LSW   1
-#else
-#error "Unknown endianness"
-#endif
+#define __MSW  1
 
 /*
  * The "__xxx" versions of the user access functions do not verify the address