Lines Matching refs:rc
147 int rc; in erst_exec_add_value() local
150 rc = __apei_exec_read_register(entry, &val); in erst_exec_add_value()
151 if (rc) in erst_exec_add_value()
152 return rc; in erst_exec_add_value()
154 rc = __apei_exec_write_register(entry, val); in erst_exec_add_value()
155 return rc; in erst_exec_add_value()
161 int rc; in erst_exec_subtract_value() local
164 rc = __apei_exec_read_register(entry, &val); in erst_exec_subtract_value()
165 if (rc) in erst_exec_subtract_value()
166 return rc; in erst_exec_subtract_value()
168 rc = __apei_exec_write_register(entry, val); in erst_exec_subtract_value()
169 return rc; in erst_exec_subtract_value()
192 int rc; in erst_exec_stall_while_true() local
207 rc = __apei_exec_read_register(entry, &val); in erst_exec_stall_while_true()
208 if (rc) in erst_exec_stall_while_true()
209 return rc; in erst_exec_stall_while_true()
222 int rc; in erst_exec_skip_next_instruction_if_true() local
225 rc = __apei_exec_read_register(entry, &val); in erst_exec_skip_next_instruction_if_true()
226 if (rc) in erst_exec_skip_next_instruction_if_true()
227 return rc; in erst_exec_skip_next_instruction_if_true()
258 int rc; in erst_exec_move_data() local
268 rc = __apei_exec_read_register(entry, &offset); in erst_exec_move_data()
269 if (rc) in erst_exec_move_data()
270 return rc; in erst_exec_move_data()
377 int rc; in erst_get_erange() local
380 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_RANGE); in erst_get_erange()
381 if (rc) in erst_get_erange()
382 return rc; in erst_get_erange()
384 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_LENGTH); in erst_get_erange()
385 if (rc) in erst_get_erange()
386 return rc; in erst_get_erange()
388 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_ATTRIBUTES); in erst_get_erange()
389 if (rc) in erst_get_erange()
390 return rc; in erst_get_erange()
399 int rc; in __erst_get_record_count() local
402 rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_COUNT); in __erst_get_record_count()
403 if (rc) in __erst_get_record_count()
404 return rc; in __erst_get_record_count()
443 int rc; in __erst_get_next_record_id() local
446 rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_ID); in __erst_get_next_record_id()
447 if (rc) in __erst_get_next_record_id()
448 return rc; in __erst_get_next_record_id()
456 int rc; in erst_get_record_id_begin() local
461 rc = mutex_lock_interruptible(&erst_record_id_cache.lock); in erst_get_record_id_begin()
462 if (rc) in erst_get_record_id_begin()
463 return rc; in erst_get_record_id_begin()
477 int i, rc; in __erst_record_id_cache_add_one() local
484 rc = __erst_get_next_record_id(&id); in __erst_record_id_cache_add_one()
486 if (rc == -ENOENT) in __erst_record_id_cache_add_one()
488 if (rc) in __erst_record_id_cache_add_one()
489 return rc; in __erst_record_id_cache_add_one()
542 int rc = 0; in erst_get_record_id_next() local
565 rc = __erst_record_id_cache_add_one(); in erst_get_record_id_next()
566 if (rc < 0) in erst_get_record_id_next()
569 if (rc == 1) { in erst_get_record_id_next()
572 rc = 0; in erst_get_record_id_next()
580 return rc; in erst_get_record_id_next()
626 int rc; in __erst_write_to_storage() local
629 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_WRITE); in __erst_write_to_storage()
630 if (rc) in __erst_write_to_storage()
631 return rc; in __erst_write_to_storage()
633 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_OFFSET); in __erst_write_to_storage()
634 if (rc) in __erst_write_to_storage()
635 return rc; in __erst_write_to_storage()
636 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); 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_CHECK_BUSY_STATUS); in __erst_write_to_storage()
641 if (rc) in __erst_write_to_storage()
642 return rc; in __erst_write_to_storage()
649 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_write_to_storage()
650 if (rc) in __erst_write_to_storage()
651 return rc; in __erst_write_to_storage()
653 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_write_to_storage()
654 if (rc) in __erst_write_to_storage()
655 return rc; in __erst_write_to_storage()
665 int rc; in __erst_read_from_storage() local
668 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_READ); in __erst_read_from_storage()
669 if (rc) in __erst_read_from_storage()
670 return rc; in __erst_read_from_storage()
672 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_OFFSET); in __erst_read_from_storage()
673 if (rc) in __erst_read_from_storage()
674 return rc; in __erst_read_from_storage()
676 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_ID); in __erst_read_from_storage()
677 if (rc) in __erst_read_from_storage()
678 return rc; in __erst_read_from_storage()
679 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); 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_CHECK_BUSY_STATUS); in __erst_read_from_storage()
684 if (rc) in __erst_read_from_storage()
685 return rc; in __erst_read_from_storage()
692 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_read_from_storage()
693 if (rc) in __erst_read_from_storage()
694 return rc; in __erst_read_from_storage()
696 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_read_from_storage()
697 if (rc) in __erst_read_from_storage()
698 return rc; in __erst_read_from_storage()
708 int rc; in __erst_clear_from_storage() local
711 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_CLEAR); in __erst_clear_from_storage()
712 if (rc) in __erst_clear_from_storage()
713 return rc; in __erst_clear_from_storage()
715 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_ID); in __erst_clear_from_storage()
716 if (rc) in __erst_clear_from_storage()
717 return rc; in __erst_clear_from_storage()
718 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); 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_CHECK_BUSY_STATUS); in __erst_clear_from_storage()
723 if (rc) in __erst_clear_from_storage()
724 return rc; in __erst_clear_from_storage()
731 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_clear_from_storage()
732 if (rc) in __erst_clear_from_storage()
733 return rc; in __erst_clear_from_storage()
735 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_clear_from_storage()
736 if (rc) in __erst_clear_from_storage()
737 return rc; in __erst_clear_from_storage()
769 int rc; in erst_write() local
782 rc = __erst_write_to_nvram(record); in erst_write()
784 return rc; in erst_write()
797 rc = __erst_write_to_storage(0); in erst_write()
800 return rc; in erst_write()
806 int rc; in __erst_read_to_erange() local
812 rc = __erst_read_from_storage(record_id, 0); in __erst_read_to_erange()
813 if (rc) in __erst_read_to_erange()
814 return rc; in __erst_read_to_erange()
823 int rc; in __erst_read() local
827 rc = __erst_read_to_erange(record_id, &offset); in __erst_read()
828 if (rc) in __erst_read()
829 return rc; in __erst_read()
861 int rc, i; in erst_clear() local
868 rc = mutex_lock_interruptible(&erst_record_id_cache.lock); in erst_clear()
869 if (rc) in erst_clear()
870 return rc; in erst_clear()
873 rc = __erst_clear_from_nvram(record_id); in erst_clear()
875 rc = __erst_clear_from_storage(record_id); in erst_clear()
877 if (rc) in erst_clear()
887 return rc; in erst_clear()
955 int rc; in erst_open_pstore() local
960 rc = erst_get_record_id_begin(&reader_pos); in erst_open_pstore()
962 return rc; in erst_open_pstore()
974 int rc; in erst_reader() local
985 rc = -ENOMEM; in erst_reader()
989 rc = erst_get_record_id_next(&reader_pos, &record_id); in erst_reader()
990 if (rc) in erst_reader()
995 rc = -EINVAL; in erst_reader()
1004 rc = -EIO; in erst_reader()
1012 rc = -ENOMEM; in erst_reader()
1037 return (rc < 0) ? rc : (len - sizeof(*rcd)); in erst_reader()
1095 int rc = 0; in erst_init() local
1118 rc = -EINVAL; in erst_init()
1122 rc = erst_check_table(erst_tab); in erst_init()
1123 if (rc) { in erst_init()
1130 rc = apei_exec_collect_resources(&ctx, &erst_resources); in erst_init()
1131 if (rc) in erst_init()
1133 rc = apei_resources_request(&erst_resources, "APEI ERST"); in erst_init()
1134 if (rc) in erst_init()
1136 rc = apei_exec_pre_map_gars(&ctx); in erst_init()
1137 if (rc) in erst_init()
1139 rc = erst_get_erange(&erst_erange); in erst_init()
1140 if (rc) { in erst_init()
1141 if (rc == -ENODEV) in erst_init()
1155 rc = -EIO; in erst_init()
1158 rc = -ENOMEM; in erst_init()
1172 rc = pstore_register(&erst_info); in erst_init()
1173 if (rc) { in erst_init()
1174 if (rc != -EPERM) in erst_init()
1203 return rc; in erst_init()