Commit b48b89f9 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

net: drop the weight argument from netif_napi_add

We tell driver developers to always pass NAPI_POLL_WEIGHT
as the weight to netif_napi_add(). This may be confusing
to newcomers, drop the weight argument, those who really
need to tweak the weight can use netif_napi_add_weight().

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for CAN
Link: https://lore.kernel.org/r/20220927132753.750069-1-kuba@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5456262d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1424,7 +1424,7 @@ int ctucan_probe_common(struct device *dev, void __iomem *addr, int irq, unsigne

	priv->can.clock.freq = can_clk_rate;

	netif_napi_add(ndev, &priv->napi, ctucan_rx_poll, NAPI_POLL_WEIGHT);
	netif_napi_add(ndev, &priv->napi, ctucan_rx_poll);

	ret = register_candev(ndev);
	if (ret) {
+1 −1
Original line number Diff line number Diff line
@@ -973,7 +973,7 @@ static int ifi_canfd_plat_probe(struct platform_device *pdev)
	priv->ndev = ndev;
	priv->base = addr;

	netif_napi_add(ndev, &priv->napi, ifi_canfd_poll, 64);
	netif_napi_add(ndev, &priv->napi, ifi_canfd_poll);

	priv->can.state = CAN_STATE_STOPPED;

+1 −2
Original line number Diff line number Diff line
@@ -1467,8 +1467,7 @@ static int m_can_dev_setup(struct m_can_classdev *cdev)
	}

	if (!cdev->is_peripheral)
		netif_napi_add(dev, &cdev->napi,
			       m_can_poll, NAPI_POLL_WEIGHT);
		netif_napi_add(dev, &cdev->napi, m_can_poll);

	/* Shared properties of all M_CAN versions */
	cdev->version = m_can_version;
+1 −1
Original line number Diff line number Diff line
@@ -1576,7 +1576,7 @@ static int owl_emac_probe(struct platform_device *pdev)
	netdev->watchdog_timeo = OWL_EMAC_TX_TIMEOUT;
	netdev->netdev_ops = &owl_emac_netdev_ops;
	netdev->ethtool_ops = &owl_emac_ethtool_ops;
	netif_napi_add(netdev, &priv->napi, owl_emac_poll, NAPI_POLL_WEIGHT);
	netif_napi_add(netdev, &priv->napi, owl_emac_poll);

	ret = devm_register_netdev(dev, netdev);
	if (ret) {
+1 −1
Original line number Diff line number Diff line
@@ -1507,7 +1507,7 @@ static int greth_of_probe(struct platform_device *ofdev)
	}

	/* setup NAPI */
	netif_napi_add(dev, &greth->napi, greth_poll, 64);
	netif_napi_add(dev, &greth->napi, greth_poll);

	return 0;

Loading