[PATCH 00/29] platform/x86: Convert to platform remove callback returning void

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

 



Hello,

this patch series adapts the platform drivers below drivers/platform/x86
to use the .remove_new() callback. 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 a resource leak.

By changing the remove callback to return void driver authors cannot
reasonably assume any more that there is some kind of cleanup later.

All drivers touched here returned zero unconditionally in their remove
callback, so they could all be converted trivially to .remove_new().

Note that this series depends on commit 5c5a7680e67b ("platform: Provide
a remove callback that returns no value") that is already in Linus' tree
but not yet included in a tagged version.

Best regards
Uwe

Uwe Kleine-König (29):
  platform/x86: acer-wmi: Convert to platform remove callback returning void
  platform/x86: adv_swbutton: Convert to platform remove callback returning void
  platform/x86: amd: hsmp: Convert to platform remove callback returning void
  platform/x86: amd: pmc: Convert to platform remove callback returning void
  platform/x86: amd: pmf: core: Convert to platform remove callback returning void
  platform/x86: amilo-rfkill: Convert to platform remove callback returning void
  platform/x86: barco-p50-gpio: Convert to platform remove callback returning void
  platform/x86: compal-laptop: Convert to platform remove callback returning void
  platform/x86: dell: dcdbas: Convert to platform remove callback returning void
  platform/x86: dell: dell-smo8800: Convert to platform remove callback returning void
  platform/x86: hp: hp_accel: Convert to platform remove callback returning void
  platform/x86: hp: tc1100-wmi: Convert to platform remove callback returning void
  platform/x86: huawei-wmi: Convert to platform remove callback returning void
  platform/x86: ideapad-laptop: Convert to platform remove callback returning void
  platform/x86: intel: bxtwc_tmu: Convert to platform remove callback returning void
  platform/x86: intel: chtdc_ti_pwrbtn: Convert to platform remove callback returning void
  platform/x86: intel: chtwc_int33fe: Convert to platform remove callback returning void
  platform/x86: intel: hid: Convert to platform remove callback returning void
  platform/x86: intel: int0002_vgpio: Convert to platform remove callback returning void
  platform/x86: intel: int1092: intel_sar: Convert to platform remove callback returning void
  platform/x86: intel: int3472: discrete: Convert to platform remove callback returning void
  platform/x86: intel: mrfld_pwrbtn: Convert to platform remove callback returning void
  platform/x86: intel: pmc: core: Convert to platform remove callback returning void
  platform/x86: intel: telemetry: pltdrv: Convert to platform remove callback returning void
  platform/x86: intel: vbtn: Convert to platform remove callback returning void
  platform/x86: samsung-q10: Convert to platform remove callback returning void
  platform/x86: serial-multi-instantiate: Convert to platform remove callback returning void
  platform/x86: wmi: Convert to platform remove callback returning void
  platform/x86: xo1-rfkill: Convert to platform remove callback returning void

 drivers/platform/x86/acer-wmi.c                 |  5 ++---
 drivers/platform/x86/adv_swbutton.c             |  6 ++----
 drivers/platform/x86/amd/hsmp.c                 |  6 ++----
 drivers/platform/x86/amd/pmc.c                  |  5 ++---
 drivers/platform/x86/amd/pmf/core.c             |  5 ++---
 drivers/platform/x86/amilo-rfkill.c             |  5 ++---
 drivers/platform/x86/barco-p50-gpio.c           |  6 ++----
 drivers/platform/x86/compal-laptop.c            |  8 +++-----
 drivers/platform/x86/dell/dcdbas.c              |  6 ++----
 drivers/platform/x86/dell/dell-smo8800.c        |  5 ++---
 drivers/platform/x86/hp/hp_accel.c              |  5 ++---
 drivers/platform/x86/hp/tc1100-wmi.c            |  6 ++----
 drivers/platform/x86/huawei-wmi.c               |  6 ++----
 drivers/platform/x86/ideapad-laptop.c           |  6 ++----
 drivers/platform/x86/intel/bxtwc_tmu.c          |  5 ++---
 drivers/platform/x86/intel/chtdc_ti_pwrbtn.c    |  5 ++---
 drivers/platform/x86/intel/chtwc_int33fe.c      |  6 ++----
 drivers/platform/x86/intel/hid.c                | 10 ++--------
 drivers/platform/x86/intel/int0002_vgpio.c      |  5 ++---
 drivers/platform/x86/intel/int1092/intel_sar.c  |  5 ++---
 drivers/platform/x86/intel/int3472/discrete.c   |  6 ++----
 drivers/platform/x86/intel/mrfld_pwrbtn.c       |  5 ++---
 drivers/platform/x86/intel/pmc/core.c           |  5 ++---
 drivers/platform/x86/intel/telemetry/pltdrv.c   |  5 ++---
 drivers/platform/x86/intel/vbtn.c               | 10 ++--------
 drivers/platform/x86/samsung-q10.c              |  6 ++----
 drivers/platform/x86/serial-multi-instantiate.c |  6 ++----
 drivers/platform/x86/wmi.c                      |  6 ++----
 drivers/platform/x86/xo1-rfkill.c               |  5 ++---
 29 files changed, 59 insertions(+), 111 deletions(-)

base-commit: ee3f96b164688dae21e2466a57f2e806b64e8a37
-- 
2.39.1




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux