Lines Matching refs:rc
157 int rc; in erst_exec_add_value() local
160 rc = __apei_exec_read_register(entry, &val); in erst_exec_add_value()
161 if (rc) in erst_exec_add_value()
162 return rc; in erst_exec_add_value()
164 rc = __apei_exec_write_register(entry, val); in erst_exec_add_value()
165 return rc; in erst_exec_add_value()
171 int rc; in erst_exec_subtract_value() local
174 rc = __apei_exec_read_register(entry, &val); in erst_exec_subtract_value()
175 if (rc) in erst_exec_subtract_value()
176 return rc; in erst_exec_subtract_value()
178 rc = __apei_exec_write_register(entry, val); in erst_exec_subtract_value()
179 return rc; in erst_exec_subtract_value()
202 int rc; in erst_exec_stall_while_true() local
217 rc = __apei_exec_read_register(entry, &val); in erst_exec_stall_while_true()
218 if (rc) in erst_exec_stall_while_true()
219 return rc; in erst_exec_stall_while_true()
232 int rc; in erst_exec_skip_next_instruction_if_true() local
235 rc = __apei_exec_read_register(entry, &val); in erst_exec_skip_next_instruction_if_true()
236 if (rc) in erst_exec_skip_next_instruction_if_true()
237 return rc; in erst_exec_skip_next_instruction_if_true()
268 int rc; in erst_exec_move_data() local
278 rc = __apei_exec_read_register(entry, &offset); in erst_exec_move_data()
279 if (rc) in erst_exec_move_data()
280 return rc; in erst_exec_move_data()
387 int rc; in erst_get_erange() local
390 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_RANGE); in erst_get_erange()
391 if (rc) in erst_get_erange()
392 return rc; in erst_get_erange()
394 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_LENGTH); in erst_get_erange()
395 if (rc) in erst_get_erange()
396 return rc; in erst_get_erange()
398 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_ATTRIBUTES); in erst_get_erange()
399 if (rc) in erst_get_erange()
400 return rc; in erst_get_erange()
409 int rc; in __erst_get_record_count() local
412 rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_COUNT); in __erst_get_record_count()
413 if (rc) in __erst_get_record_count()
414 return rc; in __erst_get_record_count()
453 int rc; in __erst_get_next_record_id() local
456 rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_ID); in __erst_get_next_record_id()
457 if (rc) in __erst_get_next_record_id()
458 return rc; in __erst_get_next_record_id()
466 int rc; in erst_get_record_id_begin() local
471 rc = mutex_lock_interruptible(&erst_record_id_cache.lock); in erst_get_record_id_begin()
472 if (rc) in erst_get_record_id_begin()
473 return rc; in erst_get_record_id_begin()
487 int i, rc; in __erst_record_id_cache_add_one() local
494 rc = __erst_get_next_record_id(&id); in __erst_record_id_cache_add_one()
496 if (rc == -ENOENT) in __erst_record_id_cache_add_one()
498 if (rc) in __erst_record_id_cache_add_one()
499 return rc; in __erst_record_id_cache_add_one()
558 int rc = 0; in erst_get_record_id_next() local
581 rc = __erst_record_id_cache_add_one(); in erst_get_record_id_next()
582 if (rc < 0) in erst_get_record_id_next()
585 if (rc == 1) { in erst_get_record_id_next()
588 rc = 0; in erst_get_record_id_next()
596 return rc; in erst_get_record_id_next()
642 int rc; in __erst_write_to_storage() local
645 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_WRITE); in __erst_write_to_storage()
646 if (rc) in __erst_write_to_storage()
647 return rc; in __erst_write_to_storage()
649 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_OFFSET); in __erst_write_to_storage()
650 if (rc) in __erst_write_to_storage()
651 return rc; in __erst_write_to_storage()
652 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); in __erst_write_to_storage()
653 if (rc) in __erst_write_to_storage()
654 return rc; in __erst_write_to_storage()
656 rc = apei_exec_run(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_write_to_storage()
657 if (rc) in __erst_write_to_storage()
658 return rc; in __erst_write_to_storage()
665 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_write_to_storage()
666 if (rc) in __erst_write_to_storage()
667 return rc; in __erst_write_to_storage()
669 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_write_to_storage()
670 if (rc) in __erst_write_to_storage()
671 return rc; in __erst_write_to_storage()
681 int rc; in __erst_read_from_storage() local
684 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_READ); in __erst_read_from_storage()
685 if (rc) in __erst_read_from_storage()
686 return rc; in __erst_read_from_storage()
688 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_OFFSET); in __erst_read_from_storage()
689 if (rc) in __erst_read_from_storage()
690 return rc; in __erst_read_from_storage()
692 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_ID); in __erst_read_from_storage()
693 if (rc) in __erst_read_from_storage()
694 return rc; in __erst_read_from_storage()
695 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); in __erst_read_from_storage()
696 if (rc) in __erst_read_from_storage()
697 return rc; in __erst_read_from_storage()
699 rc = apei_exec_run(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_read_from_storage()
700 if (rc) in __erst_read_from_storage()
701 return rc; in __erst_read_from_storage()
708 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_read_from_storage()
709 if (rc) in __erst_read_from_storage()
710 return rc; in __erst_read_from_storage()
712 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_read_from_storage()
713 if (rc) in __erst_read_from_storage()
714 return rc; in __erst_read_from_storage()
724 int rc; in __erst_clear_from_storage() local
727 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_CLEAR); in __erst_clear_from_storage()
728 if (rc) in __erst_clear_from_storage()
729 return rc; in __erst_clear_from_storage()
731 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_ID); in __erst_clear_from_storage()
732 if (rc) in __erst_clear_from_storage()
733 return rc; in __erst_clear_from_storage()
734 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); in __erst_clear_from_storage()
735 if (rc) in __erst_clear_from_storage()
736 return rc; in __erst_clear_from_storage()
738 rc = apei_exec_run(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_clear_from_storage()
739 if (rc) in __erst_clear_from_storage()
740 return rc; in __erst_clear_from_storage()
747 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_clear_from_storage()
748 if (rc) in __erst_clear_from_storage()
749 return rc; in __erst_clear_from_storage()
751 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_clear_from_storage()
752 if (rc) in __erst_clear_from_storage()
753 return rc; in __erst_clear_from_storage()
785 int rc; in erst_write() local
798 rc = __erst_write_to_nvram(record); in erst_write()
800 return rc; in erst_write()
813 rc = __erst_write_to_storage(0); in erst_write()
816 return rc; in erst_write()
822 int rc; in __erst_read_to_erange() local
828 rc = __erst_read_from_storage(record_id, 0); in __erst_read_to_erange()
829 if (rc) in __erst_read_to_erange()
830 return rc; in __erst_read_to_erange()
839 int rc; in __erst_read() local
843 rc = __erst_read_to_erange(record_id, &offset); in __erst_read()
844 if (rc) in __erst_read()
845 return rc; in __erst_read()
877 int rc, i; in erst_clear() local
884 rc = mutex_lock_interruptible(&erst_record_id_cache.lock); in erst_clear()
885 if (rc) in erst_clear()
886 return rc; in erst_clear()
889 rc = __erst_clear_from_nvram(record_id); in erst_clear()
891 rc = __erst_clear_from_storage(record_id); in erst_clear()
893 if (rc) in erst_clear()
903 return rc; in erst_clear()
976 int rc; in erst_open_pstore() local
981 rc = erst_get_record_id_begin(&reader_pos); in erst_open_pstore()
983 return rc; in erst_open_pstore()
997 int rc; in erst_reader() local
1008 rc = -ENOMEM; in erst_reader()
1012 rc = erst_get_record_id_next(&reader_pos, &record_id); in erst_reader()
1013 if (rc) in erst_reader()
1018 rc = -EINVAL; in erst_reader()
1027 rc = -EIO; in erst_reader()
1035 rc = -ENOMEM; in erst_reader()
1062 return (rc < 0) ? rc : (len - sizeof(*rcd)); in erst_reader()
1123 int rc = 0; in erst_init() local
1146 rc = -EINVAL; in erst_init()
1150 rc = erst_check_table(erst_tab); in erst_init()
1151 if (rc) { in erst_init()
1158 rc = apei_exec_collect_resources(&ctx, &erst_resources); in erst_init()
1159 if (rc) in erst_init()
1161 rc = apei_resources_request(&erst_resources, "APEI ERST"); in erst_init()
1162 if (rc) in erst_init()
1164 rc = apei_exec_pre_map_gars(&ctx); in erst_init()
1165 if (rc) in erst_init()
1167 rc = erst_get_erange(&erst_erange); in erst_init()
1168 if (rc) { in erst_init()
1169 if (rc == -ENODEV) in erst_init()
1183 rc = -EIO; in erst_init()
1186 rc = -ENOMEM; in erst_init()
1201 rc = pstore_register(&erst_info); in erst_init()
1202 if (rc) { in erst_init()
1203 if (rc != -EPERM) in erst_init()
1227 return rc; in erst_init()