Commit e1cf330f authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Marc Kleine-Budde

can: m_can: remove a copy of the NAPI_POLL_WEIGHT define

Defining local versions of NAPI_POLL_WEIGHT with the same values in
the drivers just makes refactoring harder.

Link: https://lore.kernel.org/all/20220429174446.196655-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 35a78bf2
......@@ -77,9 +77,6 @@ enum m_can_reg {
M_CAN_TXEFA = 0xf8,
};
/* napi related */
#define M_CAN_NAPI_WEIGHT 64
/* message ram configuration data length */
#define MRAM_CFG_LEN 8
......@@ -951,7 +948,7 @@ static int m_can_rx_peripheral(struct net_device *dev)
struct m_can_classdev *cdev = netdev_priv(dev);
int work_done;
work_done = m_can_rx_handler(dev, M_CAN_NAPI_WEIGHT);
work_done = m_can_rx_handler(dev, NAPI_POLL_WEIGHT);
/* Don't re-enable interrupts if the driver had a fatal error
* (e.g., FIFO read failure).
......@@ -1474,7 +1471,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, M_CAN_NAPI_WEIGHT);
m_can_poll, NAPI_POLL_WEIGHT);
/* Shared properties of all M_CAN versions */
cdev->version = m_can_version;
......@@ -1994,7 +1991,7 @@ int m_can_class_register(struct m_can_classdev *cdev)
if (cdev->is_peripheral) {
ret = can_rx_offload_add_manual(cdev->net, &cdev->offload,
M_CAN_NAPI_WEIGHT);
NAPI_POLL_WEIGHT);
if (ret)
goto clk_disable;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment