mbox series

[0/2] tty: hvc: Convert to platform remove callback returning void

Message ID 20231105214406.3765906-4-u.kleine-koenig@pengutronix.de
Headers show
Series tty: hvc: Convert to platform remove callback returning void | expand

Message

Uwe Kleine-König Nov. 5, 2023, 9:44 p.m. UTC
Hello,

The hvc_opal driver had an error path in its remove function resulting
in returning a non-zero value. This is a bad thing because the core
doesn't do error handling and effectively ignores the return value.

In this case it's not as bad as it sounds though, as this error path is
never taken.

After the first patch changes hvc_remove() to return void the remove
function obviously always returns zero. Then it can be trivially
converted to .remove_new(). See commit 5c5a7680e67b ("platform: Provide
a remove callback that returns no value") for an extended explanation
and the eventual goal of this conversion.

Uwe Kleine-König (2):
  tty: hvc: Make hvc_remove() return no value
  tty: hvc: hvc_opal: Convert to platform remove callback returning void

 drivers/tty/hvc/hvc_console.c |  3 +--
 drivers/tty/hvc/hvc_console.h |  2 +-
 drivers/tty/hvc/hvc_opal.c    | 17 +++++++----------
 3 files changed, 9 insertions(+), 13 deletions(-)

base-commit: e27090b1413ff236ca1aec26d6b022149115de2c