@@ -262,9 +262,9 @@ trace_boot_hist_add_one_handler(struct xbc_node *hnode, char **bufp,
262262 append_printf (bufp , end , ":%s(%s)" , handler , p );
263263
264264 /* Compose 'action' parameter */
265- knode = xbc_node_find_child (hnode , "trace" );
265+ knode = xbc_node_find_subkey (hnode , "trace" );
266266 if (!knode )
267- knode = xbc_node_find_child (hnode , "save" );
267+ knode = xbc_node_find_subkey (hnode , "save" );
268268
269269 if (knode ) {
270270 anode = xbc_node_get_child (knode );
@@ -283,7 +283,7 @@ trace_boot_hist_add_one_handler(struct xbc_node *hnode, char **bufp,
283283 sep = ',' ;
284284 }
285285 append_printf (bufp , end , ")" );
286- } else if (xbc_node_find_child (hnode , "snapshot" )) {
286+ } else if (xbc_node_find_subkey (hnode , "snapshot" )) {
287287 append_printf (bufp , end , ".snapshot()" );
288288 } else {
289289 pr_err ("hist.%s requires an action.\n" ,
@@ -314,7 +314,7 @@ trace_boot_hist_add_handlers(struct xbc_node *hnode, char **bufp,
314314 break ;
315315 }
316316
317- if (xbc_node_find_child (hnode , param ))
317+ if (xbc_node_find_subkey (hnode , param ))
318318 ret = trace_boot_hist_add_one_handler (hnode , bufp , end , handler , param );
319319
320320 return ret ;
@@ -374,7 +374,7 @@ trace_boot_compose_hist_cmd(struct xbc_node *hnode, char *buf, size_t size)
374374 if (p )
375375 append_printf (& buf , end , ":name=%s" , p );
376376
377- node = xbc_node_find_child (hnode , "var" );
377+ node = xbc_node_find_subkey (hnode , "var" );
378378 if (node ) {
379379 xbc_node_for_each_key_value (node , knode , p ) {
380380 /* Expression must not include spaces. */
@@ -393,13 +393,13 @@ trace_boot_compose_hist_cmd(struct xbc_node *hnode, char *buf, size_t size)
393393 append_printf (& buf , end , ":clear" );
394394
395395 /* Histogram handler and actions */
396- node = xbc_node_find_child (hnode , "onmax" );
396+ node = xbc_node_find_subkey (hnode , "onmax" );
397397 if (node && trace_boot_hist_add_handlers (node , & buf , end , "var" ) < 0 )
398398 return - EINVAL ;
399- node = xbc_node_find_child (hnode , "onchange" );
399+ node = xbc_node_find_subkey (hnode , "onchange" );
400400 if (node && trace_boot_hist_add_handlers (node , & buf , end , "var" ) < 0 )
401401 return - EINVAL ;
402- node = xbc_node_find_child (hnode , "onmatch" );
402+ node = xbc_node_find_subkey (hnode , "onmatch" );
403403 if (node && trace_boot_hist_add_handlers (node , & buf , end , "event" ) < 0 )
404404 return - EINVAL ;
405405
@@ -436,7 +436,7 @@ trace_boot_init_histograms(struct trace_event_file *file,
436436 }
437437 }
438438
439- if (xbc_node_find_child (hnode , "keys" )) {
439+ if (xbc_node_find_subkey (hnode , "keys" )) {
440440 if (trace_boot_compose_hist_cmd (hnode , buf , size ) == 0 ) {
441441 tmp = kstrdup (buf , GFP_KERNEL );
442442 if (trigger_process_regex (file , buf ) < 0 )
@@ -495,7 +495,7 @@ trace_boot_init_one_event(struct trace_array *tr, struct xbc_node *gnode,
495495 else if (trigger_process_regex (file , buf ) < 0 )
496496 pr_err ("Failed to apply an action: %s\n" , p );
497497 }
498- anode = xbc_node_find_child (enode , "hist" );
498+ anode = xbc_node_find_subkey (enode , "hist" );
499499 if (anode )
500500 trace_boot_init_histograms (file , anode , buf , ARRAY_SIZE (buf ));
501501 } else if (xbc_node_find_value (enode , "actions" , NULL ))
@@ -517,7 +517,7 @@ trace_boot_init_events(struct trace_array *tr, struct xbc_node *node)
517517 bool enable , enable_all = false;
518518 const char * data ;
519519
520- node = xbc_node_find_child (node , "event" );
520+ node = xbc_node_find_subkey (node , "event" );
521521 if (!node )
522522 return ;
523523 /* per-event key starts with "event.GROUP.EVENT" */
@@ -620,7 +620,7 @@ trace_boot_init_instances(struct xbc_node *node)
620620 struct trace_array * tr ;
621621 const char * p ;
622622
623- node = xbc_node_find_child (node , "instance" );
623+ node = xbc_node_find_subkey (node , "instance" );
624624 if (!node )
625625 return ;
626626
0 commit comments