Lines Matching refs:rc

202 	int count = 0, rc;  in of_unittest_check_node_linkage()  local
211 rc = of_unittest_check_node_linkage(child); in of_unittest_check_node_linkage()
212 if (rc < 0) in of_unittest_check_node_linkage()
213 return rc; in of_unittest_check_node_linkage()
214 count += rc; in of_unittest_check_node_linkage()
287 int i, rc; in of_unittest_parse_phandle_with_args() local
295 rc = of_count_phandle_with_args(np, "phandle-list", "#phandle-cells"); in of_unittest_parse_phandle_with_args()
296 unittest(rc == 7, "of_count_phandle_with_args() returned %i, expected 7\n", rc); in of_unittest_parse_phandle_with_args()
301 rc = of_parse_phandle_with_args(np, "phandle-list", in of_unittest_parse_phandle_with_args()
307 passed &= !rc; in of_unittest_parse_phandle_with_args()
312 passed &= !rc; in of_unittest_parse_phandle_with_args()
318 passed &= (rc == -ENOENT); in of_unittest_parse_phandle_with_args()
321 passed &= !rc; in of_unittest_parse_phandle_with_args()
328 passed &= !rc; in of_unittest_parse_phandle_with_args()
334 passed &= !rc; in of_unittest_parse_phandle_with_args()
338 passed &= !rc; in of_unittest_parse_phandle_with_args()
343 passed &= (rc == -ENOENT); in of_unittest_parse_phandle_with_args()
350 i, args.np->full_name, rc); in of_unittest_parse_phandle_with_args()
354 rc = of_parse_phandle_with_args(np, "phandle-list-missing", in of_unittest_parse_phandle_with_args()
356 unittest(rc == -ENOENT, "expected:%i got:%i\n", -ENOENT, rc); in of_unittest_parse_phandle_with_args()
357 rc = of_count_phandle_with_args(np, "phandle-list-missing", in of_unittest_parse_phandle_with_args()
359 unittest(rc == -ENOENT, "expected:%i got:%i\n", -ENOENT, rc); in of_unittest_parse_phandle_with_args()
362 rc = of_parse_phandle_with_args(np, "phandle-list", in of_unittest_parse_phandle_with_args()
364 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
365 rc = of_count_phandle_with_args(np, "phandle-list", in of_unittest_parse_phandle_with_args()
367 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
370 rc = of_parse_phandle_with_args(np, "phandle-list-bad-phandle", in of_unittest_parse_phandle_with_args()
372 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
373 rc = of_count_phandle_with_args(np, "phandle-list-bad-phandle", in of_unittest_parse_phandle_with_args()
375 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
378 rc = of_parse_phandle_with_args(np, "phandle-list-bad-args", in of_unittest_parse_phandle_with_args()
380 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
381 rc = of_count_phandle_with_args(np, "phandle-list-bad-args", in of_unittest_parse_phandle_with_args()
383 unittest(rc == -EINVAL, "expected:%i got:%i\n", -EINVAL, rc); in of_unittest_parse_phandle_with_args()
390 int rc; in of_unittest_property_string() local
398 rc = of_property_match_string(np, "phandle-list-names", "first"); in of_unittest_property_string()
399 unittest(rc == 0, "first expected:0 got:%i\n", rc); in of_unittest_property_string()
400 rc = of_property_match_string(np, "phandle-list-names", "second"); in of_unittest_property_string()
401 unittest(rc == 1, "second expected:1 got:%i\n", rc); in of_unittest_property_string()
402 rc = of_property_match_string(np, "phandle-list-names", "third"); in of_unittest_property_string()
403 unittest(rc == 2, "third expected:2 got:%i\n", rc); in of_unittest_property_string()
404 rc = of_property_match_string(np, "phandle-list-names", "fourth"); in of_unittest_property_string()
405 unittest(rc == -ENODATA, "unmatched string; rc=%i\n", rc); in of_unittest_property_string()
406 rc = of_property_match_string(np, "missing-property", "blah"); in of_unittest_property_string()
407 unittest(rc == -EINVAL, "missing property; rc=%i\n", rc); in of_unittest_property_string()
408 rc = of_property_match_string(np, "empty-property", "blah"); in of_unittest_property_string()
409 unittest(rc == -ENODATA, "empty property; rc=%i\n", rc); in of_unittest_property_string()
410 rc = of_property_match_string(np, "unterminated-string", "blah"); in of_unittest_property_string()
411 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
414 rc = of_property_count_strings(np, "string-property"); in of_unittest_property_string()
415 unittest(rc == 1, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
416 rc = of_property_count_strings(np, "phandle-list-names"); in of_unittest_property_string()
417 unittest(rc == 3, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
418 rc = of_property_count_strings(np, "unterminated-string"); in of_unittest_property_string()
419 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
420 rc = of_property_count_strings(np, "unterminated-string-list"); in of_unittest_property_string()
421 unittest(rc == -EILSEQ, "unterminated string array; rc=%i\n", rc); in of_unittest_property_string()
424 rc = of_property_read_string_index(np, "string-property", 0, strings); in of_unittest_property_string()
425 …unittest(rc == 0 && !strcmp(strings[0], "foobar"), "of_property_read_string_index() failure; rc=%i… in of_unittest_property_string()
427 rc = of_property_read_string_index(np, "string-property", 1, strings); in of_unittest_property_string()
428 …unittest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n",… in of_unittest_property_string()
429 rc = of_property_read_string_index(np, "phandle-list-names", 0, strings); in of_unittest_property_string()
430 …unittest(rc == 0 && !strcmp(strings[0], "first"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
431 rc = of_property_read_string_index(np, "phandle-list-names", 1, strings); in of_unittest_property_string()
432 …unittest(rc == 0 && !strcmp(strings[0], "second"), "of_property_read_string_index() failure; rc=%i… in of_unittest_property_string()
433 rc = of_property_read_string_index(np, "phandle-list-names", 2, strings); in of_unittest_property_string()
434 …unittest(rc == 0 && !strcmp(strings[0], "third"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
436 rc = of_property_read_string_index(np, "phandle-list-names", 3, strings); in of_unittest_property_string()
437 …unittest(rc == -ENODATA && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n",… in of_unittest_property_string()
439 rc = of_property_read_string_index(np, "unterminated-string", 0, strings); in of_unittest_property_string()
440 …unittest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", in of_unittest_property_string()
441 rc = of_property_read_string_index(np, "unterminated-string-list", 0, strings); in of_unittest_property_string()
442 …unittest(rc == 0 && !strcmp(strings[0], "first"), "of_property_read_string_index() failure; rc=%i\… in of_unittest_property_string()
444 rc = of_property_read_string_index(np, "unterminated-string-list", 2, strings); /* should fail */ in of_unittest_property_string()
445 …unittest(rc == -EILSEQ && strings[0] == NULL, "of_property_read_string_index() failure; rc=%i\n", in of_unittest_property_string()
449 rc = of_property_read_string_array(np, "string-property", strings, 4); in of_unittest_property_string()
450 unittest(rc == 1, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
451 rc = of_property_read_string_array(np, "phandle-list-names", strings, 4); in of_unittest_property_string()
452 unittest(rc == 3, "Incorrect string count; rc=%i\n", rc); in of_unittest_property_string()
453 rc = of_property_read_string_array(np, "unterminated-string", strings, 4); in of_unittest_property_string()
454 unittest(rc == -EILSEQ, "unterminated string; rc=%i\n", rc); in of_unittest_property_string()
456 rc = of_property_read_string_array(np, "unterminated-string-list", strings, 4); in of_unittest_property_string()
457 unittest(rc == -EILSEQ, "unterminated string array; rc=%i\n", rc); in of_unittest_property_string()
460 rc = of_property_read_string_array(np, "unterminated-string-list", strings, 2); in of_unittest_property_string()
461 unittest(rc == 2 && strings[2] == NULL, "of_property_read_string_array() failure; rc=%i\n", rc); in of_unittest_property_string()
463 rc = of_property_read_string_array(np, "phandle-list-names", strings, 1); in of_unittest_property_string()
464 …unittest(rc == 1 && strings[1] == NULL, "Overwrote end of string array; rc=%i, str='%s'\n", rc, st… in of_unittest_property_string()
550 int i, rc; in of_unittest_parse_interrupts() local
562 rc = of_irq_parse_one(np, i, &args); in of_unittest_parse_interrupts()
564 passed &= !rc; in of_unittest_parse_interrupts()
569 i, args.np->full_name, rc); in of_unittest_parse_interrupts()
583 rc = of_irq_parse_one(np, i, &args); in of_unittest_parse_interrupts()
588 passed &= !rc; in of_unittest_parse_interrupts()
593 passed &= !rc; in of_unittest_parse_interrupts()
600 passed &= !rc; in of_unittest_parse_interrupts()
606 passed &= !rc; in of_unittest_parse_interrupts()
615 i, args.np->full_name, rc); in of_unittest_parse_interrupts()
624 int i, rc; in of_unittest_parse_interrupts_extended() local
635 rc = of_irq_parse_one(np, i, &args); in of_unittest_parse_interrupts_extended()
640 passed &= !rc; in of_unittest_parse_interrupts_extended()
645 passed &= !rc; in of_unittest_parse_interrupts_extended()
652 passed &= !rc; in of_unittest_parse_interrupts_extended()
658 passed &= !rc; in of_unittest_parse_interrupts_extended()
663 passed &= !rc; in of_unittest_parse_interrupts_extended()
670 passed &= !rc; in of_unittest_parse_interrupts_extended()
676 passed &= !rc; in of_unittest_parse_interrupts_extended()
685 i, args.np->full_name, rc); in of_unittest_parse_interrupts_extended()
761 int irq, rc; in of_unittest_platform_populate() local
793 rc = PTR_ERR_OR_ZERO(test_bus); in of_unittest_platform_populate()
794 unittest(!rc, "testbus registration failed; rc=%i\n", rc); in of_unittest_platform_populate()
795 if (rc) in of_unittest_platform_populate()
894 int rc; in unittest_data_add() local
916 rc = of_resolve_phandles(unittest_data_node); in unittest_data_add()
917 if (rc) { in unittest_data_add()
918 pr_err("%s: Failed to resolve phandles (rc=%i)\n", __func__, rc); in unittest_data_add()