diff options
author | Nathan Lynch <nathanl@linux.ibm.com> | 2022-11-18 16:07:44 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-12-07 12:40:42 +0100 |
commit | c67a0e411d0ffe0648fe84e25e9f899ce770feb3 (patch) | |
tree | da7ef2a1bbe78b18f9a3254052950a565432a53b /drivers/spi/spi-slave-time.c | |
parent | powerpc/pseries/eeh: use correct API for error log size (diff) | |
download | linux-c67a0e411d0ffe0648fe84e25e9f899ce770feb3.tar.xz linux-c67a0e411d0ffe0648fe84e25e9f899ce770feb3.zip |
powerpc/rtas: clean up rtas_error_log_max initialization
The code in rtas_get_error_log_max() doesn't cause problems in
practice, but there are no measures to ensure that the lazy
initialization of the static rtas_error_log_max variable is atomic,
and it's not worth adding them.
Initialize the static rtas_error_log_max variable at boot when we're
single-threaded instead of lazily on first use. Use the more
appropriate of_property_read_u32() API instead of rtas_token() to
consult the "rtas-error-log-max" property, which is not the name of an
RTAS function. Convert use of printk() to pr_warn() and distinguish
the possible error cases.
Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221118150751.469393-7-nathanl@linux.ibm.com
Diffstat (limited to 'drivers/spi/spi-slave-time.c')
0 files changed, 0 insertions, 0 deletions