Lines Matching refs:rc

154 	int rc;  in erst_exec_add_value()  local
157 rc = __apei_exec_read_register(entry, &val); in erst_exec_add_value()
158 if (rc) in erst_exec_add_value()
159 return rc; in erst_exec_add_value()
161 rc = __apei_exec_write_register(entry, val); in erst_exec_add_value()
162 return rc; in erst_exec_add_value()
168 int rc; in erst_exec_subtract_value() local
171 rc = __apei_exec_read_register(entry, &val); in erst_exec_subtract_value()
172 if (rc) in erst_exec_subtract_value()
173 return rc; in erst_exec_subtract_value()
175 rc = __apei_exec_write_register(entry, val); in erst_exec_subtract_value()
176 return rc; in erst_exec_subtract_value()
199 int rc; in erst_exec_stall_while_true() local
214 rc = __apei_exec_read_register(entry, &val); in erst_exec_stall_while_true()
215 if (rc) in erst_exec_stall_while_true()
216 return rc; in erst_exec_stall_while_true()
229 int rc; in erst_exec_skip_next_instruction_if_true() local
232 rc = __apei_exec_read_register(entry, &val); in erst_exec_skip_next_instruction_if_true()
233 if (rc) in erst_exec_skip_next_instruction_if_true()
234 return rc; in erst_exec_skip_next_instruction_if_true()
265 int rc; in erst_exec_move_data() local
275 rc = __apei_exec_read_register(entry, &offset); in erst_exec_move_data()
276 if (rc) in erst_exec_move_data()
277 return rc; in erst_exec_move_data()
384 int rc; in erst_get_erange() local
387 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_RANGE); in erst_get_erange()
388 if (rc) in erst_get_erange()
389 return rc; in erst_get_erange()
391 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_LENGTH); in erst_get_erange()
392 if (rc) in erst_get_erange()
393 return rc; in erst_get_erange()
395 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_ATTRIBUTES); in erst_get_erange()
396 if (rc) in erst_get_erange()
397 return rc; in erst_get_erange()
406 int rc; in __erst_get_record_count() local
409 rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_COUNT); in __erst_get_record_count()
410 if (rc) in __erst_get_record_count()
411 return rc; in __erst_get_record_count()
450 int rc; in __erst_get_next_record_id() local
453 rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_ID); in __erst_get_next_record_id()
454 if (rc) in __erst_get_next_record_id()
455 return rc; in __erst_get_next_record_id()
463 int rc; in erst_get_record_id_begin() local
468 rc = mutex_lock_interruptible(&erst_record_id_cache.lock); in erst_get_record_id_begin()
469 if (rc) in erst_get_record_id_begin()
470 return rc; in erst_get_record_id_begin()
484 int i, rc; in __erst_record_id_cache_add_one() local
491 rc = __erst_get_next_record_id(&id); in __erst_record_id_cache_add_one()
493 if (rc == -ENOENT) in __erst_record_id_cache_add_one()
495 if (rc) in __erst_record_id_cache_add_one()
496 return rc; in __erst_record_id_cache_add_one()
555 int rc = 0; in erst_get_record_id_next() local
578 rc = __erst_record_id_cache_add_one(); in erst_get_record_id_next()
579 if (rc < 0) in erst_get_record_id_next()
582 if (rc == 1) { in erst_get_record_id_next()
585 rc = 0; in erst_get_record_id_next()
593 return rc; in erst_get_record_id_next()
639 int rc; in __erst_write_to_storage() local
642 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_WRITE); in __erst_write_to_storage()
643 if (rc) in __erst_write_to_storage()
644 return rc; in __erst_write_to_storage()
646 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_OFFSET); in __erst_write_to_storage()
647 if (rc) in __erst_write_to_storage()
648 return rc; in __erst_write_to_storage()
649 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); 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(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_write_to_storage()
654 if (rc) in __erst_write_to_storage()
655 return rc; in __erst_write_to_storage()
662 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_write_to_storage()
663 if (rc) in __erst_write_to_storage()
664 return rc; in __erst_write_to_storage()
666 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_write_to_storage()
667 if (rc) in __erst_write_to_storage()
668 return rc; in __erst_write_to_storage()
678 int rc; in __erst_read_from_storage() local
681 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_READ); in __erst_read_from_storage()
682 if (rc) in __erst_read_from_storage()
683 return rc; in __erst_read_from_storage()
685 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_OFFSET); in __erst_read_from_storage()
686 if (rc) in __erst_read_from_storage()
687 return rc; in __erst_read_from_storage()
689 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_ID); in __erst_read_from_storage()
690 if (rc) in __erst_read_from_storage()
691 return rc; in __erst_read_from_storage()
692 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); 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(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_read_from_storage()
697 if (rc) in __erst_read_from_storage()
698 return rc; in __erst_read_from_storage()
705 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_read_from_storage()
706 if (rc) in __erst_read_from_storage()
707 return rc; in __erst_read_from_storage()
709 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_read_from_storage()
710 if (rc) in __erst_read_from_storage()
711 return rc; in __erst_read_from_storage()
721 int rc; in __erst_clear_from_storage() local
724 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_CLEAR); in __erst_clear_from_storage()
725 if (rc) in __erst_clear_from_storage()
726 return rc; in __erst_clear_from_storage()
728 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_ID); in __erst_clear_from_storage()
729 if (rc) in __erst_clear_from_storage()
730 return rc; in __erst_clear_from_storage()
731 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); 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(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_clear_from_storage()
736 if (rc) in __erst_clear_from_storage()
737 return rc; in __erst_clear_from_storage()
744 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_clear_from_storage()
745 if (rc) in __erst_clear_from_storage()
746 return rc; in __erst_clear_from_storage()
748 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_clear_from_storage()
749 if (rc) in __erst_clear_from_storage()
750 return rc; in __erst_clear_from_storage()
782 int rc; in erst_write() local
795 rc = __erst_write_to_nvram(record); in erst_write()
797 return rc; in erst_write()
810 rc = __erst_write_to_storage(0); in erst_write()
813 return rc; in erst_write()
819 int rc; in __erst_read_to_erange() local
825 rc = __erst_read_from_storage(record_id, 0); in __erst_read_to_erange()
826 if (rc) in __erst_read_to_erange()
827 return rc; in __erst_read_to_erange()
836 int rc; in __erst_read() local
840 rc = __erst_read_to_erange(record_id, &offset); in __erst_read()
841 if (rc) in __erst_read()
842 return rc; in __erst_read()
874 int rc, i; in erst_clear() local
881 rc = mutex_lock_interruptible(&erst_record_id_cache.lock); in erst_clear()
882 if (rc) in erst_clear()
883 return rc; in erst_clear()
886 rc = __erst_clear_from_nvram(record_id); in erst_clear()
888 rc = __erst_clear_from_storage(record_id); in erst_clear()
890 if (rc) in erst_clear()
900 return rc; in erst_clear()
973 int rc; in erst_open_pstore() local
978 rc = erst_get_record_id_begin(&reader_pos); in erst_open_pstore()
980 return rc; in erst_open_pstore()
994 int rc; in erst_reader() local
1005 rc = -ENOMEM; in erst_reader()
1009 rc = erst_get_record_id_next(&reader_pos, &record_id); in erst_reader()
1010 if (rc) in erst_reader()
1015 rc = -EINVAL; in erst_reader()
1024 rc = -EIO; in erst_reader()
1032 rc = -ENOMEM; in erst_reader()
1059 return (rc < 0) ? rc : (len - sizeof(*rcd)); in erst_reader()
1120 int rc = 0; in erst_init() local
1143 rc = -EINVAL; in erst_init()
1147 rc = erst_check_table(erst_tab); in erst_init()
1148 if (rc) { in erst_init()
1155 rc = apei_exec_collect_resources(&ctx, &erst_resources); in erst_init()
1156 if (rc) in erst_init()
1158 rc = apei_resources_request(&erst_resources, "APEI ERST"); in erst_init()
1159 if (rc) in erst_init()
1161 rc = apei_exec_pre_map_gars(&ctx); in erst_init()
1162 if (rc) in erst_init()
1164 rc = erst_get_erange(&erst_erange); in erst_init()
1165 if (rc) { in erst_init()
1166 if (rc == -ENODEV) in erst_init()
1180 rc = -EIO; in erst_init()
1183 rc = -ENOMEM; in erst_init()
1198 rc = pstore_register(&erst_info); in erst_init()
1199 if (rc) { in erst_init()
1200 if (rc != -EPERM) in erst_init()
1224 return rc; in erst_init()