Commit 96ec2939 authored by Dawei Li's avatar Dawei Li Committed by Wei Liu
Browse files

Drivers: hv: Make remove callback of hyperv driver void returned



Since commit fc7a6209 ("bus: Make remove callback return
void") forces bus_type::remove be void-returned, it doesn't
make much sense for any bus based driver implementing remove
callbalk to return non-void to its caller.

As such, change the remove function for Hyper-V VMBus based
drivers to return void.

Signed-off-by: default avatarDawei Li <set_pte_at@outlook.com>
Link: https://lore.kernel.org/r/TYCP286MB2323A93C55526E4DF239D3ACCAFA9@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM


Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
parent 8536290f
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ static int hyperv_vmbus_probe(struct hv_device *hdev,
	return ret;
}

static int hyperv_vmbus_remove(struct hv_device *hdev)
static void hyperv_vmbus_remove(struct hv_device *hdev)
{
	struct drm_device *dev = hv_get_drvdata(hdev);
	struct hyperv_drm_device *hv = to_hv(dev);
@@ -176,8 +176,6 @@ static int hyperv_vmbus_remove(struct hv_device *hdev)
	hv_set_drvdata(hdev, NULL);

	vmbus_free_mmio(hv->mem->start, hv->fb_size);

	return 0;
}

static int hyperv_vmbus_suspend(struct hv_device *hdev)
+1 −3
Original line number Diff line number Diff line
@@ -524,7 +524,7 @@ static int mousevsc_probe(struct hv_device *device,
}


static int mousevsc_remove(struct hv_device *dev)
static void mousevsc_remove(struct hv_device *dev)
{
	struct mousevsc_dev *input_dev = hv_get_drvdata(dev);

@@ -533,8 +533,6 @@ static int mousevsc_remove(struct hv_device *dev)
	hid_hw_stop(input_dev->hid_device);
	hid_destroy_device(input_dev->hid_device);
	mousevsc_free_device(input_dev);

	return 0;
}

static int mousevsc_suspend(struct hv_device *dev)
+1 −3
Original line number Diff line number Diff line
@@ -2042,7 +2042,7 @@ static int balloon_probe(struct hv_device *dev,
	return ret;
}

static int balloon_remove(struct hv_device *dev)
static void balloon_remove(struct hv_device *dev)
{
	struct hv_dynmem_device *dm = hv_get_drvdata(dev);
	struct hv_hotadd_state *has, *tmp;
@@ -2083,8 +2083,6 @@ static int balloon_remove(struct hv_device *dev)
		kfree(has);
	}
	spin_unlock_irqrestore(&dm_device.ha_lock, flags);

	return 0;
}

static int balloon_suspend(struct hv_device *hv_dev)
+1 −3
Original line number Diff line number Diff line
@@ -602,7 +602,7 @@ static int util_probe(struct hv_device *dev,
	return ret;
}

static int util_remove(struct hv_device *dev)
static void util_remove(struct hv_device *dev)
{
	struct hv_util_service *srv = hv_get_drvdata(dev);

@@ -610,8 +610,6 @@ static int util_remove(struct hv_device *dev)
		srv->util_deinit();
	vmbus_close(dev->channel);
	kfree(srv->recv_buffer);

	return 0;
}

/*
+1 −3
Original line number Diff line number Diff line
@@ -369,7 +369,7 @@ static int hv_kbd_probe(struct hv_device *hv_dev,
	return error;
}

static int hv_kbd_remove(struct hv_device *hv_dev)
static void hv_kbd_remove(struct hv_device *hv_dev)
{
	struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev);

@@ -378,8 +378,6 @@ static int hv_kbd_remove(struct hv_device *hv_dev)
	kfree(kbd_dev);

	hv_set_drvdata(hv_dev, NULL);

	return 0;
}

static int hv_kbd_suspend(struct hv_device *hv_dev)
Loading