netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net, pabeni@redhat.com
Cc: edumazet@google.com, netdev@vger.kernel.org,
	Jakub Kicinski <kuba@kernel.org>,
	wintera@linux.ibm.com, wenjia@linux.ibm.com, hca@linux.ibm.com,
	gor@linux.ibm.com, agordeev@linux.ibm.com,
	borntraeger@linux.ibm.com, svens@linux.ibm.com,
	linux-s390@vger.kernel.org
Subject: [PATCH net-next v2 15/15] qeth: remove a copy of the NAPI_POLL_WEIGHT define
Date: Thu, 28 Apr 2022 14:23:23 -0700	[thread overview]
Message-ID: <20220428212323.104417-16-kuba@kernel.org> (raw)
In-Reply-To: <20220428212323.104417-1-kuba@kernel.org>

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

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: wintera@linux.ibm.com
CC: wenjia@linux.ibm.com
CC: hca@linux.ibm.com
CC: gor@linux.ibm.com
CC: agordeev@linux.ibm.com
CC: borntraeger@linux.ibm.com
CC: svens@linux.ibm.com
CC: linux-s390@vger.kernel.org
---
 drivers/s390/net/qeth_core.h      | 2 --
 drivers/s390/net/qeth_core_main.c | 2 +-
 drivers/s390/net/qeth_l2_main.c   | 2 +-
 drivers/s390/net/qeth_l3_main.c   | 2 +-
 4 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index de25d7ac41da..1d195429753d 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -801,8 +801,6 @@ struct qeth_priv {
 	u32 brport_features;
 };
 
-#define QETH_NAPI_WEIGHT NAPI_POLL_WEIGHT
-
 struct qeth_card {
 	enum qeth_card_states state;
 	spinlock_t lock;
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index d99c5b773e22..ae85179ca49a 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -7100,7 +7100,7 @@ int qeth_open(struct net_device *dev)
 	local_bh_disable();
 	qeth_for_each_output_queue(card, queue, i) {
 		netif_tx_napi_add(dev, &queue->napi, qeth_tx_poll,
-				  QETH_NAPI_WEIGHT);
+				  NAPI_POLL_WEIGHT);
 		napi_enable(&queue->napi);
 		napi_schedule(&queue->napi);
 	}
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 303461d70af3..92698f79a4e0 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1133,7 +1133,7 @@ static int qeth_l2_setup_netdev(struct qeth_card *card)
 				       PAGE_SIZE * (QDIO_MAX_ELEMENTS_PER_BUFFER - 1));
 	}
 
-	netif_napi_add(card->dev, &card->napi, qeth_poll, QETH_NAPI_WEIGHT);
+	netif_napi_add(card->dev, &card->napi, qeth_poll, NAPI_POLL_WEIGHT);
 	return register_netdev(card->dev);
 }
 
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index d2f422a9a4f7..ea3b6b18aa6e 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1910,7 +1910,7 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
 		netif_set_gso_max_size(card->dev,
 				       PAGE_SIZE * (QETH_MAX_BUFFER_ELEMENTS(card) - 1));
 
-	netif_napi_add(card->dev, &card->napi, qeth_poll, QETH_NAPI_WEIGHT);
+	netif_napi_add(card->dev, &card->napi, qeth_poll, NAPI_POLL_WEIGHT);
 	return register_netdev(card->dev);
 }
 
-- 
2.34.1


  parent reply	other threads:[~2022-04-28 21:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 21:23 [PATCH net-next v2 00/15] remove copies of the NAPI_POLL_WEIGHT define Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 01/15] eth: " Jakub Kicinski
2022-04-29  8:11   ` Durrant, Paul
2022-04-28 21:23 ` [PATCH net-next v2 02/15] eth: smsc: remove a copy " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 03/15] eth: cpsw: " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 04/15] eth: pch_gbe: " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 05/15] eth: mtk_eth_soc: " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 06/15] usb: lan78xx: " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 07/15] slic: " Jakub Kicinski
2022-04-28 21:47   ` Aw: " Lino Sanfilippo
2022-04-28 21:23 ` [PATCH net-next v2 08/15] net: bgmac: " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 09/15] eth: atlantic: " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 10/15] eth: benet: " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 11/15] eth: gfar: " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 12/15] eth: vxge: " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 13/15] eth: spider: " Jakub Kicinski
2022-04-28 21:23 ` [PATCH net-next v2 14/15] eth: velocity: " Jakub Kicinski
2022-04-28 21:23 ` Jakub Kicinski [this message]
2022-04-29  7:39   ` [PATCH net-next v2 15/15] qeth: " Alexandra Winter
2022-04-29 11:00 ` [PATCH net-next v2 00/15] remove copies " patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220428212323.104417-16-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=svens@linux.ibm.com \
    --cc=wenjia@linux.ibm.com \
    --cc=wintera@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).