0026-no_extern_inline.patch 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. From b11c5d1dc29e81326d1215011d19377737082aeb Mon Sep 17 00:00:00 2001
  2. From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
  3. Date: Wed, 1 Jul 2015 16:36:43 +0200
  4. Subject: [PATCH] MIPS: change 'extern inline' to 'static inline'
  5. The kernel changed it a long time ago. Also this is now broken
  6. on gcc-5.x.
  7. Reported-by: Andy Kennedy <andy.kennedy@adtran.com>
  8. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
  9. ---
  10. arch/mips/include/asm/io.h | 12 ++++++------
  11. arch/mips/include/asm/system.h | 6 +++---
  12. 2 files changed, 9 insertions(+), 9 deletions(-)
  13. --- a/arch/mips/include/asm/io.h
  14. +++ b/arch/mips/include/asm/io.h
  15. @@ -118,7 +118,7 @@ static inline void set_io_port_base(unsi
  16. * Change virtual addresses to physical addresses and vv.
  17. * These are trivial on the 1:1 Linux/MIPS mapping
  18. */
  19. -extern inline phys_addr_t virt_to_phys(volatile void * address)
  20. +static inline phys_addr_t virt_to_phys(volatile void * address)
  21. {
  22. #ifndef CONFIG_64BIT
  23. return CPHYSADDR(address);
  24. @@ -127,7 +127,7 @@ extern inline phys_addr_t virt_to_phys(v
  25. #endif
  26. }
  27. -extern inline void * phys_to_virt(unsigned long address)
  28. +static inline void * phys_to_virt(unsigned long address)
  29. {
  30. #ifndef CONFIG_64BIT
  31. return (void *)KSEG0ADDR(address);
  32. @@ -139,7 +139,7 @@ extern inline void * phys_to_virt(unsign
  33. /*
  34. * IO bus memory addresses are also 1:1 with the physical address
  35. */
  36. -extern inline unsigned long virt_to_bus(volatile void * address)
  37. +static inline unsigned long virt_to_bus(volatile void * address)
  38. {
  39. #ifndef CONFIG_64BIT
  40. return CPHYSADDR(address);
  41. @@ -148,7 +148,7 @@ extern inline unsigned long virt_to_bus(
  42. #endif
  43. }
  44. -extern inline void * bus_to_virt(unsigned long address)
  45. +static inline void * bus_to_virt(unsigned long address)
  46. {
  47. #ifndef CONFIG_64BIT
  48. return (void *)KSEG0ADDR(address);
  49. @@ -166,12 +166,12 @@ extern unsigned long isa_slot_offset;
  50. extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
  51. #if 0
  52. -extern inline void *ioremap(unsigned long offset, unsigned long size)
  53. +static inline void *ioremap(unsigned long offset, unsigned long size)
  54. {
  55. return __ioremap(offset, size, _CACHE_UNCACHED);
  56. }
  57. -extern inline void *ioremap_nocache(unsigned long offset, unsigned long size)
  58. +static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
  59. {
  60. return __ioremap(offset, size, _CACHE_UNCACHED);
  61. }
  62. --- a/arch/mips/include/asm/system.h
  63. +++ b/arch/mips/include/asm/system.h
  64. @@ -23,7 +23,7 @@
  65. #include <linux/kernel.h>
  66. #endif
  67. -extern __inline__ void
  68. +static __inline__ void
  69. __sti(void)
  70. {
  71. __asm__ __volatile__(
  72. @@ -47,7 +47,7 @@ __sti(void)
  73. * R4000/R4400 need three nops, the R4600 two nops and the R10000 needs
  74. * no nops at all.
  75. */
  76. -extern __inline__ void
  77. +static __inline__ void
  78. __cli(void)
  79. {
  80. __asm__ __volatile__(
  81. @@ -208,7 +208,7 @@ do { \
  82. * For 32 and 64 bit operands we can take advantage of ll and sc.
  83. * FIXME: This doesn't work for R3000 machines.
  84. */
  85. -extern __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val)
  86. +static __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val)
  87. {
  88. #ifdef CONFIG_CPU_HAS_LLSC
  89. unsigned long dummy;