Lines Matching refs:old
91 static inline void release_probes(struct tracepoint_func *old) in release_probes() argument
93 if (old) { in release_probes()
94 struct tp_probes *tp_probes = container_of(old, in release_probes()
132 struct tracepoint_func *old, *new; in func_add() local
140 old = *funcs; in func_add()
141 if (old) { in func_add()
143 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_add()
145 if (pos < 0 && old[nr_probes].prio < prio) in func_add()
147 if (old[nr_probes].func == tp_func->func && in func_add()
148 old[nr_probes].data == tp_func->data) in func_add()
156 if (old) { in func_add()
159 memcpy(new, old, nr_probes * sizeof(struct tracepoint_func)); in func_add()
162 memcpy(new, old, pos * sizeof(struct tracepoint_func)); in func_add()
164 memcpy(new + pos + 1, old + pos, in func_add()
173 return old; in func_add()
180 struct tracepoint_func *old, *new; in func_remove() local
182 old = *funcs; in func_remove()
184 if (!old) in func_remove()
190 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_remove()
191 if (old[nr_probes].func == tp_func->func && in func_remove()
192 old[nr_probes].data == tp_func->data) in func_remove()
205 return old; in func_remove()
213 for (i = 0; old[i].func; i++) in func_remove()
214 if (old[i].func != tp_func->func in func_remove()
215 || old[i].data != tp_func->data) in func_remove()
216 new[j++] = old[i]; in func_remove()
221 return old; in func_remove()
230 struct tracepoint_func *old, *tp_funcs; in tracepoint_add_func() local
241 old = func_add(&tp_funcs, func, prio); in tracepoint_add_func()
242 if (IS_ERR(old)) { in tracepoint_add_func()
243 WARN_ON_ONCE(PTR_ERR(old) != -ENOMEM); in tracepoint_add_func()
244 return PTR_ERR(old); in tracepoint_add_func()
256 release_probes(old); in tracepoint_add_func()
269 struct tracepoint_func *old, *tp_funcs; in tracepoint_remove_func() local
273 old = func_remove(&tp_funcs, func); in tracepoint_remove_func()
274 if (IS_ERR(old)) { in tracepoint_remove_func()
275 WARN_ON_ONCE(PTR_ERR(old) != -ENOMEM); in tracepoint_remove_func()
276 return PTR_ERR(old); in tracepoint_remove_func()
288 release_probes(old); in tracepoint_remove_func()