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