Lines Matching refs:rc
155 int rc; in erst_exec_add_value() local
158 rc = __apei_exec_read_register(entry, &val); in erst_exec_add_value()
159 if (rc) in erst_exec_add_value()
160 return rc; in erst_exec_add_value()
162 rc = __apei_exec_write_register(entry, val); in erst_exec_add_value()
163 return rc; in erst_exec_add_value()
169 int rc; in erst_exec_subtract_value() local
172 rc = __apei_exec_read_register(entry, &val); in erst_exec_subtract_value()
173 if (rc) in erst_exec_subtract_value()
174 return rc; in erst_exec_subtract_value()
176 rc = __apei_exec_write_register(entry, val); in erst_exec_subtract_value()
177 return rc; in erst_exec_subtract_value()
200 int rc; in erst_exec_stall_while_true() local
215 rc = __apei_exec_read_register(entry, &val); in erst_exec_stall_while_true()
216 if (rc) in erst_exec_stall_while_true()
217 return rc; in erst_exec_stall_while_true()
230 int rc; in erst_exec_skip_next_instruction_if_true() local
233 rc = __apei_exec_read_register(entry, &val); in erst_exec_skip_next_instruction_if_true()
234 if (rc) in erst_exec_skip_next_instruction_if_true()
235 return rc; in erst_exec_skip_next_instruction_if_true()
266 int rc; in erst_exec_move_data() local
276 rc = __apei_exec_read_register(entry, &offset); in erst_exec_move_data()
277 if (rc) in erst_exec_move_data()
278 return rc; in erst_exec_move_data()
385 int rc; in erst_get_erange() local
388 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_RANGE); in erst_get_erange()
389 if (rc) in erst_get_erange()
390 return rc; in erst_get_erange()
392 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_LENGTH); in erst_get_erange()
393 if (rc) in erst_get_erange()
394 return rc; in erst_get_erange()
396 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_ATTRIBUTES); in erst_get_erange()
397 if (rc) in erst_get_erange()
398 return rc; in erst_get_erange()
407 int rc; in __erst_get_record_count() local
410 rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_COUNT); in __erst_get_record_count()
411 if (rc) in __erst_get_record_count()
412 return rc; in __erst_get_record_count()
451 int rc; in __erst_get_next_record_id() local
454 rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_ID); in __erst_get_next_record_id()
455 if (rc) in __erst_get_next_record_id()
456 return rc; in __erst_get_next_record_id()
464 int rc; in erst_get_record_id_begin() local
469 rc = mutex_lock_interruptible(&erst_record_id_cache.lock); in erst_get_record_id_begin()
470 if (rc) in erst_get_record_id_begin()
471 return rc; in erst_get_record_id_begin()
485 int i, rc; in __erst_record_id_cache_add_one() local
492 rc = __erst_get_next_record_id(&id); in __erst_record_id_cache_add_one()
494 if (rc == -ENOENT) in __erst_record_id_cache_add_one()
496 if (rc) in __erst_record_id_cache_add_one()
497 return rc; in __erst_record_id_cache_add_one()
549 int rc = 0; in erst_get_record_id_next() local
572 rc = __erst_record_id_cache_add_one(); in erst_get_record_id_next()
573 if (rc < 0) in erst_get_record_id_next()
576 if (rc == 1) { in erst_get_record_id_next()
579 rc = 0; in erst_get_record_id_next()
587 return rc; in erst_get_record_id_next()
633 int rc; in __erst_write_to_storage() local
636 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_WRITE); in __erst_write_to_storage()
637 if (rc) in __erst_write_to_storage()
638 return rc; in __erst_write_to_storage()
640 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_OFFSET); in __erst_write_to_storage()
641 if (rc) in __erst_write_to_storage()
642 return rc; in __erst_write_to_storage()
643 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); in __erst_write_to_storage()
644 if (rc) in __erst_write_to_storage()
645 return rc; in __erst_write_to_storage()
647 rc = apei_exec_run(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_write_to_storage()
648 if (rc) in __erst_write_to_storage()
649 return rc; in __erst_write_to_storage()
656 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_write_to_storage()
657 if (rc) in __erst_write_to_storage()
658 return rc; in __erst_write_to_storage()
660 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_write_to_storage()
661 if (rc) in __erst_write_to_storage()
662 return rc; in __erst_write_to_storage()
672 int rc; in __erst_read_from_storage() local
675 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_READ); in __erst_read_from_storage()
676 if (rc) in __erst_read_from_storage()
677 return rc; in __erst_read_from_storage()
679 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_OFFSET); in __erst_read_from_storage()
680 if (rc) in __erst_read_from_storage()
681 return rc; in __erst_read_from_storage()
683 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_ID); in __erst_read_from_storage()
684 if (rc) in __erst_read_from_storage()
685 return rc; in __erst_read_from_storage()
686 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); in __erst_read_from_storage()
687 if (rc) in __erst_read_from_storage()
688 return rc; in __erst_read_from_storage()
690 rc = apei_exec_run(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_read_from_storage()
691 if (rc) in __erst_read_from_storage()
692 return rc; in __erst_read_from_storage()
699 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_read_from_storage()
700 if (rc) in __erst_read_from_storage()
701 return rc; in __erst_read_from_storage()
703 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_read_from_storage()
704 if (rc) in __erst_read_from_storage()
705 return rc; in __erst_read_from_storage()
715 int rc; in __erst_clear_from_storage() local
718 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_CLEAR); in __erst_clear_from_storage()
719 if (rc) in __erst_clear_from_storage()
720 return rc; in __erst_clear_from_storage()
722 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_ID); in __erst_clear_from_storage()
723 if (rc) in __erst_clear_from_storage()
724 return rc; in __erst_clear_from_storage()
725 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); in __erst_clear_from_storage()
726 if (rc) in __erst_clear_from_storage()
727 return rc; in __erst_clear_from_storage()
729 rc = apei_exec_run(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_clear_from_storage()
730 if (rc) in __erst_clear_from_storage()
731 return rc; in __erst_clear_from_storage()
738 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_clear_from_storage()
739 if (rc) in __erst_clear_from_storage()
740 return rc; in __erst_clear_from_storage()
742 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_clear_from_storage()
743 if (rc) in __erst_clear_from_storage()
744 return rc; in __erst_clear_from_storage()
776 int rc; in erst_write() local
789 rc = __erst_write_to_nvram(record); in erst_write()
791 return rc; in erst_write()
804 rc = __erst_write_to_storage(0); in erst_write()
807 return rc; in erst_write()
813 int rc; in __erst_read_to_erange() local
819 rc = __erst_read_from_storage(record_id, 0); in __erst_read_to_erange()
820 if (rc) in __erst_read_to_erange()
821 return rc; in __erst_read_to_erange()
830 int rc; in __erst_read() local
834 rc = __erst_read_to_erange(record_id, &offset); in __erst_read()
835 if (rc) in __erst_read()
836 return rc; in __erst_read()
868 int rc, i; in erst_clear() local
875 rc = mutex_lock_interruptible(&erst_record_id_cache.lock); in erst_clear()
876 if (rc) in erst_clear()
877 return rc; in erst_clear()
880 rc = __erst_clear_from_nvram(record_id); in erst_clear()
882 rc = __erst_clear_from_storage(record_id); in erst_clear()
884 if (rc) in erst_clear()
894 return rc; in erst_clear()
962 int rc; in erst_open_pstore() local
967 rc = erst_get_record_id_begin(&reader_pos); in erst_open_pstore()
969 return rc; in erst_open_pstore()
981 int rc; in erst_reader() local
992 rc = -ENOMEM; in erst_reader()
996 rc = erst_get_record_id_next(&reader_pos, &record_id); in erst_reader()
997 if (rc) in erst_reader()
1002 rc = -EINVAL; in erst_reader()
1011 rc = -EIO; in erst_reader()
1019 rc = -ENOMEM; in erst_reader()
1047 return (rc < 0) ? rc : (len - sizeof(*rcd)); in erst_reader()
1105 int rc = 0; in erst_init() local
1128 rc = -EINVAL; in erst_init()
1132 rc = erst_check_table(erst_tab); in erst_init()
1133 if (rc) { in erst_init()
1140 rc = apei_exec_collect_resources(&ctx, &erst_resources); in erst_init()
1141 if (rc) in erst_init()
1143 rc = apei_resources_request(&erst_resources, "APEI ERST"); in erst_init()
1144 if (rc) in erst_init()
1146 rc = apei_exec_pre_map_gars(&ctx); in erst_init()
1147 if (rc) in erst_init()
1149 rc = erst_get_erange(&erst_erange); in erst_init()
1150 if (rc) { in erst_init()
1151 if (rc == -ENODEV) in erst_init()
1165 rc = -EIO; in erst_init()
1168 rc = -ENOMEM; in erst_init()
1182 rc = pstore_register(&erst_info); in erst_init()
1183 if (rc) { in erst_init()
1184 if (rc != -EPERM) in erst_init()
1211 return rc; in erst_init()