Skip to content

Commit 7cffcad

Browse files
Dawei Lijgross1
authored andcommitted
xen: make remove callback of xen driver void returned
Since commit fc7a620 ("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: Juergen Gross <jgross@suse.com> Signed-off-by: Dawei Li <set_pte_at@outlook.com> Link: https://lore.kernel.org/r/TYCP286MB23238119AB4DF190997075C9CAE39@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Juergen Gross <jgross@suse.com>
1 parent 8b997b2 commit 7cffcad

File tree

19 files changed

+22
-47
lines changed

19 files changed

+22
-47
lines changed

drivers/block/xen-blkback/xenbus.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ static int xen_vbd_create(struct xen_blkif *blkif, blkif_vdev_t handle,
524524
return 0;
525525
}
526526

527-
static int xen_blkbk_remove(struct xenbus_device *dev)
527+
static void xen_blkbk_remove(struct xenbus_device *dev)
528528
{
529529
struct backend_info *be = dev_get_drvdata(&dev->dev);
530530

@@ -547,8 +547,6 @@ static int xen_blkbk_remove(struct xenbus_device *dev)
547547
/* Put the reference we set in xen_blkif_alloc(). */
548548
xen_blkif_put(be->blkif);
549549
}
550-
551-
return 0;
552550
}
553551

554552
int xen_blkbk_flush_diskcache(struct xenbus_transaction xbt,

drivers/block/xen-blkfront.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2468,7 +2468,7 @@ static void blkback_changed(struct xenbus_device *dev,
24682468
}
24692469
}
24702470

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

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

24912491
kfree(info);
2492-
return 0;
24932492
}
24942493

24952494
static int blkfront_is_ready(struct xenbus_device *dev)

drivers/char/tpm/xen-tpmfront.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,14 +360,13 @@ static int tpmfront_probe(struct xenbus_device *dev,
360360
return tpm_chip_register(priv->chip);
361361
}
362362

363-
static int tpmfront_remove(struct xenbus_device *dev)
363+
static void tpmfront_remove(struct xenbus_device *dev)
364364
{
365365
struct tpm_chip *chip = dev_get_drvdata(&dev->dev);
366366
struct tpm_private *priv = dev_get_drvdata(&chip->dev);
367367
tpm_chip_unregister(chip);
368368
ring_free(priv);
369369
dev_set_drvdata(&chip->dev, NULL);
370-
return 0;
371370
}
372371

373372
static int tpmfront_resume(struct xenbus_device *dev)

drivers/gpu/drm/xen/xen_drm_front.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ static int xen_drv_probe(struct xenbus_device *xb_dev,
717717
return xenbus_switch_state(xb_dev, XenbusStateInitialising);
718718
}
719719

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

752752
xen_drm_drv_fini(front_info);
753753
xenbus_frontend_closed(dev);
754-
return 0;
755754
}
756755

757756
static const struct xenbus_device_id xen_driver_ids[] = {

drivers/input/misc/xen-kbdfront.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module_param_array(ptr_size, int, NULL, 0444);
5151
MODULE_PARM_DESC(ptr_size,
5252
"Pointing device width, height in pixels (default 800,600)");
5353

54-
static int xenkbd_remove(struct xenbus_device *);
54+
static void xenkbd_remove(struct xenbus_device *);
5555
static int xenkbd_connect_backend(struct xenbus_device *, struct xenkbd_info *);
5656
static void xenkbd_disconnect_backend(struct xenkbd_info *);
5757

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

407-
static int xenkbd_remove(struct xenbus_device *dev)
407+
static void xenkbd_remove(struct xenbus_device *dev)
408408
{
409409
struct xenkbd_info *info = dev_get_drvdata(&dev->dev);
410410

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

423422
static int xenkbd_connect_backend(struct xenbus_device *dev,

drivers/net/xen-netback/xenbus.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ static int read_xenbus_vif_flags(struct backend_info *be)
977977
return 0;
978978
}
979979

980-
static int netback_remove(struct xenbus_device *dev)
980+
static void netback_remove(struct xenbus_device *dev)
981981
{
982982
struct backend_info *be = dev_get_drvdata(&dev->dev);
983983

@@ -992,7 +992,6 @@ static int netback_remove(struct xenbus_device *dev)
992992
kfree(be->hotplug_script);
993993
kfree(be);
994994
dev_set_drvdata(&dev->dev, NULL);
995-
return 0;
996995
}
997996

998997
/*

drivers/net/xen-netfront.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,7 +2640,7 @@ static void xennet_bus_close(struct xenbus_device *dev)
26402640
} while (!ret);
26412641
}
26422642

2643-
static int xennet_remove(struct xenbus_device *dev)
2643+
static void xennet_remove(struct xenbus_device *dev)
26442644
{
26452645
struct netfront_info *info = dev_get_drvdata(&dev->dev);
26462646

@@ -2656,8 +2656,6 @@ static int xennet_remove(struct xenbus_device *dev)
26562656
rtnl_unlock();
26572657
}
26582658
xennet_free_netdev(info->netdev);
2659-
2660-
return 0;
26612659
}
26622660

26632661
static const struct xenbus_device_id netfront_ids[] = {

drivers/pci/xen-pcifront.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,14 +1055,12 @@ static int pcifront_xenbus_probe(struct xenbus_device *xdev,
10551055
return err;
10561056
}
10571057

1058-
static int pcifront_xenbus_remove(struct xenbus_device *xdev)
1058+
static void pcifront_xenbus_remove(struct xenbus_device *xdev)
10591059
{
10601060
struct pcifront_device *pdev = dev_get_drvdata(&xdev->dev);
10611061

10621062
if (pdev)
10631063
free_pdev(pdev);
1064-
1065-
return 0;
10661064
}
10671065

10681066
static const struct xenbus_device_id xenpci_ids[] = {

drivers/scsi/xen-scsifront.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ static int scsifront_suspend(struct xenbus_device *dev)
995995
return err;
996996
}
997997

998-
static int scsifront_remove(struct xenbus_device *dev)
998+
static void scsifront_remove(struct xenbus_device *dev)
999999
{
10001000
struct vscsifrnt_info *info = dev_get_drvdata(&dev->dev);
10011001

@@ -1011,8 +1011,6 @@ static int scsifront_remove(struct xenbus_device *dev)
10111011

10121012
scsifront_free_ring(info);
10131013
scsi_host_put(info->host);
1014-
1015-
return 0;
10161014
}
10171015

10181016
static void scsifront_disconnect(struct vscsifrnt_info *info)

drivers/tty/hvc/hvc_xen.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ static int xen_console_remove(struct xencons_info *info)
394394
return 0;
395395
}
396396

397-
static int xencons_remove(struct xenbus_device *dev)
397+
static void xencons_remove(struct xenbus_device *dev)
398398
{
399-
return xen_console_remove(dev_get_drvdata(&dev->dev));
399+
xen_console_remove(dev_get_drvdata(&dev->dev));
400400
}
401401

402402
static int xencons_connect_backend(struct xenbus_device *dev,

0 commit comments

Comments
 (0)