[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220427154111.529975-3-kuba@kernel.org>
Date: Wed, 27 Apr 2022 08:40:59 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: davem@...emloft.net, pabeni@...hat.com
Cc: netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>,
steve.glendinning@...well.net, david.kershner@...sys.com,
gregkh@...uxfoundation.org, liujunqi@....edu.cn,
sparmaintainer@...sys.com, linux-staging@...ts.linux.dev
Subject: [PATCH net-next 02/14] eth: remove NAPI_WEIGHT defines
Defining local versions of NAPI_POLL_WEIGHT with the same
values in the drivers just makes refactoring harder.
Signed-off-by: Jakub Kicinski <kuba@...nel.org>
---
CC: steve.glendinning@...well.net
CC: david.kershner@...sys.com
CC: gregkh@...uxfoundation.org
CC: liujunqi@....edu.cn
CC: sparmaintainer@...sys.com
CC: linux-staging@...ts.linux.dev
---
drivers/net/ethernet/smsc/smsc9420.c | 2 +-
drivers/net/ethernet/smsc/smsc9420.h | 1 -
drivers/staging/unisys/visornic/visornic_main.c | 4 ++--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c
index d937af18973e..0c68c7f8056d 100644
--- a/drivers/net/ethernet/smsc/smsc9420.c
+++ b/drivers/net/ethernet/smsc/smsc9420.c
@@ -1585,7 +1585,7 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id)
dev->netdev_ops = &smsc9420_netdev_ops;
dev->ethtool_ops = &smsc9420_ethtool_ops;
- netif_napi_add(dev, &pd->napi, smsc9420_rx_poll, NAPI_WEIGHT);
+ netif_napi_add(dev, &pd->napi, smsc9420_rx_poll, NAPI_POLL_WEIGHT);
result = register_netdev(dev);
if (result) {
diff --git a/drivers/net/ethernet/smsc/smsc9420.h b/drivers/net/ethernet/smsc/smsc9420.h
index 409e82b2018a..876410a256c6 100644
--- a/drivers/net/ethernet/smsc/smsc9420.h
+++ b/drivers/net/ethernet/smsc/smsc9420.h
@@ -15,7 +15,6 @@
/* interrupt deassertion in multiples of 10us */
#define INT_DEAS_TIME (50)
-#define NAPI_WEIGHT (64)
#define SMSC_BAR (3)
#ifdef __BIG_ENDIAN
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 643432458105..81ac3ac05192 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -26,7 +26,6 @@
* = 163840 bytes
*/
#define MAX_BUF 163840
-#define NAPI_WEIGHT 64
/* GUIDS for director channel type supported by this driver. */
/* {8cd5994d-c58e-11da-95a9-00e08161165f} */
@@ -1884,7 +1883,8 @@ static int visornic_probe(struct visor_device *dev)
/* TODO: Setup Interrupt information */
/* Let's start our threads to get responses */
- netif_napi_add(netdev, &devdata->napi, visornic_poll, NAPI_WEIGHT);
+ netif_napi_add(netdev, &devdata->napi, visornic_poll,
+ NAPI_POLL_WEIGHT);
channel_offset = offsetof(struct visor_io_channel,
channel_header.features);
--
2.34.1
Powered by blists - more mailing lists