diff options
| author | Uwe Kleine-König <[email protected]> | 2021-02-25 22:18:34 +0000 |
|---|---|---|
| committer | Michael Ellerman <[email protected]> | 2021-03-02 11:41:23 +0000 |
| commit | 386a966f5ce71a0364b158c5d0a6971f4e418ea8 (patch) | |
| tree | 700fabfce8a7eec76f077ef49df2826cfca28673 /drivers/misc/ibmvmc.c | |
| parent | powerpc/syscall: Force inlining of __prep_irq_for_enabled_exit() (diff) | |
| download | kernel-386a966f5ce71a0364b158c5d0a6971f4e418ea8.tar.gz kernel-386a966f5ce71a0364b158c5d0a6971f4e418ea8.zip | |
vio: make remove callback return void
The driver core ignores the return value of struct bus_type::remove()
because there is only little that can be done. To simplify the quest to
make this function return void, let struct vio_driver::remove() return
void, too. All users already unconditionally return 0, this commit makes
it obvious that returning an error code is a bad idea.
Note there are two nominally different implementations for a vio bus:
one in arch/sparc/kernel/vio.c and the other in
arch/powerpc/platforms/pseries/vio.c. This patch only adapts the powerpc
one.
Before this patch for a device that was bound to a driver without a
remove callback vio_cmo_bus_remove(viodev) wasn't called. As the device
core still considers the device unbound after vio_bus_remove() returns
calling this unconditionally is the consistent behaviour which is
implemented here.
Signed-off-by: Uwe Kleine-König <[email protected]>
Reviewed-by: Tyrel Datwyler <[email protected]>
Acked-by: Lijun Pan <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
[mpe: Drop unneeded hvcs_remove() forward declaration, squash in
change from sfr to drop ibmvnic_remove() forward declaration]
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/misc/ibmvmc.c')
| -rw-r--r-- | drivers/misc/ibmvmc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c index 2d778d0f011e..c0fe3295c330 100644 --- a/drivers/misc/ibmvmc.c +++ b/drivers/misc/ibmvmc.c @@ -2288,15 +2288,13 @@ crq_failed: return -EPERM; } -static int ibmvmc_remove(struct vio_dev *vdev) +static void ibmvmc_remove(struct vio_dev *vdev) { struct crq_server_adapter *adapter = dev_get_drvdata(&vdev->dev); dev_info(adapter->dev, "Entering remove for UA 0x%x\n", vdev->unit_address); ibmvmc_release_crq_queue(adapter); - - return 0; } static struct vio_device_id ibmvmc_device_table[] = { |
