0002-ARM-asm-io.h-use-static-inline.patch 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. From a29b67a36a2b59acfc9cb7adc6e3bc06c490d4ee Mon Sep 17 00:00:00 2001
  2. From: Jeroen Hofstee <jeroen@myspectrum.nl>
  3. Date: Sun, 22 Jun 2014 23:10:39 +0200
  4. Subject: [PATCH 2/6] ARM:asm:io.h use static inline
  5. When compiling u-boot with W=1 the extern inline void for
  6. read* is likely causing the most noise. gcc / clang will
  7. warn there is never a actual declaration for these functions.
  8. Instead of declaring these extern make them static inline so
  9. it is actually declared.
  10. cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
  11. Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
  12. ---
  13. arch/arm/include/asm/io.h | 12 ++++++------
  14. 1 file changed, 6 insertions(+), 6 deletions(-)
  15. diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
  16. index 214f3ea..dc6138a 100644
  17. --- a/arch/arm/include/asm/io.h
  18. +++ b/arch/arm/include/asm/io.h
  19. @@ -77,7 +77,7 @@ static inline phys_addr_t virt_to_phys(void * vaddr)
  20. #define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v))
  21. #define __arch_putq(v,a) (*(volatile unsigned long long *)(a) = (v))
  22. -extern inline void __raw_writesb(unsigned long addr, const void *data,
  23. +static inline void __raw_writesb(unsigned long addr, const void *data,
  24. int bytelen)
  25. {
  26. uint8_t *buf = (uint8_t *)data;
  27. @@ -85,7 +85,7 @@ extern inline void __raw_writesb(unsigned long addr, const void *data,
  28. __arch_putb(*buf++, addr);
  29. }
  30. -extern inline void __raw_writesw(unsigned long addr, const void *data,
  31. +static inline void __raw_writesw(unsigned long addr, const void *data,
  32. int wordlen)
  33. {
  34. uint16_t *buf = (uint16_t *)data;
  35. @@ -93,7 +93,7 @@ extern inline void __raw_writesw(unsigned long addr, const void *data,
  36. __arch_putw(*buf++, addr);
  37. }
  38. -extern inline void __raw_writesl(unsigned long addr, const void *data,
  39. +static inline void __raw_writesl(unsigned long addr, const void *data,
  40. int longlen)
  41. {
  42. uint32_t *buf = (uint32_t *)data;
  43. @@ -101,21 +101,21 @@ extern inline void __raw_writesl(unsigned long addr, const void *data,
  44. __arch_putl(*buf++, addr);
  45. }
  46. -extern inline void __raw_readsb(unsigned long addr, void *data, int bytelen)
  47. +static inline void __raw_readsb(unsigned long addr, void *data, int bytelen)
  48. {
  49. uint8_t *buf = (uint8_t *)data;
  50. while(bytelen--)
  51. *buf++ = __arch_getb(addr);
  52. }
  53. -extern inline void __raw_readsw(unsigned long addr, void *data, int wordlen)
  54. +static inline void __raw_readsw(unsigned long addr, void *data, int wordlen)
  55. {
  56. uint16_t *buf = (uint16_t *)data;
  57. while(wordlen--)
  58. *buf++ = __arch_getw(addr);
  59. }
  60. -extern inline void __raw_readsl(unsigned long addr, void *data, int longlen)
  61. +static inline void __raw_readsl(unsigned long addr, void *data, int longlen)
  62. {
  63. uint32_t *buf = (uint32_t *)data;
  64. while(longlen--)
  65. --
  66. 2.5.0