summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btmrvl_main.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-06-13 07:40:18 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-08-22 14:25:34 -0700
commit9374253ffe609f2d70dd5ae280182cb6f08fef08 (patch)
treed84aabb99ba9b83f170dacb3caef3b9540420ea1 /drivers/bluetooth/btmrvl_main.c
parente0721f99ba33d13a88746732be2d74ca805abf55 (diff)
downloadlinux-9374253ffe609f2d70dd5ae280182cb6f08fef08.tar.gz
linux-9374253ffe609f2d70dd5ae280182cb6f08fef08.tar.bz2
linux-9374253ffe609f2d70dd5ae280182cb6f08fef08.zip
Bluetooth: Remove Enter/Leave debug statements from Marvell driver
The Marvell Bluetooth driver is full of Enter/Leave debug statements and all of them are really pointless and only clutter the code. Seems to be some left-overs when they ported the driver from Windows. For the Linux driver lets remove these. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btmrvl_main.c')
-rw-r--r--drivers/bluetooth/btmrvl_main.c107
1 files changed, 11 insertions, 96 deletions
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index bbc4446c4b4b..e605563b4eaa 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -32,8 +32,6 @@
*/
void btmrvl_interrupt(struct btmrvl_private *priv)
{
- BT_DBG("Enter");
-
priv->adapter->ps_state = PS_AWAKE;
priv->adapter->wakeup_tries = 0;
@@ -41,8 +39,6 @@ void btmrvl_interrupt(struct btmrvl_private *priv)
priv->adapter->int_count++;
wake_up_interruptible(&priv->main_thread.wait_q);
-
- BT_DBG("Leave");
}
EXPORT_SYMBOL_GPL(btmrvl_interrupt);
@@ -52,8 +48,6 @@ void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
struct hci_ev_cmd_complete *ec;
u16 opcode, ocf;
- BT_DBG("Enter");
-
if (hdr->evt == HCI_EV_CMD_COMPLETE) {
ec = (void *) (skb->data + HCI_EVENT_HDR_SIZE);
opcode = __le16_to_cpu(ec->opcode);
@@ -65,8 +59,6 @@ void btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
wake_up_interruptible(&priv->adapter->cmd_wait_q);
}
}
-
- BT_DBG("Leave");
}
EXPORT_SYMBOL_GPL(btmrvl_check_evtpkt);
@@ -76,8 +68,6 @@ int btmrvl_process_event(struct btmrvl_private *priv, struct sk_buff *skb)
struct btmrvl_event *event;
u8 ret = 0;
- BT_DBG("Enter");
-
event = (struct btmrvl_event *) skb->data;
if (event->ec != 0xff) {
BT_DBG("Not Marvell Event=%x", event->ec);
@@ -151,8 +141,6 @@ exit:
if (!ret)
kfree_skb(skb);
- BT_DBG("Leave");
-
return ret;
}
EXPORT_SYMBOL_GPL(btmrvl_process_event);
@@ -161,15 +149,12 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd)
{
struct sk_buff *skb;
struct btmrvl_cmd *cmd;
- u8 ret = 0;
-
- BT_DBG("Enter");
+ int ret = 0;
skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC);
if (skb == NULL) {
BT_ERR("No free skb");
- ret = -ENOMEM;
- goto exit;
+ return -ENOMEM;
}
cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
@@ -200,9 +185,6 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd)
BT_DBG("module cfg Command done");
-exit:
- BT_DBG("Leave");
-
return ret;
}
EXPORT_SYMBOL_GPL(btmrvl_send_module_cfg_cmd);
@@ -211,15 +193,12 @@ static int btmrvl_enable_hs(struct btmrvl_private *priv)
{
struct sk_buff *skb;
struct btmrvl_cmd *cmd;
- u8 ret = 0;
-
- BT_DBG("Enter");
+ int ret = 0;
skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC);
if (skb == NULL) {
BT_ERR("No free skb");
- ret = -ENOMEM;
- goto exit;
+ return -ENOMEM;
}
cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
@@ -244,9 +223,6 @@ static int btmrvl_enable_hs(struct btmrvl_private *priv)
priv->adapter->wakeup_tries);
}
-exit:
- BT_DBG("Leave");
-
return ret;
}
@@ -254,9 +230,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv)
{
struct sk_buff *skb = NULL;
struct btmrvl_cmd *cmd;
- u8 ret = 0;
-
- BT_DBG("Enter");
+ int ret = 0;
if (priv->btmrvl_dev.hscfgcmd) {
priv->btmrvl_dev.hscfgcmd = 0;
@@ -264,8 +238,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv)
skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC);
if (skb == NULL) {
BT_ERR("No free skb");
- ret = -ENOMEM;
- goto exit;
+ return -ENOMEM;
}
cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
@@ -289,8 +262,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv)
skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC);
if (skb == NULL) {
BT_ERR("No free skb");
- ret = -ENOMEM;
- goto exit;
+ return -ENOMEM;
}
cmd = (struct btmrvl_cmd *) skb_put(skb, sizeof(*cmd));
@@ -321,27 +293,19 @@ int btmrvl_prepare_command(struct btmrvl_private *priv)
}
}
-exit:
- BT_DBG("Leave");
-
return ret;
}
static int btmrvl_tx_pkt(struct btmrvl_private *priv, struct sk_buff *skb)
{
- u8 ret = 0;
+ int ret = 0;
- BT_DBG("Enter");
-
- if (!skb || !skb->data) {
- BT_DBG("Leave");
+ if (!skb || !skb->data)
return -EINVAL;
- }
if (!skb->len || ((skb->len + BTM_HEADER_LEN) > BTM_UPLD_SIZE)) {
BT_ERR("Tx Error: Bad skb length %d : %d",
skb->len, BTM_UPLD_SIZE);
- BT_DBG("Leave");
return -EINVAL;
}
@@ -353,7 +317,6 @@ static int btmrvl_tx_pkt(struct btmrvl_private *priv, struct sk_buff *skb)
BT_ERR("Tx Error: realloc_headroom failed %d",
BTM_HEADER_LEN);
skb = tmp;
- BT_DBG("Leave");
return -EINVAL;
}
@@ -375,52 +338,35 @@ static int btmrvl_tx_pkt(struct btmrvl_private *priv, struct sk_buff *skb)
if (priv->hw_host_to_card)
ret = priv->hw_host_to_card(priv, skb->data, skb->len);
- BT_DBG("Leave");
-
return ret;
}
static void btmrvl_init_adapter(struct btmrvl_private *priv)
{
- BT_DBG("Enter");
-
skb_queue_head_init(&priv->adapter->tx_queue);
priv->adapter->ps_state = PS_AWAKE;
init_waitqueue_head(&priv->adapter->cmd_wait_q);
-
- BT_DBG("Leave");
}
static void btmrvl_free_adapter(struct btmrvl_private *priv)
{
- BT_DBG("Enter");
-
skb_queue_purge(&priv->adapter->tx_queue);
kfree(priv->adapter);
priv->adapter = NULL;
-
- BT_DBG("Leave");
}
static int btmrvl_ioctl(struct hci_dev *hdev,
unsigned int cmd, unsigned long arg)
{
- BT_DBG("Enter");
-
- BT_DBG("Leave");
-
return -ENOIOCTLCMD;
}
static void btmrvl_destruct(struct hci_dev *hdev)
{
- BT_DBG("Enter");
-
- BT_DBG("Leave");
}
static int btmrvl_send_frame(struct sk_buff *skb)
@@ -428,11 +374,10 @@ static int btmrvl_send_frame(struct sk_buff *skb)
struct hci_dev *hdev = (struct hci_dev *) skb->dev;
struct btmrvl_private *priv = NULL;
- BT_DBG("Enter: type=%d, len=%d", skb->pkt_type, skb->len);
+ BT_DBG("type=%d, len=%d", skb->pkt_type, skb->len);
if (!hdev || !hdev->driver_data) {
BT_ERR("Frame for unknown HCI device");
- BT_DBG("Leave");
return -ENODEV;
}
@@ -441,7 +386,6 @@ static int btmrvl_send_frame(struct sk_buff *skb)
BT_ERR("Failed testing HCI_RUNING, flags=%lx", hdev->flags);
print_hex_dump_bytes("data: ", DUMP_PREFIX_OFFSET,
skb->data, skb->len);
- BT_DBG("Leave");
return -EBUSY;
}
@@ -463,8 +407,6 @@ static int btmrvl_send_frame(struct sk_buff *skb)
wake_up_interruptible(&priv->main_thread.wait_q);
- BT_DBG("Leave");
-
return 0;
}
@@ -472,12 +414,8 @@ static int btmrvl_flush(struct hci_dev *hdev)
{
struct btmrvl_private *priv = hdev->driver_data;
- BT_DBG("Enter");
-
skb_queue_purge(&priv->adapter->tx_queue);
- BT_DBG("Leave");
-
return 0;
}
@@ -485,28 +423,18 @@ static int btmrvl_close(struct hci_dev *hdev)
{
struct btmrvl_private *priv = hdev->driver_data;
- BT_DBG("Enter");
-
- if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) {
- BT_DBG("Leave");
+ if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
return 0;
- }
skb_queue_purge(&priv->adapter->tx_queue);
- BT_DBG("Leave");
-
return 0;
}
static int btmrvl_open(struct hci_dev *hdev)
{
- BT_DBG("Enter");
-
set_bit(HCI_RUNNING, &hdev->flags);
- BT_DBG("Leave");
-
return 0;
}
@@ -523,8 +451,6 @@ static int btmrvl_service_main_thread(void *data)
struct sk_buff *skb;
ulong flags;
- BT_DBG("Enter");
-
init_waitqueue_entry(&wait, current);
current->flags |= PF_NOFREEZE;
@@ -582,8 +508,6 @@ static int btmrvl_service_main_thread(void *data)
}
}
- BT_DBG("Leave");
-
return 0;
}
@@ -593,8 +517,6 @@ struct btmrvl_private *btmrvl_add_card(void *card)
struct btmrvl_private *priv;
int ret;
- BT_DBG("Enter");
-
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) {
BT_ERR("Can not allocate priv");
@@ -649,7 +571,6 @@ struct btmrvl_private *btmrvl_add_card(void *card)
btmrvl_debugfs_init(hdev);
#endif
- BT_DBG("Leave");
return priv;
err_hci_register_dev:
@@ -665,8 +586,6 @@ err_adapter:
kfree(priv);
err_priv:
- BT_DBG("Leave");
-
return NULL;
}
EXPORT_SYMBOL_GPL(btmrvl_add_card);
@@ -675,8 +594,6 @@ int btmrvl_remove_card(struct btmrvl_private *priv)
{
struct hci_dev *hdev;
- BT_DBG("Enter");
-
hdev = priv->btmrvl_dev.hcidev;
wake_up_interruptible(&priv->adapter->cmd_wait_q);
@@ -697,8 +614,6 @@ int btmrvl_remove_card(struct btmrvl_private *priv)
kfree(priv);
- BT_DBG("Leave");
-
return 0;
}
EXPORT_SYMBOL_GPL(btmrvl_remove_card);