diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-04-29 10:44:46 -0700 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-05-02 09:24:40 +0200 |
commit | e1cf330fa28acc342e527baf12298a5fd8219bad (patch) | |
tree | dfd230793e5fd748c10a03888c8e151fa6753766 | |
parent | 35a78bf20033d5d7b1c53cb5616732dbf6ec9890 (diff) |
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.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | drivers/net/can/m_can/m_can.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c index 2779bba390f2..e6d2da4a9f41 100644 --- a/drivers/net/can/m_can/m_can.c +++ b/drivers/net/can/m_can/m_can.c @@ -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; } |