Skip to content

Commit 9aafbfa

Browse files
nathanlynchmpe
authored andcommitted
powerpc/pseries/eeh: use correct API for error log size
rtas-error-log-max is not the name of an RTAS function, so rtas_token() is not the appropriate API for retrieving its value. We already have rtas_get_error_log_max() which returns a sensible value if the property is absent for any reason, so use that instead. Fixes: 8d63329 ("powerpc/eeh: pseries platform EEH error log retrieval") Signed-off-by: Nathan Lynch <[email protected]> [mpe: Drop no-longer possible error handling as noticed by ajd] Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6c606e5 commit 9aafbfa

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

arch/powerpc/platforms/pseries/eeh_pseries.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -848,16 +848,7 @@ static int __init eeh_pseries_init(void)
848848
}
849849

850850
/* Initialize error log size */
851-
eeh_error_buf_size = rtas_token("rtas-error-log-max");
852-
if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) {
853-
pr_info("%s: unknown EEH error log size\n",
854-
__func__);
855-
eeh_error_buf_size = 1024;
856-
} else if (eeh_error_buf_size > RTAS_ERROR_LOG_MAX) {
857-
pr_info("%s: EEH error log size %d exceeds the maximal %d\n",
858-
__func__, eeh_error_buf_size, RTAS_ERROR_LOG_MAX);
859-
eeh_error_buf_size = RTAS_ERROR_LOG_MAX;
860-
}
851+
eeh_error_buf_size = rtas_get_error_log_max();
861852

862853
/* Set EEH probe mode */
863854
eeh_add_flag(EEH_PROBE_MODE_DEVTREE | EEH_ENABLE_IO_FOR_LOG);

0 commit comments

Comments
 (0)