linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] tty: hvc: Convert to platform remove callback returning void
@ 2023-11-05 21:44 Uwe Kleine-König
  2023-11-05 21:44 ` [PATCH 1/2] tty: hvc: Make hvc_remove() return no value Uwe Kleine-König
  2023-11-05 21:44 ` [PATCH 2/2] tty: hvc: hvc_opal: Convert to platform remove callback returning void Uwe Kleine-König
  0 siblings, 2 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2023-11-05 21:44 UTC (permalink / raw)
  To: Michael Ellerman, Greg Kroah-Hartman, Jiri Slaby
  Cc: kernel, linuxppc-dev, Nicholas Piggin, linux-serial

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
-- 
2.42.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-13 10:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-05 21:44 [PATCH 0/2] tty: hvc: Convert to platform remove callback returning void Uwe Kleine-König
2023-11-05 21:44 ` [PATCH 1/2] tty: hvc: Make hvc_remove() return no value Uwe Kleine-König
2023-11-13  9:45   ` Nicholas Piggin
2023-11-13  9:57     ` Uwe Kleine-König
2023-11-13 10:24       ` Nicholas Piggin
2023-11-05 21:44 ` [PATCH 2/2] tty: hvc: hvc_opal: Convert to platform remove callback returning void Uwe Kleine-König
2023-11-13  9:45   ` Nicholas Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).