Message ID | d0cc78c16143f5f54ebcfc4a71e340d8c646aa82.1397741141.git.gamerh2o@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Thu, 2014-04-17 at 21:27 +0800, Zhao, Gang wrote: > Dynamic debug function wiphy_dbg() is more convenient for debugging, > and if user doesn't enable CONFIG_DYNAMIC_DEBUG, it will fall back to > normal static debug, just as what wiphy_debug() does. Hi. Your premise is not correct. wiphy_debug will always emit a message. wiphy_dbg will only emit a message when #DEBUG is #defined or CONFIG_DYNAMIC_DEBUG is enabled and the message is specifically enabled by the dynamic_debug control file. > When all the users of wiphy_debug() are gone, wiphy_debug() can be > removed. Not really. Please use git format-patch --cover-letter when sending a patch series so that these sorts of replies can be done to the cover letter of the series instead of individually. Using a cover-letter "[PATCH 0/N]" also makes it easier for maintainers to send acknowledgements if applying the entire series. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2014-04-17 at 10:15:00 -0700, Joe Perches wrote: > On Thu, 2014-04-17 at 21:27 +0800, Zhao, Gang wrote: >> Dynamic debug function wiphy_dbg() is more convenient for debugging, >> and if user doesn't enable CONFIG_DYNAMIC_DEBUG, it will fall back to >> normal static debug, just as what wiphy_debug() does. > > Hi. > > Your premise is not correct. > > wiphy_debug will always emit a message. > > wiphy_dbg will only emit a message when #DEBUG > is #defined or CONFIG_DYNAMIC_DEBUG is enabled > and the message is specifically enabled by the > dynamic_debug control file. > Yes, you are right. wiphy_debug() will always print a debug level message. It's not true to wiphy_dbg(). I still prefer to use wiphy_dbg() to print debug messages, since it's "dynamic", and debug messages may not be needed in normal use. >> When all the users of wiphy_debug() are gone, wiphy_debug() can be >> removed. > > Not really. > Surely wiphy_debug() will be reserved, since wiphy_dbg() can't replace it. > Please use git format-patch --cover-letter when > sending a patch series so that these sorts of > replies can be done to the cover letter of the > series instead of individually. > > Using a cover-letter "[PATCH 0/N]" also makes it > easier for maintainers to send acknowledgements > if applying the entire series. I will resend the patch set with cover letter(excluding the last patch). Thanks for your comments. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c index 153c615..2212e99 100644 --- a/drivers/net/wireless/p54/txrx.c +++ b/drivers/net/wireless/p54/txrx.c @@ -39,8 +39,8 @@ static void p54_dump_tx_queue(struct p54_common *priv) u32 largest_hole = 0, free; spin_lock_irqsave(&priv->tx_queue.lock, flags); - wiphy_debug(priv->hw->wiphy, "/ --- tx queue dump (%d entries) ---\n", - skb_queue_len(&priv->tx_queue)); + wiphy_dbg(priv->hw->wiphy, "/ --- tx queue dump (%d entries) ---\n", + skb_queue_len(&priv->tx_queue)); prev_addr = priv->rx_start; skb_queue_walk(&priv->tx_queue, skb) { @@ -49,23 +49,23 @@ static void p54_dump_tx_queue(struct p54_common *priv) hdr = (void *) skb->data; free = range->start_addr - prev_addr; - wiphy_debug(priv->hw->wiphy, - "| [%02d] => [skb:%p skb_len:0x%04x " - "hdr:{flags:%02x len:%04x req_id:%04x type:%02x} " - "mem:{start:%04x end:%04x, free:%d}]\n", - i++, skb, skb->len, - le16_to_cpu(hdr->flags), le16_to_cpu(hdr->len), - le32_to_cpu(hdr->req_id), le16_to_cpu(hdr->type), - range->start_addr, range->end_addr, free); + wiphy_dbg(priv->hw->wiphy, + "| [%02d] => [skb:%p skb_len:0x%04x " + "hdr:{flags:%02x len:%04x req_id:%04x type:%02x} " + "mem:{start:%04x end:%04x, free:%d}]\n", + i++, skb, skb->len, + le16_to_cpu(hdr->flags), le16_to_cpu(hdr->len), + le32_to_cpu(hdr->req_id), le16_to_cpu(hdr->type), + range->start_addr, range->end_addr, free); prev_addr = range->end_addr; largest_hole = max(largest_hole, free); } free = priv->rx_end - prev_addr; largest_hole = max(largest_hole, free); - wiphy_debug(priv->hw->wiphy, - "\\ --- [free: %d], largest free block: %d ---\n", - free, largest_hole); + wiphy_dbg(priv->hw->wiphy, + "\\ --- [free: %d], largest free block: %d ---\n", + free, largest_hole); spin_unlock_irqrestore(&priv->tx_queue.lock, flags); } #endif /* P54_MM_DEBUG */ @@ -657,9 +657,9 @@ static int p54_rx_control(struct p54_common *priv, struct sk_buff *skb) p54_rx_eeprom_readback(priv, skb); break; default: - wiphy_debug(priv->hw->wiphy, - "not handling 0x%02x type control frame\n", - le16_to_cpu(hdr->type)); + wiphy_dbg(priv->hw->wiphy, + "not handling 0x%02x type control frame\n", + le16_to_cpu(hdr->type)); break; } return 0;
Dynamic debug function wiphy_dbg() is more convenient for debugging, and if user doesn't enable CONFIG_DYNAMIC_DEBUG, it will fall back to normal static debug, just as what wiphy_debug() does. When all the users of wiphy_debug() are gone, wiphy_debug() can be removed. Cc: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> --- drivers/net/wireless/p54/txrx.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)