From: Pavel Machek 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 Cc: Jeff Garzik Cc: "James P. Ketrenos" Signed-off-by: Andrew Morton --- 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-07-13 16:55:37.000000000 -0700 +++ devel-akpm/drivers/net/wireless/ipw2100.c 2005-07-13 16:57:38.000000000 -0700 @@ -1082,8 +1082,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); @@ -1094,10 +1092,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) @@ -1195,8 +1189,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; @@ -1283,9 +1275,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; } @@ -1595,8 +1584,6 @@ int ipw2100_set_scan_options(struct ipw2 }; int err; - IPW_DEBUG_INFO("enter\n"); - IPW_DEBUG_SCAN("setting scan options\n"); cmd.host_command_parameters[0] = 0; @@ -1640,8 +1627,6 @@ int ipw2100_start_scan(struct ipw2100_pr 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 @@ -1654,8 +1639,6 @@ int ipw2100_start_scan(struct ipw2100_pr if (err) priv->status &= ~STATUS_SCANNING; - IPW_DEBUG_INFO("exit\n"); - return err; } @@ -3189,8 +3172,6 @@ static void ipw2100_irq_tasklet(struct i ipw2100_enable_interrupts(priv); spin_unlock_irqrestore(&priv->low_lock, flags); - - IPW_DEBUG_ISR("exit\n"); } @@ -4059,10 +4040,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); @@ -4148,43 +4128,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; @@ -4195,17 +4164,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; @@ -4214,24 +4178,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) @@ -4255,11 +4211,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; } @@ -4311,8 +4265,6 @@ static void ipw2100_tx_initialize(struct { int i; - IPW_DEBUG_INFO("enter\n"); - /* * reinitialize packet info lists */ @@ -4351,17 +4303,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) @@ -4382,8 +4329,6 @@ static void ipw2100_tx_free(struct ipw21 kfree(priv->tx_buffers); priv->tx_buffers = NULL; - - IPW_DEBUG_INFO("exit\n"); } @@ -4392,8 +4337,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"); @@ -4415,11 +4358,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; } @@ -4460,8 +4400,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; @@ -4478,16 +4416,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); @@ -4506,8 +4440,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) @@ -4548,8 +4480,6 @@ int ipw2100_set_mac_address(struct ipw21 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); @@ -4559,8 +4489,6 @@ int ipw2100_set_mac_address(struct ipw21 ETH_ALEN); err = ipw2100_hw_send_command(priv, &cmd); - - IPW_DEBUG_INFO("exit\n"); return err; } @@ -4947,8 +4875,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 @@ -5008,8 +4934,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) @@ -5135,8 +5059,6 @@ int ipw2100_set_ibss_beacon_interval(str 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); @@ -5152,9 +5074,6 @@ int ipw2100_set_ibss_beacon_interval(str return err; } } - - IPW_DEBUG_INFO("exit\n"); - return 0; } @@ -5514,8 +5433,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; @@ -5524,9 +5441,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 */ @@ -5603,9 +5517,6 @@ static int ipw2100_adapter_setup(struct if (err) return err; */ - - IPW_DEBUG_INFO("exit\n"); - return 0; } @@ -5651,7 +5562,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) @@ -5668,8 +5578,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) @@ -5691,9 +5599,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; } @@ -6448,8 +6353,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); @@ -6597,8 +6500,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); @@ -6688,17 +6589,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; @@ -8287,8 +8182,6 @@ void ipw2100_wx_event_work(struct ipw210 down(&priv->action_sem); - IPW_DEBUG_WX("enter\n"); - up(&priv->action_sem); wrqu.ap_addr.sa_family = ARPHRD_ETHER; _