Skip to content

Commit 9db2235

Browse files
Dawei Limpe
authored andcommitted
powerpc/macio: Make remove callback of macio driver void returned
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 macio bus based drivers. Signed-off-by: Dawei Li <set_pte_at@outlook.com> Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/TYCP286MB232391520CB471E7C8D6EA84CAD19@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM
1 parent c2e5d70 commit 9db2235

File tree

9 files changed

+10
-29
lines changed

9 files changed

+10
-29
lines changed

arch/powerpc/include/asm/macio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static inline struct pci_dev *macio_get_pci_dev(struct macio_dev *mdev)
126126
struct macio_driver
127127
{
128128
int (*probe)(struct macio_dev* dev, const struct of_device_id *match);
129-
int (*remove)(struct macio_dev* dev);
129+
void (*remove)(struct macio_dev *dev);
130130

131131
int (*suspend)(struct macio_dev* dev, pm_message_t state);
132132
int (*resume)(struct macio_dev* dev);

drivers/ata/pata_macio.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ static int pata_macio_attach(struct macio_dev *mdev,
11881188
return rc;
11891189
}
11901190

1191-
static int pata_macio_detach(struct macio_dev *mdev)
1191+
static void pata_macio_detach(struct macio_dev *mdev)
11921192
{
11931193
struct ata_host *host = macio_get_drvdata(mdev);
11941194
struct pata_macio_priv *priv = host->private_data;
@@ -1203,8 +1203,6 @@ static int pata_macio_detach(struct macio_dev *mdev)
12031203
ata_host_detach(host);
12041204

12051205
unlock_media_bay(priv->mdev->media_bay);
1206-
1207-
return 0;
12081206
}
12091207

12101208
#ifdef CONFIG_PM_SLEEP

drivers/macintosh/rack-meter.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ static int rackmeter_probe(struct macio_dev* mdev,
523523
return rc;
524524
}
525525

526-
static int rackmeter_remove(struct macio_dev* mdev)
526+
static void rackmeter_remove(struct macio_dev *mdev)
527527
{
528528
struct rackmeter *rm = dev_get_drvdata(&mdev->ofdev.dev);
529529

@@ -558,8 +558,6 @@ static int rackmeter_remove(struct macio_dev* mdev)
558558

559559
/* Get rid of me */
560560
kfree(rm);
561-
562-
return 0;
563561
}
564562

565563
static int rackmeter_shutdown(struct macio_dev* mdev)

drivers/net/ethernet/apple/bmac.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@ bmac_proc_info(char *buffer, char **start, off_t offset, int length)
15911591
}
15921592
#endif
15931593

1594-
static int bmac_remove(struct macio_dev *mdev)
1594+
static void bmac_remove(struct macio_dev *mdev)
15951595
{
15961596
struct net_device *dev = macio_get_drvdata(mdev);
15971597
struct bmac_data *bp = netdev_priv(dev);
@@ -1609,8 +1609,6 @@ static int bmac_remove(struct macio_dev *mdev)
16091609
macio_release_resources(mdev);
16101610

16111611
free_netdev(dev);
1612-
1613-
return 0;
16141612
}
16151613

16161614
static const struct of_device_id bmac_match[] =

drivers/net/ethernet/apple/mace.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static int mace_probe(struct macio_dev *mdev, const struct of_device_id *match)
272272
return rc;
273273
}
274274

275-
static int mace_remove(struct macio_dev *mdev)
275+
static void mace_remove(struct macio_dev *mdev)
276276
{
277277
struct net_device *dev = macio_get_drvdata(mdev);
278278
struct mace_data *mp;
@@ -296,8 +296,6 @@ static int mace_remove(struct macio_dev *mdev)
296296
free_netdev(dev);
297297

298298
macio_release_resources(mdev);
299-
300-
return 0;
301299
}
302300

303301
static void dbdma_reset(volatile struct dbdma_regs __iomem *dma)

drivers/scsi/mac53c94.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ static int mac53c94_probe(struct macio_dev *mdev, const struct of_device_id *mat
508508
return rc;
509509
}
510510

511-
static int mac53c94_remove(struct macio_dev *mdev)
511+
static void mac53c94_remove(struct macio_dev *mdev)
512512
{
513513
struct fsc_state *fp = (struct fsc_state *)macio_get_drvdata(mdev);
514514
struct Scsi_Host *host = fp->host;
@@ -526,11 +526,8 @@ static int mac53c94_remove(struct macio_dev *mdev)
526526
scsi_host_put(host);
527527

528528
macio_release_resources(mdev);
529-
530-
return 0;
531529
}
532530

533-
534531
static struct of_device_id mac53c94_match[] =
535532
{
536533
{

drivers/scsi/mesh.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,7 +1986,7 @@ static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match)
19861986
return -ENODEV;
19871987
}
19881988

1989-
static int mesh_remove(struct macio_dev *mdev)
1989+
static void mesh_remove(struct macio_dev *mdev)
19901990
{
19911991
struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev);
19921992
struct Scsi_Host *mesh_host = ms->host;
@@ -2013,11 +2013,8 @@ static int mesh_remove(struct macio_dev *mdev)
20132013
macio_release_resources(mdev);
20142014

20152015
scsi_host_put(mesh_host);
2016-
2017-
return 0;
20182016
}
20192017

2020-
20212018
static struct of_device_id mesh_match[] =
20222019
{
20232020
{

drivers/tty/serial/pmac_zilog.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,12 +1507,12 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)
15071507
* That one should not be called, macio isn't really a hotswap device,
15081508
* we don't expect one of those serial ports to go away...
15091509
*/
1510-
static int pmz_detach(struct macio_dev *mdev)
1510+
static void pmz_detach(struct macio_dev *mdev)
15111511
{
15121512
struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev);
15131513

15141514
if (!uap)
1515-
return -ENODEV;
1515+
return;
15161516

15171517
uart_remove_one_port(&pmz_uart_reg, &uap->port);
15181518

@@ -1523,11 +1523,8 @@ static int pmz_detach(struct macio_dev *mdev)
15231523
dev_set_drvdata(&mdev->ofdev.dev, NULL);
15241524
uap->dev = NULL;
15251525
uap->port.dev = NULL;
1526-
1527-
return 0;
15281526
}
15291527

1530-
15311528
static int pmz_suspend(struct macio_dev *mdev, pm_message_t pm_state)
15321529
{
15331530
struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev);

sound/aoa/soundbus/i2sbus/core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,15 +365,13 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)
365365
return 0;
366366
}
367367

368-
static int i2sbus_remove(struct macio_dev* dev)
368+
static void i2sbus_remove(struct macio_dev *dev)
369369
{
370370
struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev);
371371
struct i2sbus_dev *i2sdev, *tmp;
372372

373373
list_for_each_entry_safe(i2sdev, tmp, &control->list, item)
374374
soundbus_remove_one(&i2sdev->sound);
375-
376-
return 0;
377375
}
378376

379377
#ifdef CONFIG_PM

0 commit comments

Comments
 (0)