Message ID | 20221118150751.469393-6-nathanl@linux.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 9aafbfa5f57a4b75bafd3bed0191e8429c5fa618 |
Headers | show |
Series | RTAS maintenance | expand |
On Fri, 2022-11-18 at 09:07 -0600, Nathan Lynch wrote: > 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. > > Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com> > Fixes: 8d633291b4fc ("powerpc/eeh: pseries platform EEH error log > retrieval") > --- > arch/powerpc/platforms/pseries/eeh_pseries.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c > b/arch/powerpc/platforms/pseries/eeh_pseries.c > index 8e40ccac0f44..e5e4f4aa5afd 100644 > --- a/arch/powerpc/platforms/pseries/eeh_pseries.c > +++ b/arch/powerpc/platforms/pseries/eeh_pseries.c > @@ -848,7 +848,7 @@ static int __init eeh_pseries_init(void) > } > > /* Initialize error log size */ > - eeh_error_buf_size = rtas_token("rtas-error-log-max"); > + eeh_error_buf_size = rtas_get_error_log_max(); > if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) { This is now impossible, and the whole block makes little sense after the next patch > pr_info("%s: unknown EEH error log size\n", > __func__);
Andrew Donnellan <ajd@linux.ibm.com> writes: > On Fri, 2022-11-18 at 09:07 -0600, Nathan Lynch wrote: >> 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. >> >> Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com> >> Fixes: 8d633291b4fc ("powerpc/eeh: pseries platform EEH error log >> retrieval") >> --- >> arch/powerpc/platforms/pseries/eeh_pseries.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c >> b/arch/powerpc/platforms/pseries/eeh_pseries.c >> index 8e40ccac0f44..e5e4f4aa5afd 100644 >> --- a/arch/powerpc/platforms/pseries/eeh_pseries.c >> +++ b/arch/powerpc/platforms/pseries/eeh_pseries.c >> @@ -848,7 +848,7 @@ static int __init eeh_pseries_init(void) >> } >> >> /* Initialize error log size */ >> - eeh_error_buf_size = rtas_token("rtas-error-log-max"); >> + eeh_error_buf_size = rtas_get_error_log_max(); >> if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) { > > This is now impossible, and the whole block makes little sense after > the next patch Indeed, will fix in v2, thanks.
diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c index 8e40ccac0f44..e5e4f4aa5afd 100644 --- a/arch/powerpc/platforms/pseries/eeh_pseries.c +++ b/arch/powerpc/platforms/pseries/eeh_pseries.c @@ -848,7 +848,7 @@ static int __init eeh_pseries_init(void) } /* Initialize error log size */ - eeh_error_buf_size = rtas_token("rtas-error-log-max"); + eeh_error_buf_size = rtas_get_error_log_max(); if (eeh_error_buf_size == RTAS_UNKNOWN_SERVICE) { pr_info("%s: unknown EEH error log size\n", __func__);
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. Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com> Fixes: 8d633291b4fc ("powerpc/eeh: pseries platform EEH error log retrieval") --- arch/powerpc/platforms/pseries/eeh_pseries.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)