Commit 9db22353 authored by Dawei Li's avatar Dawei Li Committed by Michael Ellerman
Browse files

powerpc/macio: Make remove callback of macio driver void returned



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 macio bus based drivers.

Signed-off-by: default avatarDawei Li <set_pte_at@outlook.com>
Acked-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/TYCP286MB232391520CB471E7C8D6EA84CAD19@TYCP286MB2323.JPNP286.PROD.OUTLOOK.COM
parent c2e5d70c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −3
Original line number Diff line number Diff line
@@ -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
+1 −3
Original line number Diff line number Diff line
@@ -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)
+1 −3
Original line number Diff line number Diff line
@@ -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[] =
+1 −3
Original line number Diff line number Diff line
@@ -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)
Loading