public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux•intel.com>
To: "David S. Miller" <davem@davemloft•net>, netdev@vger•kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux•intel.com>
Subject: [PATCH v2 02/13] enc28j60: Remove duplicate messaging
Date: Tue, 19 Mar 2019 20:49:19 +0200	[thread overview]
Message-ID: <20190319184930.72977-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20190319184930.72977-1-andriy.shevchenko@linux.intel.com>

The ->probe() and ->remove() stages can be easily debugged with
initcall_debug or function tracer. There is no need to repeat the same
explicitly in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux•intel.com>
---
 drivers/net/ethernet/microchip/enc28j60.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/net/ethernet/microchip/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c
index 559f62ef2598..874ec5f6c4e4 100644
--- a/drivers/net/ethernet/microchip/enc28j60.c
+++ b/drivers/net/ethernet/microchip/enc28j60.c
@@ -186,9 +186,6 @@ static int spi_write_op(struct enc28j60_net *priv, u8 op,
 
 static void enc28j60_soft_reset(struct enc28j60_net *priv)
 {
-	if (netif_msg_hw(priv))
-		printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __func__);
-
 	spi_write_op(priv, ENC28J60_SOFT_RESET, 0, ENC28J60_SOFT_RESET);
 	/* Errata workaround #1, CLKRDY check is unreliable,
 	 * delay at least 1 mS instead */
@@ -1124,8 +1121,6 @@ static void enc28j60_irq_work_handler(struct work_struct *work)
 	struct net_device *ndev = priv->netdev;
 	int intflags, loop;
 
-	if (netif_msg_intr(priv))
-		printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __func__);
 	/* disable further interrupts */
 	locked_reg_bfclr(priv, EIE, EIE_INTIE);
 
@@ -1228,8 +1223,6 @@ static void enc28j60_irq_work_handler(struct work_struct *work)
 
 	/* re-enable interrupts */
 	locked_reg_bfset(priv, EIE, EIE_INTIE);
-	if (netif_msg_intr(priv))
-		printk(KERN_DEBUG DRV_NAME ": %s() exit\n", __func__);
 }
 
 /*
@@ -1287,9 +1280,6 @@ static netdev_tx_t enc28j60_send_packet(struct sk_buff *skb,
 {
 	struct enc28j60_net *priv = netdev_priv(dev);
 
-	if (netif_msg_tx_queued(priv))
-		printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __func__);
-
 	/* If some error occurs while trying to transmit this
 	 * packet, you should return '1' from this function.
 	 * In such a case you _may not_ do anything to the
@@ -1356,9 +1346,6 @@ static int enc28j60_net_open(struct net_device *dev)
 {
 	struct enc28j60_net *priv = netdev_priv(dev);
 
-	if (netif_msg_drv(priv))
-		printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __func__);
-
 	if (!is_valid_ether_addr(dev->dev_addr)) {
 		if (netif_msg_ifup(priv))
 			dev_err(&dev->dev, "invalid MAC address %pM\n",
@@ -1392,9 +1379,6 @@ static int enc28j60_net_close(struct net_device *dev)
 {
 	struct enc28j60_net *priv = netdev_priv(dev);
 
-	if (netif_msg_drv(priv))
-		printk(KERN_DEBUG DRV_NAME ": %s() enter\n", __func__);
-
 	enc28j60_hw_disable(priv);
 	enc28j60_lowpower(priv, true);
 	netif_stop_queue(dev);
@@ -1619,7 +1603,6 @@ static int enc28j60_probe(struct spi_device *spi)
 				" failed (ret = %d)\n", ret);
 		goto error_register;
 	}
-	dev_info(&dev->dev, DRV_NAME " driver registered\n");
 
 	return 0;
 
@@ -1635,9 +1618,6 @@ static int enc28j60_remove(struct spi_device *spi)
 {
 	struct enc28j60_net *priv = spi_get_drvdata(spi);
 
-	if (netif_msg_drv(priv))
-		printk(KERN_DEBUG DRV_NAME ": remove\n");
-
 	unregister_netdev(priv->netdev);
 	free_irq(spi->irq, priv);
 	free_netdev(priv->netdev);
-- 
2.20.1


  parent reply	other threads:[~2019-03-19 18:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 18:49 [PATCH v2 00/13] enc28j60: messaging clean up and ACPI improvements Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 01/13] enc28j60: Use device_get_mac_address() Andy Shevchenko
2019-03-19 18:49 ` Andy Shevchenko [this message]
2019-03-19 18:49 ` [PATCH v2 03/13] enc28j60: Replace dev_*(&netdev->dev, ...) with netdev_*() Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 04/13] enc28j60: Drop driver name duplication from messages Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 05/13] enc28j60: Switch to use module_spi_driver() macro Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 06/13] enc28j60: Use ether_addr_copy() in enc28j60_set_mac_address() Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 07/13] enc28j60: Switch to dev_<level> from pr_<level> Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 08/13] enc28j60: Convert HW related printk() to dev_printk() Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 09/13] enc28j60: Convert printk() to netdev_printk() Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 10/13] enc28j60: Remove linux/init.h Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 11/13] enc28j60: Amend comments by fixing typos, adding periods, etc Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 12/13] enc28j60: Fix indentation splats Andy Shevchenko
2019-03-19 18:49 ` [PATCH v2 13/13] enc28j60: Convert to use SPDX identifier Andy Shevchenko
2019-03-19 21:59 ` [PATCH v2 00/13] enc28j60: messaging clean up and ACPI improvements David Miller
  -- strict thread matches above, loose matches on Subject: below --
2019-03-18 16:10 [PATCH v2 01/13] enc28j60: Use device_get_mac_address() Andy Shevchenko
2019-03-18 16:10 ` [PATCH v2 02/13] enc28j60: Remove duplicate messaging Andy Shevchenko

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=20190319184930.72977-3-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux$(echo .)intel.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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