Lines Matching refs:old
74 static inline void release_probes(struct tracepoint_func *old) in release_probes() argument
76 if (old) { in release_probes()
77 struct tp_probes *tp_probes = container_of(old, in release_probes()
98 struct tracepoint_func *old, *new; in func_add() local
106 old = *funcs; in func_add()
107 if (old) { in func_add()
109 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_add()
111 if (pos < 0 && old[nr_probes].prio < prio) in func_add()
113 if (old[nr_probes].func == tp_func->func && in func_add()
114 old[nr_probes].data == tp_func->data) in func_add()
122 if (old) { in func_add()
125 memcpy(new, old, nr_probes * sizeof(struct tracepoint_func)); in func_add()
128 memcpy(new, old, pos * sizeof(struct tracepoint_func)); in func_add()
130 memcpy(new + pos + 1, old + pos, in func_add()
139 return old; in func_add()
146 struct tracepoint_func *old, *new; in func_remove() local
148 old = *funcs; in func_remove()
150 if (!old) in func_remove()
156 for (nr_probes = 0; old[nr_probes].func; nr_probes++) { in func_remove()
157 if (old[nr_probes].func == tp_func->func && in func_remove()
158 old[nr_probes].data == tp_func->data) in func_remove()
171 return old; in func_remove()
179 for (i = 0; old[i].func; i++) in func_remove()
180 if (old[i].func != tp_func->func in func_remove()
181 || old[i].data != tp_func->data) in func_remove()
182 new[j++] = old[i]; in func_remove()
187 return old; in func_remove()
196 struct tracepoint_func *old, *tp_funcs; in tracepoint_add_func() local
203 old = func_add(&tp_funcs, func, prio); in tracepoint_add_func()
204 if (IS_ERR(old)) { in tracepoint_add_func()
206 return PTR_ERR(old); in tracepoint_add_func()
219 release_probes(old); in tracepoint_add_func()
232 struct tracepoint_func *old, *tp_funcs; in tracepoint_remove_func() local
236 old = func_remove(&tp_funcs, func); in tracepoint_remove_func()
237 if (IS_ERR(old)) { in tracepoint_remove_func()
239 return PTR_ERR(old); in tracepoint_remove_func()
251 release_probes(old); in tracepoint_remove_func()