Lines Matching refs:old
142 static inline void release_probes(struct tracepoint_func *old) in release_probes() argument
144 if (old) { in release_probes()
145 struct tp_probes *tp_probes = container_of(old, in release_probes()
183 struct tracepoint_func *old, *new; in func_add() local
192 old = *funcs; in func_add()
193 if (old) { in func_add()
195 for (iter_probes = 0; old[iter_probes].func; iter_probes++) { in func_add()
196 if (old[iter_probes].func == tp_stub_func) in func_add()
198 if (old[iter_probes].func == tp_func->func && in func_add()
199 old[iter_probes].data == tp_func->data) in func_add()
208 if (old) { in func_add()
210 for (iter_probes = 0; old[iter_probes].func; iter_probes++) { in func_add()
211 if (old[iter_probes].func == tp_stub_func) in func_add()
214 if (pos < 0 && old[iter_probes].prio < prio) in func_add()
216 new[nr_probes++] = old[iter_probes]; in func_add()
229 return old; in func_add()
236 struct tracepoint_func *old, *new; in func_remove() local
238 old = *funcs; in func_remove()
240 if (!old) in func_remove()
246 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_remove()
247 if ((old[nr_probes].func == tp_func->func && in func_remove()
248 old[nr_probes].data == tp_func->data) || in func_remove()
249 old[nr_probes].func == tp_stub_func) in func_remove()
262 return old; in func_remove()
269 for (i = 0; old[i].func; i++) { in func_remove()
270 if ((old[i].func != tp_func->func || in func_remove()
271 old[i].data != tp_func->data) && in func_remove()
272 old[i].func != tp_stub_func) in func_remove()
273 new[j++] = old[i]; in func_remove()
282 for (i = 0; old[i].func; i++) { in func_remove()
283 if (old[i].func == tp_func->func && in func_remove()
284 old[i].data == tp_func->data) in func_remove()
285 WRITE_ONCE(old[i].func, tp_stub_func); in func_remove()
287 *funcs = old; in func_remove()
291 return old; in func_remove()
327 struct tracepoint_func *old, *tp_funcs; in tracepoint_add_func() local
338 old = func_add(&tp_funcs, func, prio); in tracepoint_add_func()
339 if (IS_ERR(old)) { in tracepoint_add_func()
340 WARN_ON_ONCE(warn && PTR_ERR(old) != -ENOMEM); in tracepoint_add_func()
341 return PTR_ERR(old); in tracepoint_add_func()
378 if (tp_funcs[0].data != old[0].data) in tracepoint_add_func()
386 release_probes(old); in tracepoint_add_func()
399 struct tracepoint_func *old, *tp_funcs; in tracepoint_remove_func() local
403 old = func_remove(&tp_funcs, func); in tracepoint_remove_func()
404 if (WARN_ON_ONCE(IS_ERR(old))) in tracepoint_remove_func()
405 return PTR_ERR(old); in tracepoint_remove_func()
407 if (tp_funcs == old) in tracepoint_remove_func()
437 if (tp_funcs[0].data != old[0].data) in tracepoint_remove_func()
451 if (tp_funcs[0].data != old[0].data) in tracepoint_remove_func()
458 release_probes(old); in tracepoint_remove_func()