powerpc/macio: Make remove callback of macio driver void returned
authorDawei Li <set_pte_at@outlook.com>
Wed, 1 Feb 2023 14:36:19 +0000 (22:36 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 7 Mar 2024 12:06:19 +0000 (23:06 +1100)
Commit fc7a6209d571 ("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
arch/powerpc/include/asm/macio.h
drivers/ata/pata_macio.c
drivers/macintosh/rack-meter.c
drivers/net/ethernet/apple/bmac.c
drivers/net/ethernet/apple/mace.c
drivers/scsi/mac53c94.c
drivers/scsi/mesh.c
drivers/tty/serial/pmac_zilog.c
sound/aoa/soundbus/i2sbus/core.c

index ab9608e63e40ae9b1035382cb06a0c431e1b1de3..9203ff6acbf6811e56892cfc1cad6ee4acd794e8 100644 (file)
@@ -126,7 +126,7 @@ static inline struct pci_dev *macio_get_pci_dev(struct macio_dev *mdev)
 struct macio_driver
 {
        int     (*probe)(struct macio_dev* dev, const struct of_device_id *match);
-       int     (*remove)(struct macio_dev* dev);
+       void    (*remove)(struct macio_dev *dev);
 
        int     (*suspend)(struct macio_dev* dev, pm_message_t state);
        int     (*resume)(struct macio_dev* dev);
index 17f6ccee53c7c26e1a3a4f19b1aee82a7950cc7a..4ac854f6b05777c669d7de39ab006d963b74bd48 100644 (file)
@@ -1188,7 +1188,7 @@ static int pata_macio_attach(struct macio_dev *mdev,
        return rc;
 }
 
-static int pata_macio_detach(struct macio_dev *mdev)
+static void pata_macio_detach(struct macio_dev *mdev)
 {
        struct ata_host *host = macio_get_drvdata(mdev);
        struct pata_macio_priv *priv = host->private_data;
@@ -1203,8 +1203,6 @@ static int pata_macio_detach(struct macio_dev *mdev)
        ata_host_detach(host);
 
        unlock_media_bay(priv->mdev->media_bay);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
index 40240bce77b01e288e3ef7ba94bc0a07c6a1421f..896a43bd819f7102ba29cbbc6441174f2e03edde 100644 (file)
@@ -523,7 +523,7 @@ static int rackmeter_probe(struct macio_dev* mdev,
        return rc;
 }
 
-static int rackmeter_remove(struct macio_dev* mdev)
+static void rackmeter_remove(struct macio_dev *mdev)
 {
        struct rackmeter *rm = dev_get_drvdata(&mdev->ofdev.dev);
 
@@ -558,8 +558,6 @@ static int rackmeter_remove(struct macio_dev* mdev)
 
        /* Get rid of me */
        kfree(rm);
-
-       return 0;
 }
 
 static int rackmeter_shutdown(struct macio_dev* mdev)
index 9e653e2925f78ae9047dceedd062e71c52c80008..292b1f9cd9e78e799aa359deceed4ee3958fbb22 100644 (file)
@@ -1591,7 +1591,7 @@ bmac_proc_info(char *buffer, char **start, off_t offset, int length)
 }
 #endif
 
-static int bmac_remove(struct macio_dev *mdev)
+static void bmac_remove(struct macio_dev *mdev)
 {
        struct net_device *dev = macio_get_drvdata(mdev);
        struct bmac_data *bp = netdev_priv(dev);
@@ -1609,8 +1609,6 @@ static int bmac_remove(struct macio_dev *mdev)
        macio_release_resources(mdev);
 
        free_netdev(dev);
-
-       return 0;
 }
 
 static const struct of_device_id bmac_match[] =
index fd1b008b7208c50917e9a5d9df9bcc2218de1304..e6350971c7076c259453ac04c95c7c6f706b4bae 100644 (file)
@@ -272,7 +272,7 @@ static int mace_probe(struct macio_dev *mdev, const struct of_device_id *match)
        return rc;
 }
 
-static int mace_remove(struct macio_dev *mdev)
+static void mace_remove(struct macio_dev *mdev)
 {
        struct net_device *dev = macio_get_drvdata(mdev);
        struct mace_data *mp;
@@ -296,8 +296,6 @@ static int mace_remove(struct macio_dev *mdev)
        free_netdev(dev);
 
        macio_release_resources(mdev);
-
-       return 0;
 }
 
 static void dbdma_reset(volatile struct dbdma_regs __iomem *dma)
index 6a019132109c1ee678ad09d5b4b413d7fe691bbc..377dcab32cd8fe5ed7a23765a6d6e9448642b76e 100644 (file)
@@ -508,7 +508,7 @@ static int mac53c94_probe(struct macio_dev *mdev, const struct of_device_id *mat
        return rc;
 }
 
-static int mac53c94_remove(struct macio_dev *mdev)
+static void mac53c94_remove(struct macio_dev *mdev)
 {
        struct fsc_state *fp = (struct fsc_state *)macio_get_drvdata(mdev);
        struct Scsi_Host *host = fp->host;
@@ -526,11 +526,8 @@ static int mac53c94_remove(struct macio_dev *mdev)
        scsi_host_put(host);
 
        macio_release_resources(mdev);
-
-       return 0;
 }
 
-
 static struct of_device_id mac53c94_match[] = 
 {
        {
index e276583c590c38ee237e33caaa45a95ba87defe8..d63177b30c847324fa874fa0533d84f86af41614 100644 (file)
@@ -1986,7 +1986,7 @@ static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match)
        return -ENODEV;
 }
 
-static int mesh_remove(struct macio_dev *mdev)
+static void mesh_remove(struct macio_dev *mdev)
 {
        struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev);
        struct Scsi_Host *mesh_host = ms->host;
@@ -2013,11 +2013,8 @@ static int mesh_remove(struct macio_dev *mdev)
        macio_release_resources(mdev);
 
        scsi_host_put(mesh_host);
-
-       return 0;
 }
 
-
 static struct of_device_id mesh_match[] = 
 {
        {
index c8bf08c19c647a761e8c4b99fb2453c726e96c18..732d821db4f805d539e732367b9ef9df1afb7cc9 100644 (file)
@@ -1507,12 +1507,12 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)
  * That one should not be called, macio isn't really a hotswap device,
  * we don't expect one of those serial ports to go away...
  */
-static int pmz_detach(struct macio_dev *mdev)
+static void pmz_detach(struct macio_dev *mdev)
 {
        struct uart_pmac_port   *uap = dev_get_drvdata(&mdev->ofdev.dev);
        
        if (!uap)
-               return -ENODEV;
+               return;
 
        uart_remove_one_port(&pmz_uart_reg, &uap->port);
 
@@ -1523,11 +1523,8 @@ static int pmz_detach(struct macio_dev *mdev)
        dev_set_drvdata(&mdev->ofdev.dev, NULL);
        uap->dev = NULL;
        uap->port.dev = NULL;
-       
-       return 0;
 }
 
-
 static int pmz_suspend(struct macio_dev *mdev, pm_message_t pm_state)
 {
        struct uart_pmac_port *uap = dev_get_drvdata(&mdev->ofdev.dev);
index 3f49a9e28bfc5509742822fff70a2d2b3eb74ee7..b8ff5cccd0c811fd76050be0f9cf50efa899a3cc 100644 (file)
@@ -365,15 +365,13 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)
        return 0;
 }
 
-static int i2sbus_remove(struct macio_dev* dev)
+static void i2sbus_remove(struct macio_dev *dev)
 {
        struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev);
        struct i2sbus_dev *i2sdev, *tmp;
 
        list_for_each_entry_safe(i2sdev, tmp, &control->list, item)
                soundbus_remove_one(&i2sdev->sound);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM