Lines Matching full:rc

165 	int rc;  in erst_exec_add_value()  local
168 rc = __apei_exec_read_register(entry, &val); in erst_exec_add_value()
169 if (rc) in erst_exec_add_value()
170 return rc; in erst_exec_add_value()
172 rc = __apei_exec_write_register(entry, val); in erst_exec_add_value()
173 return rc; in erst_exec_add_value()
179 int rc; in erst_exec_subtract_value() local
182 rc = __apei_exec_read_register(entry, &val); in erst_exec_subtract_value()
183 if (rc) in erst_exec_subtract_value()
184 return rc; in erst_exec_subtract_value()
186 rc = __apei_exec_write_register(entry, val); in erst_exec_subtract_value()
187 return rc; in erst_exec_subtract_value()
210 int rc; in erst_exec_stall_while_true() local
227 rc = __apei_exec_read_register(entry, &val); in erst_exec_stall_while_true()
228 if (rc) in erst_exec_stall_while_true()
229 return rc; in erst_exec_stall_while_true()
242 int rc; in erst_exec_skip_next_instruction_if_true() local
245 rc = __apei_exec_read_register(entry, &val); in erst_exec_skip_next_instruction_if_true()
246 if (rc) in erst_exec_skip_next_instruction_if_true()
247 return rc; in erst_exec_skip_next_instruction_if_true()
278 int rc; in erst_exec_move_data() local
288 rc = __apei_exec_read_register(entry, &offset); in erst_exec_move_data()
289 if (rc) in erst_exec_move_data()
290 return rc; in erst_exec_move_data()
397 int rc; in erst_get_erange() local
400 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_RANGE); in erst_get_erange()
401 if (rc) in erst_get_erange()
402 return rc; in erst_get_erange()
404 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_LENGTH); in erst_get_erange()
405 if (rc) in erst_get_erange()
406 return rc; in erst_get_erange()
408 rc = apei_exec_run(&ctx, ACPI_ERST_GET_ERROR_ATTRIBUTES); in erst_get_erange()
409 if (rc) in erst_get_erange()
410 return rc; in erst_get_erange()
412 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_TIMINGS); in erst_get_erange()
413 if (rc == 0) in erst_get_erange()
415 else if (rc == -ENOENT) in erst_get_erange()
418 return rc; in erst_get_erange()
426 int rc; in __erst_get_record_count() local
429 rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_COUNT); in __erst_get_record_count()
430 if (rc) in __erst_get_record_count()
431 return rc; in __erst_get_record_count()
470 int rc; in __erst_get_next_record_id() local
473 rc = apei_exec_run(&ctx, ACPI_ERST_GET_RECORD_ID); in __erst_get_next_record_id()
474 if (rc) in __erst_get_next_record_id()
475 return rc; in __erst_get_next_record_id()
483 int rc; in erst_get_record_id_begin() local
488 rc = mutex_lock_interruptible(&erst_record_id_cache.lock); in erst_get_record_id_begin()
489 if (rc) in erst_get_record_id_begin()
490 return rc; in erst_get_record_id_begin()
504 int i, rc; in __erst_record_id_cache_add_one() local
511 rc = __erst_get_next_record_id(&id); in __erst_record_id_cache_add_one()
513 if (rc == -ENOENT) in __erst_record_id_cache_add_one()
515 if (rc) in __erst_record_id_cache_add_one()
516 return rc; in __erst_record_id_cache_add_one()
569 int rc = 0; in erst_get_record_id_next() local
592 rc = __erst_record_id_cache_add_one(); in erst_get_record_id_next()
593 if (rc < 0) in erst_get_record_id_next()
596 if (rc == 1) { in erst_get_record_id_next()
599 rc = 0; in erst_get_record_id_next()
607 return rc; in erst_get_record_id_next()
653 int rc; in __erst_write_to_storage() local
658 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_WRITE); in __erst_write_to_storage()
659 if (rc) in __erst_write_to_storage()
660 return rc; in __erst_write_to_storage()
662 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_OFFSET); in __erst_write_to_storage()
663 if (rc) in __erst_write_to_storage()
664 return rc; in __erst_write_to_storage()
665 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); 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(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_write_to_storage()
670 if (rc) in __erst_write_to_storage()
671 return rc; in __erst_write_to_storage()
678 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_write_to_storage()
679 if (rc) in __erst_write_to_storage()
680 return rc; in __erst_write_to_storage()
682 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_write_to_storage()
683 if (rc) in __erst_write_to_storage()
684 return rc; in __erst_write_to_storage()
694 int rc; in __erst_read_from_storage() local
699 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_READ); 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(&ctx, ACPI_ERST_SET_RECORD_OFFSET); in __erst_read_from_storage()
704 if (rc) in __erst_read_from_storage()
705 return rc; in __erst_read_from_storage()
707 rc = apei_exec_run(&ctx, ACPI_ERST_SET_RECORD_ID); in __erst_read_from_storage()
708 if (rc) in __erst_read_from_storage()
709 return rc; in __erst_read_from_storage()
710 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); in __erst_read_from_storage()
711 if (rc) in __erst_read_from_storage()
712 return rc; in __erst_read_from_storage()
714 rc = apei_exec_run(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_read_from_storage()
715 if (rc) in __erst_read_from_storage()
716 return rc; in __erst_read_from_storage()
723 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_read_from_storage()
724 if (rc) in __erst_read_from_storage()
725 return rc; in __erst_read_from_storage()
727 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_read_from_storage()
728 if (rc) in __erst_read_from_storage()
729 return rc; in __erst_read_from_storage()
739 int rc; in __erst_clear_from_storage() local
744 rc = apei_exec_run_optional(&ctx, ACPI_ERST_BEGIN_CLEAR); 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(&ctx, ACPI_ERST_SET_RECORD_ID); in __erst_clear_from_storage()
749 if (rc) in __erst_clear_from_storage()
750 return rc; in __erst_clear_from_storage()
751 rc = apei_exec_run(&ctx, ACPI_ERST_EXECUTE_OPERATION); in __erst_clear_from_storage()
752 if (rc) in __erst_clear_from_storage()
753 return rc; in __erst_clear_from_storage()
755 rc = apei_exec_run(&ctx, ACPI_ERST_CHECK_BUSY_STATUS); in __erst_clear_from_storage()
756 if (rc) in __erst_clear_from_storage()
757 return rc; in __erst_clear_from_storage()
764 rc = apei_exec_run(&ctx, ACPI_ERST_GET_COMMAND_STATUS); in __erst_clear_from_storage()
765 if (rc) in __erst_clear_from_storage()
766 return rc; in __erst_clear_from_storage()
768 rc = apei_exec_run_optional(&ctx, ACPI_ERST_END); in __erst_clear_from_storage()
769 if (rc) in __erst_clear_from_storage()
770 return rc; in __erst_clear_from_storage()
802 int rc; in erst_write() local
815 rc = __erst_write_to_nvram(record); in erst_write()
817 return rc; in erst_write()
830 rc = __erst_write_to_storage(0); in erst_write()
833 return rc; in erst_write()
839 int rc; in __erst_read_to_erange() local
845 rc = __erst_read_from_storage(record_id, 0); in __erst_read_to_erange()
846 if (rc) in __erst_read_to_erange()
847 return rc; in __erst_read_to_erange()
856 int rc; in __erst_read() local
860 rc = __erst_read_to_erange(record_id, &offset); in __erst_read()
861 if (rc) in __erst_read()
862 return rc; in __erst_read()
962 int rc, i; in erst_clear() local
969 rc = mutex_lock_interruptible(&erst_record_id_cache.lock); in erst_clear()
970 if (rc) in erst_clear()
971 return rc; in erst_clear()
974 rc = __erst_clear_from_nvram(record_id); in erst_clear()
976 rc = __erst_clear_from_storage(record_id); in erst_clear()
978 if (rc) in erst_clear()
988 return rc; in erst_clear()
1071 int rc; in erst_reader() local
1082 rc = -ENOMEM; in erst_reader()
1086 rc = erst_get_record_id_next(&reader_pos, &record_id); in erst_reader()
1087 if (rc) in erst_reader()
1092 rc = -EINVAL; in erst_reader()
1106 rc = -ENOMEM; in erst_reader()
1131 return (rc < 0) ? rc : (len - sizeof(*rcd)); in erst_reader()
1189 int rc = 0; in erst_init() local
1212 rc = -EINVAL; in erst_init()
1216 rc = erst_check_table(erst_tab); in erst_init()
1217 if (rc) { in erst_init()
1224 rc = apei_exec_collect_resources(&ctx, &erst_resources); in erst_init()
1225 if (rc) in erst_init()
1227 rc = apei_resources_request(&erst_resources, "APEI ERST"); in erst_init()
1228 if (rc) in erst_init()
1230 rc = apei_exec_pre_map_gars(&ctx); in erst_init()
1231 if (rc) in erst_init()
1233 rc = erst_get_erange(&erst_erange); in erst_init()
1234 if (rc) { in erst_init()
1235 if (rc == -ENODEV) in erst_init()
1249 rc = -EIO; in erst_init()
1252 rc = -ENOMEM; in erst_init()
1266 rc = pstore_register(&erst_info); in erst_init()
1267 if (rc) { in erst_init()
1268 if (rc != -EPERM) in erst_init()
1297 return rc; in erst_init()