018-revert_printk_va_format.patch 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. --- a/drivers/net/wireless/b43/main.c
  2. +++ b/drivers/net/wireless/b43/main.c
  3. @@ -322,83 +322,59 @@ static int b43_ratelimit(struct b43_wl *
  4. void b43info(struct b43_wl *wl, const char *fmt, ...)
  5. {
  6. - struct va_format vaf;
  7. va_list args;
  8. if (b43_modparam_verbose < B43_VERBOSITY_INFO)
  9. return;
  10. if (!b43_ratelimit(wl))
  11. return;
  12. -
  13. va_start(args, fmt);
  14. -
  15. - vaf.fmt = fmt;
  16. - vaf.va = &args;
  17. -
  18. - printk(KERN_INFO "b43-%s: %pV",
  19. - (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
  20. -
  21. + printk(KERN_INFO "b43-%s: ",
  22. + (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
  23. + vprintk(fmt, args);
  24. va_end(args);
  25. }
  26. void b43err(struct b43_wl *wl, const char *fmt, ...)
  27. {
  28. - struct va_format vaf;
  29. va_list args;
  30. if (b43_modparam_verbose < B43_VERBOSITY_ERROR)
  31. return;
  32. if (!b43_ratelimit(wl))
  33. return;
  34. -
  35. va_start(args, fmt);
  36. -
  37. - vaf.fmt = fmt;
  38. - vaf.va = &args;
  39. -
  40. - printk(KERN_ERR "b43-%s ERROR: %pV",
  41. - (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
  42. -
  43. + printk(KERN_ERR "b43-%s ERROR: ",
  44. + (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
  45. + vprintk(fmt, args);
  46. va_end(args);
  47. }
  48. void b43warn(struct b43_wl *wl, const char *fmt, ...)
  49. {
  50. - struct va_format vaf;
  51. va_list args;
  52. if (b43_modparam_verbose < B43_VERBOSITY_WARN)
  53. return;
  54. if (!b43_ratelimit(wl))
  55. return;
  56. -
  57. va_start(args, fmt);
  58. -
  59. - vaf.fmt = fmt;
  60. - vaf.va = &args;
  61. -
  62. - printk(KERN_WARNING "b43-%s warning: %pV",
  63. - (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
  64. -
  65. + printk(KERN_WARNING "b43-%s warning: ",
  66. + (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
  67. + vprintk(fmt, args);
  68. va_end(args);
  69. }
  70. void b43dbg(struct b43_wl *wl, const char *fmt, ...)
  71. {
  72. - struct va_format vaf;
  73. va_list args;
  74. if (b43_modparam_verbose < B43_VERBOSITY_DEBUG)
  75. return;
  76. -
  77. va_start(args, fmt);
  78. -
  79. - vaf.fmt = fmt;
  80. - vaf.va = &args;
  81. -
  82. - printk(KERN_DEBUG "b43-%s debug: %pV",
  83. - (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
  84. -
  85. + printk(KERN_DEBUG "b43-%s debug: ",
  86. + (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
  87. + vprintk(fmt, args);
  88. va_end(args);
  89. }
  90. --- a/drivers/net/wireless/b43legacy/main.c
  91. +++ b/drivers/net/wireless/b43legacy/main.c
  92. @@ -181,75 +181,52 @@ static int b43legacy_ratelimit(struct b4
  93. void b43legacyinfo(struct b43legacy_wl *wl, const char *fmt, ...)
  94. {
  95. - struct va_format vaf;
  96. va_list args;
  97. if (!b43legacy_ratelimit(wl))
  98. return;
  99. -
  100. va_start(args, fmt);
  101. -
  102. - vaf.fmt = fmt;
  103. - vaf.va = &args;
  104. -
  105. - printk(KERN_INFO "b43legacy-%s: %pV",
  106. - (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
  107. -
  108. + printk(KERN_INFO "b43legacy-%s: ",
  109. + (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
  110. + vprintk(fmt, args);
  111. va_end(args);
  112. }
  113. void b43legacyerr(struct b43legacy_wl *wl, const char *fmt, ...)
  114. {
  115. - struct va_format vaf;
  116. va_list args;
  117. if (!b43legacy_ratelimit(wl))
  118. return;
  119. -
  120. va_start(args, fmt);
  121. -
  122. - vaf.fmt = fmt;
  123. - vaf.va = &args;
  124. -
  125. - printk(KERN_ERR "b43legacy-%s ERROR: %pV",
  126. - (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
  127. -
  128. + printk(KERN_ERR "b43legacy-%s ERROR: ",
  129. + (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
  130. + vprintk(fmt, args);
  131. va_end(args);
  132. }
  133. void b43legacywarn(struct b43legacy_wl *wl, const char *fmt, ...)
  134. {
  135. - struct va_format vaf;
  136. va_list args;
  137. if (!b43legacy_ratelimit(wl))
  138. return;
  139. -
  140. va_start(args, fmt);
  141. -
  142. - vaf.fmt = fmt;
  143. - vaf.va = &args;
  144. -
  145. - printk(KERN_WARNING "b43legacy-%s warning: %pV",
  146. - (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
  147. -
  148. + printk(KERN_WARNING "b43legacy-%s warning: ",
  149. + (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
  150. + vprintk(fmt, args);
  151. va_end(args);
  152. }
  153. #if B43legacy_DEBUG
  154. void b43legacydbg(struct b43legacy_wl *wl, const char *fmt, ...)
  155. {
  156. - struct va_format vaf;
  157. va_list args;
  158. va_start(args, fmt);
  159. -
  160. - vaf.fmt = fmt;
  161. - vaf.va = &args;
  162. -
  163. - printk(KERN_DEBUG "b43legacy-%s debug: %pV",
  164. - (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
  165. -
  166. + printk(KERN_DEBUG "b43legacy-%s debug: ",
  167. + (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
  168. + vprintk(fmt, args);
  169. va_end(args);
  170. }
  171. #endif /* DEBUG */
  172. --- a/drivers/net/wireless/ath/main.c
  173. +++ b/drivers/net/wireless/ath/main.c
  174. @@ -60,16 +60,13 @@ EXPORT_SYMBOL(ath_rxbuf_alloc);
  175. int ath_printk(const char *level, struct ath_common *common,
  176. const char *fmt, ...)
  177. {
  178. - struct va_format vaf;
  179. va_list args;
  180. int rtn;
  181. va_start(args, fmt);
  182. - vaf.fmt = fmt;
  183. - vaf.va = &args;
  184. -
  185. - rtn = printk("%sath: %pV", level, &vaf);
  186. + printk("%sath: ", level);
  187. + rtn = vprintk(fmt, args);
  188. va_end(args);