Commit 76de4e15 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'net-discard-pm_runtime_put-return-value'

Rafael J. Wysocki says:

====================
net: Discard pm_runtime_put() return value

This is mostly was a resend of patches [10-12/23] from:

https://lore.kernel.org/linux-pm/6245770.lOV4Wx5bFT@rafael.j.wysocki/

as requested by Jakub, except for the last patch that has been fixed
while at it and so the version has been bumped up.

The patches are independent of each other and they are all requisite
for converting pm_runtime_put() into a void function.
====================

Link: https://patch.msgid.link/2816529.mvXUDI8C0e@rafael.j.wysocki


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents fd1de45a 36775f3d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4811,7 +4811,9 @@ static int at91ether_close(struct net_device *dev)

	at91ether_stop(lp);

	return pm_runtime_put(&lp->pdev->dev);
	pm_runtime_put(&lp->pdev->dev);

	return 0;
}

/* Transmit packet */
+1 −4
Original line number Diff line number Diff line
@@ -391,11 +391,8 @@ static int am65_cpsw_ethtool_op_begin(struct net_device *ndev)
static void am65_cpsw_ethtool_op_complete(struct net_device *ndev)
{
	struct am65_cpsw_common *common = am65_ndev_to_common(ndev);
	int ret;

	ret = pm_runtime_put(common->dev);
	if (ret < 0 && ret != -EBUSY)
		dev_err(common->dev, "ethtool complete failed %d\n", ret);
	pm_runtime_put(common->dev);
}

static void am65_cpsw_get_drvinfo(struct net_device *ndev,
+1 −4
Original line number Diff line number Diff line
@@ -374,11 +374,8 @@ int cpsw_ethtool_op_begin(struct net_device *ndev)
void cpsw_ethtool_op_complete(struct net_device *ndev)
{
	struct cpsw_priv *priv = netdev_priv(ndev);
	int ret;

	ret = pm_runtime_put(priv->cpsw->dev);
	if (ret < 0)
		cpsw_err(priv, drv, "ethtool complete failed %d\n", ret);
	pm_runtime_put(priv->cpsw->dev);
}

void cpsw_get_channels(struct net_device *ndev, struct ethtool_channels *ch)
+3 −3
Original line number Diff line number Diff line
@@ -60,12 +60,12 @@ int framer_pm_runtime_get_sync(struct framer *framer)
}
EXPORT_SYMBOL_GPL(framer_pm_runtime_get_sync);

int framer_pm_runtime_put(struct framer *framer)
void framer_pm_runtime_put(struct framer *framer)
{
	if (!pm_runtime_enabled(&framer->dev))
		return -EOPNOTSUPP;
		return;

	return pm_runtime_put(&framer->dev);
	pm_runtime_put(&framer->dev);
}
EXPORT_SYMBOL_GPL(framer_pm_runtime_put);

+2 −3
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ struct framer {
#if IS_ENABLED(CONFIG_GENERIC_FRAMER)
int framer_pm_runtime_get(struct framer *framer);
int framer_pm_runtime_get_sync(struct framer *framer);
int framer_pm_runtime_put(struct framer *framer);
void framer_pm_runtime_put(struct framer *framer);
int framer_pm_runtime_put_sync(struct framer *framer);
int framer_init(struct framer *framer);
int framer_exit(struct framer *framer);
@@ -124,9 +124,8 @@ static inline int framer_pm_runtime_get_sync(struct framer *framer)
	return -ENOSYS;
}

static inline int framer_pm_runtime_put(struct framer *framer)
static inline void framer_pm_runtime_put(struct framer *framer)
{
	return -ENOSYS;
}

static inline int framer_pm_runtime_put_sync(struct framer *framer)