[PATCH 0/9] interconnect: Convert to platform remove callback returning void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

this series converts all platform drivers below drivers/interconnect to
use .remove_new(). Compared to the traditional .remove() callback
.remove_new() returns no value. This is a good thing because the driver
core doesn't (and cannot) cope for errors during remove. The only effect
of a non-zero return value in .remove() is that the driver core emits a
warning. The device is removed anyhow and an early return from .remove()
usually yields resource leaks and/or use-after-free bugs.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.

All drivers converted here already returned zero unconditionally in
.remove(), so they are converted here trivially. The imx drivers could
be slightly simplified, because the remove callback only called a single
function with the same prototype as .remove_new().

Best regards
Uwe

Uwe Kleine-König (9):
  interconnect: qcom: Make qnoc_remove return void
  interconnect: imx8mm: Convert to platform remove callback returning
    void
  interconnect: imx8mn: Convert to platform remove callback returning
    void
  interconnect: imx8mp: Convert to platform remove callback returning
    void
  interconnect: imx8mq: Convert to platform remove callback returning
    void
  interconnect: qcom/msm8974: Convert to platform remove callback
    returning void
  interconnect: qcom/osm-l3: Convert to platform remove callback
    returning void
  interconnect: qcom/smd-rpm: Convert to platform remove callback
    returning void
  interconnect: exynos: Convert to platform remove callback returning
    void

 drivers/interconnect/imx/imx8mm.c     | 9 +--------
 drivers/interconnect/imx/imx8mn.c     | 9 +--------
 drivers/interconnect/imx/imx8mp.c     | 9 +--------
 drivers/interconnect/imx/imx8mq.c     | 9 +--------
 drivers/interconnect/qcom/icc-rpm.c   | 4 +---
 drivers/interconnect/qcom/icc-rpm.h   | 2 +-
 drivers/interconnect/qcom/msm8916.c   | 2 +-
 drivers/interconnect/qcom/msm8939.c   | 2 +-
 drivers/interconnect/qcom/msm8974.c   | 6 ++----
 drivers/interconnect/qcom/msm8996.c   | 2 +-
 drivers/interconnect/qcom/osm-l3.c    | 6 ++----
 drivers/interconnect/qcom/qcm2290.c   | 2 +-
 drivers/interconnect/qcom/qcs404.c    | 2 +-
 drivers/interconnect/qcom/sdm660.c    | 2 +-
 drivers/interconnect/qcom/smd-rpm.c   | 6 ++----
 drivers/interconnect/samsung/exynos.c | 6 ++----
 16 files changed, 20 insertions(+), 58 deletions(-)


base-commit: 9c2d379d63450ae464eeab45462e0cb573cd97d0
-- 
2.42.0




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux