0045-no_extern_inline.patch 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h
  14. index 3fa37f5..a7ab087 100644
  15. --- a/arch/mips/include/asm/io.h
  16. +++ b/arch/mips/include/asm/io.h
  17. @@ -117,7 +117,7 @@ static inline void set_io_port_base(unsigned long base)
  18. * Change virtual addresses to physical addresses and vv.
  19. * These are trivial on the 1:1 Linux/MIPS mapping
  20. */
  21. -extern inline phys_addr_t virt_to_phys(volatile void * address)
  22. +static inline phys_addr_t virt_to_phys(volatile void * address)
  23. {
  24. #ifndef CONFIG_64BIT
  25. return CPHYSADDR(address);
  26. @@ -126,7 +126,7 @@ extern inline phys_addr_t virt_to_phys(volatile void * address)
  27. #endif
  28. }
  29. -extern inline void * phys_to_virt(unsigned long address)
  30. +static inline void * phys_to_virt(unsigned long address)
  31. {
  32. #ifndef CONFIG_64BIT
  33. return (void *)KSEG0ADDR(address);
  34. @@ -138,7 +138,7 @@ extern inline void * phys_to_virt(unsigned long address)
  35. /*
  36. * IO bus memory addresses are also 1:1 with the physical address
  37. */
  38. -extern inline unsigned long virt_to_bus(volatile void * address)
  39. +static inline unsigned long virt_to_bus(volatile void * address)
  40. {
  41. #ifndef CONFIG_64BIT
  42. return CPHYSADDR(address);
  43. @@ -147,7 +147,7 @@ extern inline unsigned long virt_to_bus(volatile void * address)
  44. #endif
  45. }
  46. -extern inline void * bus_to_virt(unsigned long address)
  47. +static inline void * bus_to_virt(unsigned long address)
  48. {
  49. #ifndef CONFIG_64BIT
  50. return (void *)KSEG0ADDR(address);
  51. @@ -165,12 +165,12 @@ extern unsigned long isa_slot_offset;
  52. extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
  53. #if 0
  54. -extern inline void *ioremap(unsigned long offset, unsigned long size)
  55. +static inline void *ioremap(unsigned long offset, unsigned long size)
  56. {
  57. return __ioremap(offset, size, _CACHE_UNCACHED);
  58. }
  59. -extern inline void *ioremap_nocache(unsigned long offset, unsigned long size)
  60. +static inline void *ioremap_nocache(unsigned long offset, unsigned long size)
  61. {
  62. return __ioremap(offset, size, _CACHE_UNCACHED);
  63. }
  64. diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h
  65. index 7a28952..d56f73b 100644
  66. --- a/arch/mips/include/asm/system.h
  67. +++ b/arch/mips/include/asm/system.h
  68. @@ -22,7 +22,7 @@
  69. #include <linux/kernel.h>
  70. #endif
  71. -extern __inline__ void
  72. +static __inline__ void
  73. __sti(void)
  74. {
  75. __asm__ __volatile__(
  76. @@ -46,7 +46,7 @@ __sti(void)
  77. * R4000/R4400 need three nops, the R4600 two nops and the R10000 needs
  78. * no nops at all.
  79. */
  80. -extern __inline__ void
  81. +static __inline__ void
  82. __cli(void)
  83. {
  84. __asm__ __volatile__(
  85. @@ -207,7 +207,7 @@ do { \
  86. * For 32 and 64 bit operands we can take advantage of ll and sc.
  87. * FIXME: This doesn't work for R3000 machines.
  88. */
  89. -extern __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val)
  90. +static __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val)
  91. {
  92. #ifdef CONFIG_CPU_HAS_LLSC
  93. unsigned long dummy;