Lines Matching refs:old
104 static inline void release_probes(struct tracepoint_func *old) in release_probes() argument
106 if (old) { in release_probes()
107 struct tp_probes *tp_probes = container_of(old, in release_probes()
145 struct tracepoint_func *old, *new; in func_add() local
153 old = *funcs; in func_add()
154 if (old) { in func_add()
156 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_add()
158 if (pos < 0 && old[nr_probes].prio < prio) in func_add()
160 if (old[nr_probes].func == tp_func->func && in func_add()
161 old[nr_probes].data == tp_func->data) in func_add()
169 if (old) { in func_add()
172 memcpy(new, old, nr_probes * sizeof(struct tracepoint_func)); in func_add()
175 memcpy(new, old, pos * sizeof(struct tracepoint_func)); in func_add()
177 memcpy(new + pos + 1, old + pos, in func_add()
186 return old; in func_add()
193 struct tracepoint_func *old, *new; in func_remove() local
195 old = *funcs; in func_remove()
197 if (!old) in func_remove()
203 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_remove()
204 if (old[nr_probes].func == tp_func->func && in func_remove()
205 old[nr_probes].data == tp_func->data) in func_remove()
218 return old; in func_remove()
226 for (i = 0; old[i].func; i++) in func_remove()
227 if (old[i].func != tp_func->func in func_remove()
228 || old[i].data != tp_func->data) in func_remove()
229 new[j++] = old[i]; in func_remove()
234 return old; in func_remove()
243 struct tracepoint_func *old, *tp_funcs; in tracepoint_add_func() local
254 old = func_add(&tp_funcs, func, prio); in tracepoint_add_func()
255 if (IS_ERR(old)) { in tracepoint_add_func()
256 WARN_ON_ONCE(PTR_ERR(old) != -ENOMEM); in tracepoint_add_func()
257 return PTR_ERR(old); in tracepoint_add_func()
269 release_probes(old); in tracepoint_add_func()
282 struct tracepoint_func *old, *tp_funcs; in tracepoint_remove_func() local
286 old = func_remove(&tp_funcs, func); in tracepoint_remove_func()
287 if (IS_ERR(old)) { in tracepoint_remove_func()
288 WARN_ON_ONCE(PTR_ERR(old) != -ENOMEM); in tracepoint_remove_func()
289 return PTR_ERR(old); in tracepoint_remove_func()
301 release_probes(old); in tracepoint_remove_func()