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>,
	irusskikh@marvell.com, epomozov@marvell.com
Subject: [PATCH net-next v2 09/15] eth: atlantic: remove a copy of the NAPI_POLL_WEIGHT define
Date: Thu, 28 Apr 2022 14:23:17 -0700	[thread overview]
Message-ID: <20220428212323.104417-10-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: irusskikh@marvell.com
CC: epomozov@marvell.com
---
 drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 2 --
 drivers/net/ethernet/aquantia/atlantic/aq_ptp.c | 2 +-
 drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h b/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
index 8bcda2cb3a2e..7e9c74b141ef 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_cfg.h
@@ -65,8 +65,6 @@
  */
 #define AQ_CFG_RESTART_DESC_THRES   (AQ_CFG_SKB_FRAGS_MAX * 2)
 
-#define AQ_CFG_NAPI_WEIGHT     64U
-
 /*#define AQ_CFG_MAC_ADDR_PERMANENT {0x30, 0x0E, 0xE3, 0x12, 0x34, 0x56}*/
 
 #define AQ_CFG_FC_MODE AQ_NIC_FC_FULL
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
index 06de19f63287..275324c9e51e 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
@@ -1218,7 +1218,7 @@ int aq_ptp_init(struct aq_nic_s *aq_nic, unsigned int idx_vec)
 	atomic_set(&aq_ptp->offset_ingress, 0);
 
 	netif_napi_add(aq_nic_get_ndev(aq_nic), &aq_ptp->napi,
-		       aq_ptp_poll, AQ_CFG_NAPI_WEIGHT);
+		       aq_ptp_poll, NAPI_POLL_WEIGHT);
 
 	aq_ptp->idx_vector = idx_vec;
 
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_vec.c b/drivers/net/ethernet/aquantia/atlantic/aq_vec.c
index e839e1002ec7..f0fdf20f01c1 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_vec.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_vec.c
@@ -120,7 +120,7 @@ struct aq_vec_s *aq_vec_alloc(struct aq_nic_s *aq_nic, unsigned int idx,
 	self->rx_rings = 0;
 
 	netif_napi_add(aq_nic_get_ndev(aq_nic), &self->napi,
-		       aq_vec_poll, AQ_CFG_NAPI_WEIGHT);
+		       aq_vec_poll, NAPI_POLL_WEIGHT);
 
 err_exit:
 	return self;
-- 
2.34.1


  parent reply	other threads:[~2022-04-28 21:23 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 ` Jakub Kicinski [this message]
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 ` [PATCH net-next v2 15/15] qeth: " Jakub Kicinski
2022-04-29  7:39   ` 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-10-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=epomozov@marvell.com \
    --cc=irusskikh@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).