Ren Zhijie dfdabd3856 serial: stm32: Fix unused-variable warning
If CONFIG_SERIAL_EARLYCON and CONFIG_OF are both not set,
gcc warns about unused variable:

drivers/tty/serial/stm32-usart.c:83:32: error: ‘stm32h7_info’ defined but not used [-Werror=unused-variable]
 static struct stm32_usart_info stm32h7_info = {
                                ^~~~~~~~~~~~
drivers/tty/serial/stm32-usart.c:61:32: error: ‘stm32f7_info’ defined but not used [-Werror=unused-variable]
 static struct stm32_usart_info stm32f7_info = {
                                ^~~~~~~~~~~~
drivers/tty/serial/stm32-usart.c:40:32: error: ‘stm32f4_info’ defined but not used [-Werror=unused-variable]
 static struct stm32_usart_info stm32f4_info = {
                                ^~~~~~~~~~~~
cc1: all warnings being treated as errors

Mark these variables as __maybe_unused  to fix this.

Fixes: c7039ce904c0 ("serial: stm32: make info structs static to avoid sparse warnings")
Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
Link: https://lore.kernel.org/r/20220926025826.44145-1-renzhijie2@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-30 14:57:47 +02:00
..
2022-09-22 16:12:34 +02:00
2021-07-27 12:17:21 +02:00
2022-01-31 14:30:06 +01:00
2022-09-05 07:59:28 +02:00
2021-07-27 12:17:21 +02:00
2021-10-21 12:35:35 +02:00
2021-10-21 12:35:35 +02:00
2022-09-22 16:12:34 +02:00
2021-07-27 12:17:21 +02:00
2022-09-22 16:12:34 +02:00
2022-09-22 16:12:34 +02:00
2021-07-27 12:17:21 +02:00