mbox series

[0/3] spi: atmel-quadspi: Convert to platform remove callback returning void

Message ID 20230317084232.142257-1-u.kleine-koenig@pengutronix.de (mailing list archive)
Headers show
Series spi: atmel-quadspi: Convert to platform remove callback returning void | expand

Message

Uwe Kleine-König March 17, 2023, 8:42 a.m. UTC
Hello,

this series converts the atmel-quadspi driver to use the .remove_new()
callback that doesn't return an int but void. The motivation is to not
give driver authors a reason to (wrongly) believe that returning an
error code was sensible error handling. In fact the spi core only emits
a warning message in this case and otherwise continues as if the return
value was zero. This usually yields resource leaks that sometimes can
lead to exceptions later on.

The atmel-quadspi driver is one of these drivers that got error handling
wrong, this is fixed here and in the last patch the driver is converted
to .remove_new() with the eventual goal to change .remove() to return
void once all drivers are converted this way.

Best regards
Uwe

Uwe Kleine-König (3):
  spi: atmel-quadspi: Don't leak clk enable count in pm resume
  spi: atmel-quadspi: Free resources even if runtime resume failed in
    .remove()
  spi: atmel-quadspi: Convert to platform remove callback returning void

 drivers/spi/atmel-quadspi.c | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)


base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6

Comments

Mark Brown March 17, 2023, 5:44 p.m. UTC | #1
On Fri, 17 Mar 2023 09:42:29 +0100, Uwe Kleine-König wrote:
> this series converts the atmel-quadspi driver to use the .remove_new()
> callback that doesn't return an int but void. The motivation is to not
> give driver authors a reason to (wrongly) believe that returning an
> error code was sensible error handling. In fact the spi core only emits
> a warning message in this case and otherwise continues as if the return
> value was zero. This usually yields resource leaks that sometimes can
> lead to exceptions later on.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/3] spi: atmel-quadspi: Don't leak clk enable count in pm resume
      commit: c18bbac353ffed50be134b0a2a059a2bd540c503
[2/3] spi: atmel-quadspi: Free resources even if runtime resume failed in .remove()
      commit: 9448bc1dee65f86c0fe64d9dea8b410af0586886
[3/3] spi: atmel-quadspi: Convert to platform remove callback returning void
      commit: 4d70dd0a25081bc4e6378d0da4a7c367389df707

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark