Lines Matching refs:rc
202 int count = 0, rc; in of_unittest_check_node_linkage() local
208 rc = -EINVAL; in of_unittest_check_node_linkage()
212 rc = of_unittest_check_node_linkage(child); in of_unittest_check_node_linkage()
213 if (rc < 0) in of_unittest_check_node_linkage()
215 count += rc; in of_unittest_check_node_linkage()
221 return rc; in of_unittest_check_node_linkage()
291 int i, rc; in of_unittest_parse_phandle_with_args() local
299 rc = of_count_phandle_with_args(np, "phandle-list", "#phandle-cells"); in of_unittest_parse_phandle_with_args()
300 unittest(rc == 7, "of_count_phandle_with_args() returned %i, expected 7\n", rc); in of_unittest_parse_phandle_with_args()
305 rc = of_parse_phandle_with_args(np, "phandle-list", in of_unittest_parse_phandle_with_args()
311 passed &= !rc; in of_unittest_parse_phandle_with_args()
316 passed &= !rc; in of_unittest_parse_phandle_with_args()
322 passed &= (rc == -ENOENT); in of_unittest_parse_phandle_with_args()
325 passed &= !rc; in of_unittest_parse_phandle_with_args()
332 passed &= !rc; in of_unittest_parse_phandle_with_args()
338 passed &= !rc; in of_unittest_parse_phandle_with_args()
342 passed &= !rc; in of_unittest_parse_phandle_with_args()
347 passed &= (rc == -ENOENT); in of_unittest_parse_phandle_with_args()
354 i, args.np->full_name, rc); in of_unittest_parse_phandle_with_args()
358 rc = of_parse_phandle_with_args(np, "phandle-list-missing", in of_unittest_parse_phandle_with_args()
360 unittest(rc == -ENOENT, "expected:%i got:%i\n", -ENOENT, rc); in of_unittest_parse_phandle_with_args()
361 rc = of_count_phandle_with_args(np, "phandle-list-missing", in of_unittest_parse_phandle_with_args()
363 unittest(rc == -ENOENT, "expected:%i got:%i\n", -ENOENT, rc); in of_unittest_parse_phandle_with_args()
366 rc = of_parse_phandle_with_args(np, "phandle-list", in of_unittest_parse_phandle_with_args()
368 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
369 rc = of_count_phandle_with_args(np, "phandle-list", in of_unittest_parse_phandle_with_args()
371 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
374 rc = of_parse_phandle_with_args(np, "phandle-list-bad-phandle", in of_unittest_parse_phandle_with_args()
376 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
377 rc = of_count_phandle_with_args(np, "phandle-list-bad-phandle", in of_unittest_parse_phandle_with_args()
379 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
382 rc = of_parse_phandle_with_args(np, "phandle-list-bad-args", in of_unittest_parse_phandle_with_args()
384 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
385 rc = of_count_phandle_with_args(np, "phandle-list-bad-args", in of_unittest_parse_phandle_with_args()
387 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
394 int rc; in of_unittest_property_string() local
402 rc = of_property_match_string(np, "phandle-list-names", "first"); in of_unittest_property_string()
403 unittest(rc == 0, "first expected:0 got:%i\n", rc); in of_unittest_property_string()
404 rc = of_property_match_string(np, "phandle-list-names", "second"); in of_unittest_property_string()
405 unittest(rc == 1, "second expected:1 got:%i\n", rc); in of_unittest_property_string()
406 rc = of_property_match_string(np, "phandle-list-names", "third"); in of_unittest_property_string()
407 unittest(rc == 2, "third expected:2 got:%i\n", rc); in of_unittest_property_string()
408 rc = of_property_match_string(np, "phandle-list-names", "fourth"); in of_unittest_property_string()
409 unittest(rc == -ENODATA, "unmatched string; rc=%i\n", rc); in of_unittest_property_string()
410 rc = of_property_match_string(np, "missing-property", "blah"); in of_unittest_property_string()
411 unittest(rc == -EINVAL, "missing property; rc=%i\n", rc); in of_unittest_property_string()
412 rc = of_property_match_string(np, "empty-property", "blah"); in of_unittest_property_string()
413 unittest(rc == -ENODATA, "empty property; rc=%i\n", rc); in of_unittest_property_string()
414 rc = of_property_match_string(np, "unterminated-string", "blah"); in of_unittest_property_string()
415 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
418 rc = of_property_count_strings(np, "string-property"); in of_unittest_property_string()
419 unittest(rc == 1, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
420 rc = of_property_count_strings(np, "phandle-list-names"); in of_unittest_property_string()
421 unittest(rc == 3, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
422 rc = of_property_count_strings(np, "unterminated-string"); in of_unittest_property_string()
423 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
424 rc = of_property_count_strings(np, "unterminated-string-list"); in of_unittest_property_string()
425 unittest(rc == -EILSEQ, "unterminated string array; rc=%i\n", rc); in of_unittest_property_string()
428 rc = of_property_read_string_index(np, "string-property", 0, strings); in of_unittest_property_string()
429 …unittest(rc == 0 && !strcmp(strings[0], "foobar"), "of_property_read_string_index() failure; rc=%i… in of_unittest_property_string()
431 rc = of_property_read_string_index(np, "string-property", 1, strings); in of_unittest_property_string()
432 …unittest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n",… in of_unittest_property_string()
433 rc = of_property_read_string_index(np, "phandle-list-names", 0, strings); in of_unittest_property_string()
434 …unittest(rc == 0 && !strcmp(strings[0], "first"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
435 rc = of_property_read_string_index(np, "phandle-list-names", 1, strings); in of_unittest_property_string()
436 …unittest(rc == 0 && !strcmp(strings[0], "second"), "of_property_read_string_index() failure; rc=%i… in of_unittest_property_string()
437 rc = of_property_read_string_index(np, "phandle-list-names", 2, strings); in of_unittest_property_string()
438 …unittest(rc == 0 && !strcmp(strings[0], "third"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
440 rc = of_property_read_string_index(np, "phandle-list-names", 3, strings); in of_unittest_property_string()
441 …unittest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n",… in of_unittest_property_string()
443 rc = of_property_read_string_index(np, "unterminated-string", 0, strings); in of_unittest_property_string()
444 …unittest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", … in of_unittest_property_string()
445 rc = of_property_read_string_index(np, "unterminated-string-list", 0, strings); in of_unittest_property_string()
446 …unittest(rc == 0 && !strcmp(strings[0], "first"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
448 rc = of_property_read_string_index(np, "unterminated-string-list", 2, strings); /* should fail */ in of_unittest_property_string()
449 …unittest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", … in of_unittest_property_string()
453 rc = of_property_read_string_array(np, "string-property", strings, 4); in of_unittest_property_string()
454 unittest(rc == 1, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
455 rc = of_property_read_string_array(np, "phandle-list-names", strings, 4); in of_unittest_property_string()
456 unittest(rc == 3, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
457 rc = of_property_read_string_array(np, "unterminated-string", strings, 4); in of_unittest_property_string()
458 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
460 rc = of_property_read_string_array(np, "unterminated-string-list", strings, 4); in of_unittest_property_string()
461 unittest(rc == -EILSEQ, "unterminated string array; rc=%i\n", rc); in of_unittest_property_string()
464 rc = of_property_read_string_array(np, "unterminated-string-list", strings, 2); in of_unittest_property_string()
465 unittest(rc == 2 && strings[2] == NULL, "of_property_read_string_array() failure; rc=%i\n", rc); in of_unittest_property_string()
467 rc = of_property_read_string_array(np, "phandle-list-names", strings, 1); in of_unittest_property_string()
468 …unittest(rc == 1 && strings[1] == NULL, "Overwrote end of string array; rc=%i, str='%s'\n", rc, st… in of_unittest_property_string()
554 int i, rc; in of_unittest_parse_interrupts() local
566 rc = of_irq_parse_one(np, i, &args); in of_unittest_parse_interrupts()
568 passed &= !rc; in of_unittest_parse_interrupts()
573 i, args.np->full_name, rc); in of_unittest_parse_interrupts()
587 rc = of_irq_parse_one(np, i, &args); in of_unittest_parse_interrupts()
592 passed &= !rc; in of_unittest_parse_interrupts()
597 passed &= !rc; in of_unittest_parse_interrupts()
604 passed &= !rc; in of_unittest_parse_interrupts()
610 passed &= !rc; in of_unittest_parse_interrupts()
619 i, args.np->full_name, rc); in of_unittest_parse_interrupts()
628 int i, rc; in of_unittest_parse_interrupts_extended() local
639 rc = of_irq_parse_one(np, i, &args); in of_unittest_parse_interrupts_extended()
644 passed &= !rc; in of_unittest_parse_interrupts_extended()
649 passed &= !rc; in of_unittest_parse_interrupts_extended()
656 passed &= !rc; in of_unittest_parse_interrupts_extended()
662 passed &= !rc; in of_unittest_parse_interrupts_extended()
667 passed &= !rc; in of_unittest_parse_interrupts_extended()
674 passed &= !rc; in of_unittest_parse_interrupts_extended()
680 passed &= !rc; in of_unittest_parse_interrupts_extended()
689 i, args.np->full_name, rc); in of_unittest_parse_interrupts_extended()
765 int irq, rc; in of_unittest_platform_populate() local
797 rc = PTR_ERR_OR_ZERO(test_bus); in of_unittest_platform_populate()
798 unittest(!rc, "testbus registration failed; rc=%i\n", rc); in of_unittest_platform_populate()
799 if (rc) in of_unittest_platform_populate()
898 int rc; in unittest_data_add() local
920 rc = of_resolve_phandles(unittest_data_node); in unittest_data_add()
921 if (rc) { in unittest_data_add()
922 pr_err("%s: Failed to resolve phandles (rc=%i)\n", __func__, rc); in unittest_data_add()