summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/stm32-usart.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2022-12-15 17:54:24 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-19 16:24:59 +0100
commit5342ab0af45064cbdc773645b93ab70c24ee161f (patch)
treefadfcd149e1bac0f9c2d68589460f0db88315e7f /drivers/tty/serial/stm32-usart.c
parent5bfdd3c654bd879bff50c2e85e42f85ae698b42f (diff)
downloadlinux-5342ab0af45064cbdc773645b93ab70c24ee161f.tar.bz2
tty: serial: qcom_geni: avoid duplicate struct member init
When -Woverride-init is enabled in a build, gcc points out that qcom_geni_serial_pm_ops contains conflicting initializers: drivers/tty/serial/qcom_geni_serial.c:1586:20: error: initialized field overwritten [-Werror=override-init] 1586 | .restore = qcom_geni_serial_sys_hib_resume, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/tty/serial/qcom_geni_serial.c:1586:20: note: (near initialization for 'qcom_geni_serial_pm_ops.restore') drivers/tty/serial/qcom_geni_serial.c:1587:17: error: initialized field overwritten [-Werror=override-init] 1587 | .thaw = qcom_geni_serial_sys_hib_resume, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Open-code the initializers with the version that was already used, and use the pm_sleep_ptr() method to deal with unused ones, in place of the __maybe_unused annotation. Fixes: 35781d8356a2 ("tty: serial: qcom-geni-serial: Add support for Hibernation feature") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20221215165453.1864836-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/stm32-usart.c')
0 files changed, 0 insertions, 0 deletions