Commit fcfafc76 authored by Waldemar Rymarkiewicz's avatar Waldemar Rymarkiewicz Committed by Samuel Ortiz

NFC: pn533: Cleanup debug messages

Remove debug messages which do not include valueable informations
in debug mode. Add some new ones for better tracking or reword when
if necessary.
Signed-off-by: default avatarWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent f8f99171
...@@ -524,6 +524,7 @@ static void pn533_recv_response(struct urb *urb) ...@@ -524,6 +524,7 @@ static void pn533_recv_response(struct urb *urb)
in_frame = dev->in_urb->transfer_buffer; in_frame = dev->in_urb->transfer_buffer;
nfc_dev_dbg(&dev->interface->dev, "Received a frame.");
print_hex_dump(KERN_DEBUG, "PN533 RX: ", DUMP_PREFIX_NONE, 16, 1, print_hex_dump(KERN_DEBUG, "PN533 RX: ", DUMP_PREFIX_NONE, 16, 1,
in_frame, PN533_FRAME_SIZE(in_frame), false); in_frame, PN533_FRAME_SIZE(in_frame), false);
...@@ -540,7 +541,6 @@ static void pn533_recv_response(struct urb *urb) ...@@ -540,7 +541,6 @@ static void pn533_recv_response(struct urb *urb)
goto sched_wq; goto sched_wq;
} }
nfc_dev_dbg(&dev->interface->dev, "Received a valid frame");
dev->wq_in_error = 0; dev->wq_in_error = 0;
dev->wq_in_frame = in_frame; dev->wq_in_frame = in_frame;
...@@ -588,8 +588,6 @@ static void pn533_recv_ack(struct urb *urb) ...@@ -588,8 +588,6 @@ static void pn533_recv_ack(struct urb *urb)
goto sched_wq; goto sched_wq;
} }
nfc_dev_dbg(&dev->interface->dev, "Received a valid ack");
rc = pn533_submit_urb_for_response(dev, GFP_ATOMIC); rc = pn533_submit_urb_for_response(dev, GFP_ATOMIC);
if (rc) { if (rc) {
nfc_dev_err(&dev->interface->dev, nfc_dev_err(&dev->interface->dev,
...@@ -636,9 +634,6 @@ static int __pn533_send_cmd_frame_async(struct pn533 *dev, ...@@ -636,9 +634,6 @@ static int __pn533_send_cmd_frame_async(struct pn533 *dev,
{ {
int rc; int rc;
nfc_dev_dbg(&dev->interface->dev, "Sending command 0x%x",
PN533_FRAME_CMD(out_frame));
dev->cmd = PN533_FRAME_CMD(out_frame); dev->cmd = PN533_FRAME_CMD(out_frame);
dev->cmd_complete = cmd_complete; dev->cmd_complete = cmd_complete;
dev->cmd_complete_arg = arg; dev->cmd_complete_arg = arg;
...@@ -705,10 +700,6 @@ static int pn533_send_async_complete(struct pn533 *dev, void *_arg, u8 *params, ...@@ -705,10 +700,6 @@ static int pn533_send_async_complete(struct pn533 *dev, void *_arg, u8 *params,
dev_kfree_skb(req); dev_kfree_skb(req);
if (params_len < 0) { if (params_len < 0) {
nfc_dev_err(&dev->interface->dev,
"Error %d when starting as a target",
params_len);
arg->complete_cb(dev, arg->complete_cb_context, arg->complete_cb(dev, arg->complete_cb_context,
ERR_PTR(params_len)); ERR_PTR(params_len));
rc = params_len; rc = params_len;
...@@ -737,7 +728,7 @@ static int __pn533_send_async(struct pn533 *dev, u8 cmd_code, ...@@ -737,7 +728,7 @@ static int __pn533_send_async(struct pn533 *dev, u8 cmd_code,
struct pn533_send_async_complete_arg *arg; struct pn533_send_async_complete_arg *arg;
int rc = 0; int rc = 0;
nfc_dev_dbg(&dev->interface->dev, "%s", __func__); nfc_dev_dbg(&dev->interface->dev, "Sending command 0x%x", cmd_code);
arg = kzalloc(sizeof(arg), GFP_KERNEL); arg = kzalloc(sizeof(arg), GFP_KERNEL);
if (!arg) if (!arg)
...@@ -765,7 +756,8 @@ static int __pn533_send_async(struct pn533 *dev, u8 cmd_code, ...@@ -765,7 +756,8 @@ static int __pn533_send_async(struct pn533 *dev, u8 cmd_code,
goto unlock; goto unlock;
} }
nfc_dev_dbg(&dev->interface->dev, "%s Queueing command", __func__); nfc_dev_dbg(&dev->interface->dev, "%s Queueing command 0x%x", __func__,
cmd_code);
cmd = kzalloc(sizeof(struct pn533_cmd), GFP_KERNEL); cmd = kzalloc(sizeof(struct pn533_cmd), GFP_KERNEL);
if (!cmd) { if (!cmd) {
...@@ -801,8 +793,6 @@ static int pn533_send_data_async(struct pn533 *dev, u8 cmd_code, ...@@ -801,8 +793,6 @@ static int pn533_send_data_async(struct pn533 *dev, u8 cmd_code,
PN533_FRAME_MAX_PAYLOAD_LEN + PN533_FRAME_MAX_PAYLOAD_LEN +
PN533_FRAME_TAIL_LEN; PN533_FRAME_TAIL_LEN;
nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
resp = nfc_alloc_recv_skb(resp_len, GFP_KERNEL); resp = nfc_alloc_recv_skb(resp_len, GFP_KERNEL);
if (!resp) if (!resp)
return -ENOMEM; return -ENOMEM;
...@@ -823,8 +813,6 @@ static int pn533_send_cmd_async(struct pn533 *dev, u8 cmd_code, ...@@ -823,8 +813,6 @@ static int pn533_send_cmd_async(struct pn533 *dev, u8 cmd_code,
struct sk_buff *resp; struct sk_buff *resp;
int rc; int rc;
nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
resp = alloc_skb(PN533_NORMAL_FRAME_MAX_LEN, GFP_KERNEL); resp = alloc_skb(PN533_NORMAL_FRAME_MAX_LEN, GFP_KERNEL);
if (!resp) if (!resp)
return -ENOMEM; return -ENOMEM;
...@@ -858,8 +846,6 @@ static int pn533_send_cmd_direct_async(struct pn533 *dev, u8 cmd_code, ...@@ -858,8 +846,6 @@ static int pn533_send_cmd_direct_async(struct pn533 *dev, u8 cmd_code,
PN533_FRAME_MAX_PAYLOAD_LEN + PN533_FRAME_MAX_PAYLOAD_LEN +
PN533_FRAME_TAIL_LEN; PN533_FRAME_TAIL_LEN;
nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
resp = alloc_skb(resp_len, GFP_KERNEL); resp = alloc_skb(resp_len, GFP_KERNEL);
if (!resp) if (!resp)
return -ENOMEM; return -ENOMEM;
...@@ -928,8 +914,6 @@ static int pn533_send_sync_complete(struct pn533 *dev, void *_arg, ...@@ -928,8 +914,6 @@ static int pn533_send_sync_complete(struct pn533 *dev, void *_arg,
{ {
struct pn533_sync_cmd_response *arg = _arg; struct pn533_sync_cmd_response *arg = _arg;
nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
arg->resp = resp; arg->resp = resp;
complete(&arg->done); complete(&arg->done);
...@@ -959,8 +943,6 @@ static struct sk_buff *pn533_send_cmd_sync(struct pn533 *dev, u8 cmd_code, ...@@ -959,8 +943,6 @@ static struct sk_buff *pn533_send_cmd_sync(struct pn533 *dev, u8 cmd_code,
int rc; int rc;
struct pn533_sync_cmd_response arg; struct pn533_sync_cmd_response arg;
nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
init_completion(&arg.done); init_completion(&arg.done);
rc = pn533_send_cmd_async(dev, cmd_code, req, rc = pn533_send_cmd_async(dev, cmd_code, req,
...@@ -979,8 +961,6 @@ static void pn533_send_complete(struct urb *urb) ...@@ -979,8 +961,6 @@ static void pn533_send_complete(struct urb *urb)
{ {
struct pn533 *dev = urb->context; struct pn533 *dev = urb->context;
nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
switch (urb->status) { switch (urb->status) {
case 0: case 0:
break; /* success */ break; /* success */
...@@ -1992,6 +1972,8 @@ static int pn533_dep_link_down(struct nfc_dev *nfc_dev) ...@@ -1992,6 +1972,8 @@ static int pn533_dep_link_down(struct nfc_dev *nfc_dev)
{ {
struct pn533 *dev = nfc_get_drvdata(nfc_dev); struct pn533 *dev = nfc_get_drvdata(nfc_dev);
nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
pn533_poll_reset_mod_list(dev); pn533_poll_reset_mod_list(dev);
if (dev->tgt_mode || dev->tgt_active_prot) { if (dev->tgt_mode || dev->tgt_active_prot) {
...@@ -2017,7 +1999,7 @@ static struct sk_buff *pn533_build_response(struct pn533 *dev) ...@@ -2017,7 +1999,7 @@ static struct sk_buff *pn533_build_response(struct pn533 *dev)
struct sk_buff *skb, *tmp, *t; struct sk_buff *skb, *tmp, *t;
unsigned int skb_len = 0, tmp_len = 0; unsigned int skb_len = 0, tmp_len = 0;
nfc_dev_dbg(&dev->interface->dev, "%s\n", __func__); nfc_dev_dbg(&dev->interface->dev, "%s", __func__);
if (skb_queue_empty(&dev->resp_q)) if (skb_queue_empty(&dev->resp_q))
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment