From: Pavel Machek <pavel@ucw.cz>

This removes debug prints from entry/exit of functions.  Such level of
debugging should probably be done by gdb or similar.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: "James P. Ketrenos" <ipw2100-admin@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/net/wireless/ipw2100.c |  113 +----------------------------------------
 1 files changed, 3 insertions(+), 110 deletions(-)

diff -puN drivers/net/wireless/ipw2100.c~ipw2100-remove-by-hand-function-entry-exit-debugging drivers/net/wireless/ipw2100.c
--- devel/drivers/net/wireless/ipw2100.c~ipw2100-remove-by-hand-function-entry-exit-debugging	2005-08-30 18:40:59.000000000 -0700
+++ devel-akpm/drivers/net/wireless/ipw2100.c	2005-08-30 18:40:59.000000000 -0700
@@ -1111,8 +1111,6 @@ static void ipw2100_initialize_ordinals(
 {
 	struct ipw2100_ordinals *ord = &priv->ordinals;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	read_register(priv->net_dev, IPW_MEM_HOST_SHARED_ORDINALS_TABLE_1,
 		      &ord->table1_addr);
 
@@ -1123,10 +1121,6 @@ static void ipw2100_initialize_ordinals(
 	read_nic_dword(priv->net_dev, ord->table2_addr, &ord->table2_size);
 
 	ord->table2_size &= 0x0000FFFF;
-
-	IPW_DEBUG_INFO("table 1 size: %d\n", ord->table1_size);
-	IPW_DEBUG_INFO("table 2 size: %d\n", ord->table2_size);
-	IPW_DEBUG_INFO("exit\n");
 }
 
 static inline void ipw2100_hw_set_gpio(struct ipw2100_priv *priv)
@@ -1224,8 +1218,6 @@ static int ipw2100_start_adapter(struct 
 	int i;
 	u32 inta, inta_mask, gpio;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	if (priv->status & STATUS_RUNNING)
 		return 0;
 
@@ -1312,9 +1304,6 @@ static int ipw2100_start_adapter(struct 
 
 	/* The adapter has been reset; we are not associated */
 	priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED);
-
-	IPW_DEBUG_INFO("exit\n");
-
 	return 0;
 }
 
@@ -1624,8 +1613,6 @@ static int ipw2100_set_scan_options(stru
 	};
 	int err;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	IPW_DEBUG_SCAN("setting scan options\n");
 
 	cmd.host_command_parameters[0] = 0;
@@ -1669,8 +1656,6 @@ static int ipw2100_start_scan(struct ipw
 		return 0;
 	}
 
-	IPW_DEBUG_INFO("enter\n");
-
 	/* Not clearing here; doing so makes iwlist always return nothing...
 	 *
 	 * We should modify the table logic to use aging tables vs. clearing
@@ -1683,8 +1668,6 @@ static int ipw2100_start_scan(struct ipw
 	if (err)
 		priv->status &= ~STATUS_SCANNING;
 
-	IPW_DEBUG_INFO("exit\n");
-
 	return err;
 }
 
@@ -3218,8 +3201,6 @@ static void ipw2100_irq_tasklet(struct i
 	ipw2100_enable_interrupts(priv);
 
 	spin_unlock_irqrestore(&priv->low_lock, flags);
-
-	IPW_DEBUG_ISR("exit\n");
 }
 
 
@@ -4088,10 +4069,9 @@ static ssize_t store_scan_age(struct dev
 		priv->ieee->scan_age = val;
 		IPW_DEBUG_INFO("set scan_age = %u\n", priv->ieee->scan_age);
 	}
-
-	IPW_DEBUG_INFO("exit\n");
 	return len;
 }
+
 static DEVICE_ATTR(scan_age, S_IWUSR | S_IRUGO, show_scan_age, store_scan_age);
 
 
@@ -4177,43 +4157,32 @@ static int status_queue_allocate(struct 
 {
 	struct ipw2100_status_queue *q = &priv->status_queue;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	q->size = entries * sizeof(struct ipw2100_status);
 	q->drv = (struct ipw2100_status *)pci_alloc_consistent(
 		priv->pci_dev, q->size, &q->nic);
 	if (!q->drv) {
-		IPW_DEBUG_WARNING(
+		printk(KERN_WARNING DRV_NAME ": "
 		       "Can not allocate status queue.\n");
 		return -ENOMEM;
 	}
 
 	memset(q->drv, 0, q->size);
-
-	IPW_DEBUG_INFO("exit\n");
-
 	return 0;
 }
 
 static void status_queue_free(struct ipw2100_priv *priv)
 {
-	IPW_DEBUG_INFO("enter\n");
-
 	if (priv->status_queue.drv) {
 		pci_free_consistent(
 			priv->pci_dev, priv->status_queue.size,
 			priv->status_queue.drv, priv->status_queue.nic);
 		priv->status_queue.drv = NULL;
 	}
-
-	IPW_DEBUG_INFO("exit\n");
 }
 
 static int bd_queue_allocate(struct ipw2100_priv *priv,
 			     struct ipw2100_bd_queue *q, int entries)
 {
-	IPW_DEBUG_INFO("enter\n");
-
 	memset(q, 0, sizeof(struct ipw2100_bd_queue));
 
 	q->entries = entries;
@@ -4224,17 +4193,12 @@ static int bd_queue_allocate(struct ipw2
 		return -ENOMEM;
 	}
 	memset(q->drv, 0, q->size);
-
-	IPW_DEBUG_INFO("exit\n");
-
 	return 0;
 }
 
 static void bd_queue_free(struct ipw2100_priv *priv,
 			  struct ipw2100_bd_queue *q)
 {
-	IPW_DEBUG_INFO("enter\n");
-
 	if (!q)
 		return;
 
@@ -4243,24 +4207,16 @@ static void bd_queue_free(struct ipw2100
 				    q->size, q->drv, q->nic);
 		q->drv = NULL;
 	}
-
-	IPW_DEBUG_INFO("exit\n");
 }
 
 static void bd_queue_initialize(
 	struct ipw2100_priv *priv, struct ipw2100_bd_queue * q,
 	u32 base, u32 size, u32 r, u32 w)
 {
-	IPW_DEBUG_INFO("enter\n");
-
-	IPW_DEBUG_INFO("initializing bd queue at virt=%p, phys=%08x\n", q->drv, (u32)q->nic);
-
 	write_register(priv->net_dev, base, q->nic);
 	write_register(priv->net_dev, size, q->entries);
 	write_register(priv->net_dev, r, q->oldest);
 	write_register(priv->net_dev, w, q->next);
-
-	IPW_DEBUG_INFO("exit\n");
 }
 
 static void ipw2100_kill_workqueue(struct ipw2100_priv *priv)
@@ -4284,11 +4240,9 @@ static int ipw2100_tx_allocate(struct ip
 	void *v;
 	dma_addr_t p;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	err = bd_queue_allocate(priv, &priv->tx_queue, TX_QUEUE_LENGTH);
 	if (err) {
-		IPW_DEBUG_ERROR("%s: failed bd_queue_allocate\n",
+		printk(KERN_ERR DRV_NAME ": %s: failed bd_queue_allocate\n",
 		       priv->net_dev->name);
 		return err;
 	}
@@ -4340,8 +4294,6 @@ static void ipw2100_tx_initialize(struct
 {
 	int i;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	/*
 	 * reinitialize packet info lists
 	 */
@@ -4380,17 +4332,12 @@ static void ipw2100_tx_initialize(struct
 			    IPW_MEM_HOST_SHARED_TX_QUEUE_BD_SIZE,
 			    IPW_MEM_HOST_SHARED_TX_QUEUE_READ_INDEX,
 			    IPW_MEM_HOST_SHARED_TX_QUEUE_WRITE_INDEX);
-
-	IPW_DEBUG_INFO("exit\n");
-
 }
 
 static void ipw2100_tx_free(struct ipw2100_priv *priv)
 {
 	int i;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	bd_queue_free(priv, &priv->tx_queue);
 
 	if (!priv->tx_buffers)
@@ -4411,8 +4358,6 @@ static void ipw2100_tx_free(struct ipw21
 
 	kfree(priv->tx_buffers);
 	priv->tx_buffers = NULL;
-
-	IPW_DEBUG_INFO("exit\n");
 }
 
 
@@ -4421,8 +4366,6 @@ static int ipw2100_rx_allocate(struct ip
 {
 	int i, j, err = -EINVAL;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	err = bd_queue_allocate(priv, &priv->rx_queue, RX_QUEUE_LENGTH);
 	if (err) {
 		IPW_DEBUG_INFO("failed bd_queue_allocate\n");
@@ -4444,11 +4387,8 @@ static int ipw2100_rx_allocate(struct ip
 		    GFP_KERNEL);
 	if (!priv->rx_buffers) {
 		IPW_DEBUG_INFO("can't allocate rx packet buffer table\n");
-
 		bd_queue_free(priv, &priv->rx_queue);
-
 		status_queue_free(priv);
-
 		return -ENOMEM;
 	}
 
@@ -4489,8 +4429,6 @@ static int ipw2100_rx_allocate(struct ip
 
 static void ipw2100_rx_initialize(struct ipw2100_priv *priv)
 {
-	IPW_DEBUG_INFO("enter\n");
-
 	priv->rx_queue.oldest = 0;
 	priv->rx_queue.available = priv->rx_queue.entries - 1;
 	priv->rx_queue.next = priv->rx_queue.entries - 1;
@@ -4507,16 +4445,12 @@ static void ipw2100_rx_initialize(struct
 	/* set up the status queue */
 	write_register(priv->net_dev, IPW_MEM_HOST_SHARED_RX_STATUS_BASE,
 		       priv->status_queue.nic);
-
-	IPW_DEBUG_INFO("exit\n");
 }
 
 static void ipw2100_rx_free(struct ipw2100_priv *priv)
 {
 	int i;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	bd_queue_free(priv, &priv->rx_queue);
 	status_queue_free(priv);
 
@@ -4535,8 +4469,6 @@ static void ipw2100_rx_free(struct ipw21
 
 	kfree(priv->rx_buffers);
 	priv->rx_buffers = NULL;
-
-	IPW_DEBUG_INFO("exit\n");
 }
 
 static int ipw2100_read_mac_address(struct ipw2100_priv *priv)
@@ -4577,8 +4509,6 @@ static int ipw2100_set_mac_address(struc
 
 	IPW_DEBUG_HC("SET_MAC_ADDRESS\n");
 
-	IPW_DEBUG_INFO("enter\n");
-
 	if (priv->config & CFG_CUSTOM_MAC) {
 		memcpy(cmd.host_command_parameters, priv->mac_addr,
 		       ETH_ALEN);
@@ -4588,8 +4518,6 @@ static int ipw2100_set_mac_address(struc
 		       ETH_ALEN);
 
 	err = ipw2100_hw_send_command(priv, &cmd);
-
-	IPW_DEBUG_INFO("exit\n");
 	return err;
 }
 
@@ -4978,8 +4906,6 @@ static int ipw2100_disassociate_bssid(st
 	int err;
 	int len;
 
-	IPW_DEBUG_HC("DISASSOCIATION_BSSID\n");
-
 	len = ETH_ALEN;
 	/* The Firmware currently ignores the BSSID and just disassociates from
 	 * the currently associated AP -- but in the off chance that a future
@@ -5039,8 +4965,6 @@ static int ipw2100_set_wpa_ie(struct ipw
 	};
 	int err;
 
-	IPW_DEBUG_HC("SET_WPA_IE\n");
-
 	if (!batch_mode) {
 		err = ipw2100_disable_adapter(priv);
 		if (err)
@@ -5166,8 +5090,6 @@ static int ipw2100_set_ibss_beacon_inter
 
 	cmd.host_command_parameters[0] = interval;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	if (priv->ieee->iw_mode == IW_MODE_ADHOC) {
 		if (!batch_mode) {
 			err = ipw2100_disable_adapter(priv);
@@ -5183,9 +5105,6 @@ static int ipw2100_set_ibss_beacon_inter
 				return err;
 		}
 	}
-
-	IPW_DEBUG_INFO("exit\n");
-
 	return 0;
 }
 
@@ -5545,8 +5464,6 @@ static int ipw2100_adapter_setup(struct 
 	int batch_mode = 1;
 	u8 *bssid;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	err = ipw2100_disable_adapter(priv);
 	if (err)
 		return err;
@@ -5555,9 +5472,6 @@ static int ipw2100_adapter_setup(struct 
 		err = ipw2100_set_channel(priv, priv->channel, batch_mode);
 		if (err)
 			return err;
-
-		IPW_DEBUG_INFO("exit\n");
-
 		return 0;
 	}
 #endif /* CONFIG_IPW2100_MONITOR */
@@ -5634,9 +5548,6 @@ static int ipw2100_adapter_setup(struct 
 	  if (err)
 	  return err;
 	*/
-
-	IPW_DEBUG_INFO("exit\n");
-
 	return 0;
 }
 
@@ -5682,7 +5593,6 @@ static int ipw2100_open(struct net_devic
 {
 	struct ipw2100_priv *priv = ieee80211_priv(dev);
 	unsigned long flags;
-	IPW_DEBUG_INFO("dev->open\n");
 
 	spin_lock_irqsave(&priv->low_lock, flags);
 	if (priv->status & STATUS_ASSOCIATED) {
@@ -5701,8 +5611,6 @@ static int ipw2100_close(struct net_devi
 	struct list_head *element;
 	struct ipw2100_tx_packet *packet;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	spin_lock_irqsave(&priv->low_lock, flags);
 
 	if (priv->status & STATUS_ASSOCIATED)
@@ -5724,9 +5632,6 @@ static int ipw2100_close(struct net_devi
 		INC_STAT(&priv->tx_free_stat);
 	}
 	spin_unlock_irqrestore(&priv->low_lock, flags);
-
-	IPW_DEBUG_INFO("exit\n");
-
 	return 0;
 }
 
@@ -6481,8 +6386,6 @@ static int ipw2100_pci_init_one(struct p
 	int registered = 0;
 	u32 val;
 
-	IPW_DEBUG_INFO("enter\n");
-
 	mem_start = pci_resource_start(pci_dev, 0);
 	mem_len = pci_resource_len(pci_dev, 0);
 	mem_flags = pci_resource_flags(pci_dev, 0);
@@ -6630,8 +6533,6 @@ static int ipw2100_pci_init_one(struct p
 		ipw2100_start_scan(priv);
 	}
 
-	IPW_DEBUG_INFO("exit\n");
-
 	priv->status |= STATUS_INITIALIZED;
 
 	up(&priv->action_sem);
@@ -6721,17 +6622,11 @@ static void __devexit ipw2100_pci_remove
 
 	pci_release_regions(pci_dev);
 	pci_disable_device(pci_dev);
-
-	IPW_DEBUG_INFO("exit\n");
 }
 
 
 #ifdef CONFIG_PM
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
-static int ipw2100_suspend(struct pci_dev *pci_dev, u32 state)
-#else
 static int ipw2100_suspend(struct pci_dev *pci_dev, pm_message_t state)
-#endif
 {
 	struct ipw2100_priv *priv = pci_get_drvdata(pci_dev);
 	struct net_device *dev = priv->net_dev;
@@ -8320,8 +8215,6 @@ static void ipw2100_wx_event_work(struct
 
 	down(&priv->action_sem);
 
-	IPW_DEBUG_WX("enter\n");
-
 	up(&priv->action_sem);
 
 	wrqu.ap_addr.sa_family = ARPHRD_ETHER;
_