All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Belous <Pavel.Belous@aquantia.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org,
	Simon Edelhaus <Simon.Edelhaus@aquantia.com>,
	Alexey Andriyanov <Alexey.Andriyanov@aquantia.com>,
	Lino Sanfilippo <LinoSanfilippo@gmx.de>,
	Pavel Belous <pavel.belous@aquantia.com>
Subject: [PATCH net-next 02/13] net: ethernet: aquantia: Removed busy_count field.
Date: Wed, 15 Feb 2017 23:01:10 +0300	[thread overview]
Message-ID: <d9dd4feb0cd2c9ecb3ea8bb66ff7e440ad53eef8.1487187192.git.pavel.belous@aquantia.com> (raw)
In-Reply-To: <cover.1487187192.git.pavel.belous@aquantia.com>

From: Pavel Belous <pavel.belous@aquantia.com>

 busy_count field and is_busy flag is not needed at all.

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
---
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c   | 11 -----------
 drivers/net/ethernet/aquantia/atlantic/aq_utils.h |  1 -
 2 files changed, 12 deletions(-)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index aa22a7c..a153750 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -122,14 +122,11 @@ static void aq_nic_service_timer_cb(unsigned long param)
 	struct aq_nic_s *self = (struct aq_nic_s *)param;
 	struct net_device *ndev = aq_nic_get_ndev(self);
 	int err = 0;
-	bool is_busy = false;
 	unsigned int i = 0U;
 	struct aq_hw_link_status_s link_status;
 	struct aq_ring_stats_rx_s stats_rx;
 	struct aq_ring_stats_tx_s stats_tx;
 
-	atomic_inc(&self->header.busy_count);
-	is_busy = true;
 	if (aq_utils_obj_test(&self->header.flags, AQ_NIC_FLAGS_IS_NOT_READY))
 		goto err_exit;
 
@@ -170,8 +167,6 @@ static void aq_nic_service_timer_cb(unsigned long param)
 	ndev->stats.tx_errors = stats_tx.errors;
 
 err_exit:
-	if (is_busy)
-		atomic_dec(&self->header.busy_count);
 	mod_timer(&self->service_timer,
 		  jiffies + AQ_CFG_SERVICE_TIMER_INTERVAL);
 }
@@ -574,16 +569,12 @@ __acquires(&ring->lock)
 	unsigned int trys = AQ_CFG_LOCK_TRYS;
 	int err = 0;
 	bool is_nic_in_bad_state;
-	bool is_busy = false;
 	struct aq_ring_buff_s buffers[AQ_CFG_SKB_FRAGS_MAX];
 
 	frags = skb_shinfo(skb)->nr_frags + 1;
 
 	ring = self->aq_ring_tx[AQ_NIC_TCVEC2RING(self, tc, vec)];
 
-	atomic_inc(&self->header.busy_count);
-	is_busy = true;
-
 	if (frags > AQ_CFG_SKB_FRAGS_MAX) {
 		dev_kfree_skb_any(skb);
 		goto err_exit;
@@ -629,8 +620,6 @@ __acquires(&ring->lock)
 	}
 
 err_exit:
-	if (is_busy)
-		atomic_dec(&self->header.busy_count);
 	return err;
 }
 
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_utils.h b/drivers/net/ethernet/aquantia/atlantic/aq_utils.h
index 4446bd9..f6012b3 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_utils.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_utils.h
@@ -19,7 +19,6 @@
 struct aq_obj_s {
 	spinlock_t lock; /* spinlock for nic/rings processing */
 	atomic_t flags;
-	atomic_t busy_count;
 };
 
 static inline void aq_utils_obj_set(atomic_t *flags, u32 mask)
-- 
2.7.4

  parent reply	other threads:[~2017-02-15 20:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15 20:01 [PATCH net-next 00/13] net: ethernet: aquantia: improvements and fixes Pavel Belous
2017-02-15 20:01 ` [PATCH net-next 01/13] net: ethernet: aquantia: Removed extra assignment for skb->dev Pavel Belous
2017-02-15 20:53   ` Lino Sanfilippo
2017-02-15 20:01 ` Pavel Belous [this message]
2017-02-15 20:56   ` [PATCH net-next 02/13] net: ethernet: aquantia: Removed busy_count field Lino Sanfilippo
2017-02-15 20:01 ` [PATCH net-next 03/13] net: ethernet: aquantia: Removed unnecessary comparsion "old_mtu == new_mtu" Pavel Belous
2017-02-15 20:56   ` Lino Sanfilippo
2017-02-15 20:01 ` [PATCH net-next 04/13] net: ethernet: aquantia: Using module_pci_driver Pavel Belous
2017-02-15 20:57   ` Lino Sanfilippo
2017-02-15 20:01 ` [PATCH net-next 05/13] net: ethernet: aquantia: Superfluous initialization of "err" Pavel Belous
2017-02-15 21:01   ` Lino Sanfilippo
2017-02-15 20:01 ` [PATCH net-next 06/13] net: ethernet: aquantia: Fixed missing rtnl_unlock Pavel Belous
2017-02-15 21:02   ` Lino Sanfilippo
2017-02-15 20:01 ` [PATCH net-next 07/13] net: ethernet: aquantia: Using NETDEV_TX_OK instead 0 Pavel Belous
2017-02-15 21:02   ` Lino Sanfilippo
2017-02-15 20:01 ` [PATCH net-next 08/13] net: ethernet: aquantia: Null pointer check for aq_nic_ndev_alloc Pavel Belous
2017-02-15 21:04   ` Lino Sanfilippo
2017-02-15 20:01 ` [PATCH net-next 09/13] net: ethernet: aquantia: Call netdev_register after all initialized Pavel Belous
2017-02-15 21:18   ` Lino Sanfilippo
2017-02-15 20:01 ` [PATCH net-next 10/13] net: ethernet: aquantia: Checking for success dma_map_single Pavel Belous
2017-02-15 21:23   ` Lino Sanfilippo
2017-02-15 21:40     ` Lino Sanfilippo
2017-02-15 21:47       ` Pavel Belous
2017-02-15 20:01 ` [PATCH net-next 11/13] net: ethernet: aquantia: Refactoring buffers copying Pavel Belous
2017-02-15 21:31   ` Lino Sanfilippo
2017-02-15 21:50     ` Pavel Belous
2017-02-16 13:10     ` David Laight
2017-02-16 16:02       ` Lino Sanfilippo
2017-02-16 16:37         ` David Laight
2017-02-19 10:36           ` Lino Sanfilippo
2017-02-15 20:01 ` [PATCH net-next 12/13] net: ethernet: aquantia: Fixed incorrect buff->len calculation Pavel Belous
2017-02-15 20:01 ` [PATCH net-next 13/13] net: ethernet: aquantia: Fixed memory allocation if AQ_CFG_RX_FRAME_MAX > 1 page Pavel Belous

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=d9dd4feb0cd2c9ecb3ea8bb66ff7e440ad53eef8.1487187192.git.pavel.belous@aquantia.com \
    --to=pavel.belous@aquantia.com \
    --cc=Alexey.Andriyanov@aquantia.com \
    --cc=LinoSanfilippo@gmx.de \
    --cc=Simon.Edelhaus@aquantia.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.