002-use-static-inline.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. From: Jeroen Hofstee <jeroen@myspectrum.nl>
  2. Date: Sun, 22 Jun 2014 21:10:39 +0000 (+0200)
  3. Subject: ARM:asm:io.h use static inline
  4. X-Git-Tag: v2014.10-rc2~47
  5. X-Git-Url: http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=8863aa5c984460ce1112d8db895cbf8b13a6ac9d
  6. ARM:asm:io.h use static inline
  7. When compiling u-boot with W=1 the extern inline void for
  8. read* is likely causing the most noise. gcc / clang will
  9. warn there is never a actual declaration for these functions.
  10. Instead of declaring these extern make them static inline so
  11. it is actually declared.
  12. cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
  13. Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
  14. ---
  15. --- a/arch/arm/include/asm/io.h
  16. +++ b/arch/arm/include/asm/io.h
  17. @@ -75,7 +75,7 @@ static inline phys_addr_t virt_to_phys(v
  18. #define __arch_putw(v,a) (*(volatile unsigned short *)(a) = (v))
  19. #define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v))
  20. -extern inline void __raw_writesb(unsigned long addr, const void *data,
  21. +static inline void __raw_writesb(unsigned long addr, const void *data,
  22. int bytelen)
  23. {
  24. uint8_t *buf = (uint8_t *)data;
  25. @@ -83,7 +83,7 @@ extern inline void __raw_writesb(unsigne
  26. __arch_putb(*buf++, addr);
  27. }
  28. -extern inline void __raw_writesw(unsigned long addr, const void *data,
  29. +static inline void __raw_writesw(unsigned long addr, const void *data,
  30. int wordlen)
  31. {
  32. uint16_t *buf = (uint16_t *)data;
  33. @@ -91,7 +91,7 @@ extern inline void __raw_writesw(unsigne
  34. __arch_putw(*buf++, addr);
  35. }
  36. -extern inline void __raw_writesl(unsigned long addr, const void *data,
  37. +static inline void __raw_writesl(unsigned long addr, const void *data,
  38. int longlen)
  39. {
  40. uint32_t *buf = (uint32_t *)data;
  41. @@ -99,21 +99,21 @@ extern inline void __raw_writesl(unsigne
  42. __arch_putl(*buf++, addr);
  43. }
  44. -extern inline void __raw_readsb(unsigned long addr, void *data, int bytelen)
  45. +static inline void __raw_readsb(unsigned long addr, void *data, int bytelen)
  46. {
  47. uint8_t *buf = (uint8_t *)data;
  48. while(bytelen--)
  49. *buf++ = __arch_getb(addr);
  50. }
  51. -extern inline void __raw_readsw(unsigned long addr, void *data, int wordlen)
  52. +static inline void __raw_readsw(unsigned long addr, void *data, int wordlen)
  53. {
  54. uint16_t *buf = (uint16_t *)data;
  55. while(wordlen--)
  56. *buf++ = __arch_getw(addr);
  57. }
  58. -extern inline void __raw_readsl(unsigned long addr, void *data, int longlen)
  59. +static inline void __raw_readsl(unsigned long addr, void *data, int longlen)
  60. {
  61. uint32_t *buf = (uint32_t *)data;
  62. while(longlen--)