Commit 7cffcade authored by Dawei Li's avatar Dawei Li Committed by Juergen Gross
Browse files

xen: make remove callback of xen 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.

This change is for xen bus based drivers.

Acked-by: default avatarJuergen Gross <jgross@suse.com>
Signed-off-by: default avatarDawei Li <set_pte_at@outlook.com>
Link: https://lore.kernel.org/r/TYCP286MB23238119AB4DF190997075C9CAE39@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM


Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
parent 8b997b2b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -524,7 +524,7 @@ static int xen_vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle,
	return 0;
}

static int xen_blkbk_remove(struct xenbus_device *dev)
static void xen_blkbk_remove(struct xenbus_device *dev)
{
	struct backend_info *be = dev_get_drvdata(&dev->dev);

@@ -547,8 +547,6 @@ static int xen_blkbk_remove(struct xenbus_device *dev)
		/* Put the reference we set in xen_blkif_alloc(). */
		xen_blkif_put(be->blkif);
	}

	return 0;
}

int xen_blkbk_flush_diskcache(struct xenbus_transaction xbt,
+1 −2
Original line number Diff line number Diff line
@@ -2468,7 +2468,7 @@ static void blkback_changed(struct xenbus_device *dev,
	}
}

static int blkfront_remove(struct xenbus_device *xbdev)
static void blkfront_remove(struct xenbus_device *xbdev)
{
	struct blkfront_info *info = dev_get_drvdata(&xbdev->dev);

@@ -2489,7 +2489,6 @@ static int blkfront_remove(struct xenbus_device *xbdev)
	}

	kfree(info);
	return 0;
}

static int blkfront_is_ready(struct xenbus_device *dev)
+1 −2
Original line number Diff line number Diff line
@@ -360,14 +360,13 @@ static int tpmfront_probe(struct xenbus_device *dev,
	return tpm_chip_register(priv->chip);
}

static int tpmfront_remove(struct xenbus_device *dev)
static void tpmfront_remove(struct xenbus_device *dev)
{
	struct tpm_chip *chip = dev_get_drvdata(&dev->dev);
	struct tpm_private *priv = dev_get_drvdata(&chip->dev);
	tpm_chip_unregister(chip);
	ring_free(priv);
	dev_set_drvdata(&chip->dev, NULL);
	return 0;
}

static int tpmfront_resume(struct xenbus_device *dev)
+1 −2
Original line number Diff line number Diff line
@@ -717,7 +717,7 @@ static int xen_drv_probe(struct xenbus_device *xb_dev,
	return xenbus_switch_state(xb_dev, XenbusStateInitialising);
}

static int xen_drv_remove(struct xenbus_device *dev)
static void xen_drv_remove(struct xenbus_device *dev)
{
	struct xen_drm_front_info *front_info = dev_get_drvdata(&dev->dev);
	int to = 100;
@@ -751,7 +751,6 @@ static int xen_drv_remove(struct xenbus_device *dev)

	xen_drm_drv_fini(front_info);
	xenbus_frontend_closed(dev);
	return 0;
}

static const struct xenbus_device_id xen_driver_ids[] = {
+2 −3
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ module_param_array(ptr_size, int, NULL, 0444);
MODULE_PARM_DESC(ptr_size,
	"Pointing device width, height in pixels (default 800,600)");

static int xenkbd_remove(struct xenbus_device *);
static void xenkbd_remove(struct xenbus_device *);
static int xenkbd_connect_backend(struct xenbus_device *, struct xenkbd_info *);
static void xenkbd_disconnect_backend(struct xenkbd_info *);

@@ -404,7 +404,7 @@ static int xenkbd_resume(struct xenbus_device *dev)
	return xenkbd_connect_backend(dev, info);
}

static int xenkbd_remove(struct xenbus_device *dev)
static void xenkbd_remove(struct xenbus_device *dev)
{
	struct xenkbd_info *info = dev_get_drvdata(&dev->dev);

@@ -417,7 +417,6 @@ static int xenkbd_remove(struct xenbus_device *dev)
		input_unregister_device(info->mtouch);
	free_page((unsigned long)info->page);
	kfree(info);
	return 0;
}

static int xenkbd_connect_backend(struct xenbus_device *dev,
Loading