aboutsummaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-11-29 14:37:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-30 15:08:36 -0500
commit20c239c1390bd6f3bb389fe1a7e8307f29f52563 (patch)
treec78b5099bd642482ef69531ba19bbff0ce33e4cf /net/nfc
parented1e0ad8816389ceefa2d94a9a3d3520088e410f (diff)
nfc: Convert nfc_dbg to pr_debug
Using the standard debugging mechanisms is better than subsystem specific ones when the subsystem doesn't use a specific struct. Coalesce long formats. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/core.c37
-rw-r--r--net/nfc/nci/core.c56
-rw-r--r--net/nfc/nci/data.c22
-rw-r--r--net/nfc/nci/ntf.c67
-rw-r--r--net/nfc/nci/rsp.c80
-rw-r--r--net/nfc/netlink.c32
-rw-r--r--net/nfc/rawsock.c24
7 files changed, 160 insertions, 158 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c
index 03e45714730..c922adb9e65 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -65,7 +65,7 @@ int nfc_dev_up(struct nfc_dev *dev)
65{ 65{
66 int rc = 0; 66 int rc = 0;
67 67
68 nfc_dbg("dev_name=%s", dev_name(&dev->dev)); 68 pr_debug("dev_name=%s\n", dev_name(&dev->dev));
69 69
70 device_lock(&dev->dev); 70 device_lock(&dev->dev);
71 71
@@ -99,7 +99,7 @@ int nfc_dev_down(struct nfc_dev *dev)
99{ 99{
100 int rc = 0; 100 int rc = 0;
101 101
102 nfc_dbg("dev_name=%s", dev_name(&dev->dev)); 102 pr_debug("dev_name=%s\n", dev_name(&dev->dev));
103 103
104 device_lock(&dev->dev); 104 device_lock(&dev->dev);
105 105
@@ -141,7 +141,8 @@ int nfc_start_poll(struct nfc_dev *dev, u32 protocols)
141{ 141{
142 int rc; 142 int rc;
143 143
144 nfc_dbg("dev_name=%s protocols=0x%x", dev_name(&dev->dev), protocols); 144 pr_debug("dev_name=%s protocols=0x%x\n",
145 dev_name(&dev->dev), protocols);
145 146
146 if (!protocols) 147 if (!protocols)
147 return -EINVAL; 148 return -EINVAL;
@@ -176,7 +177,7 @@ int nfc_stop_poll(struct nfc_dev *dev)
176{ 177{
177 int rc = 0; 178 int rc = 0;
178 179
179 nfc_dbg("dev_name=%s", dev_name(&dev->dev)); 180 pr_debug("dev_name=%s\n", dev_name(&dev->dev));
180 181
181 device_lock(&dev->dev); 182 device_lock(&dev->dev);
182 183
@@ -209,8 +210,8 @@ int nfc_activate_target(struct nfc_dev *dev, u32 target_idx, u32 protocol)
209{ 210{
210 int rc; 211 int rc;
211 212
212 nfc_dbg("dev_name=%s target_idx=%u protocol=%u", dev_name(&dev->dev), 213 pr_debug("dev_name=%s target_idx=%u protocol=%u\n",
213 target_idx, protocol); 214 dev_name(&dev->dev), target_idx, protocol);
214 215
215 device_lock(&dev->dev); 216 device_lock(&dev->dev);
216 217
@@ -238,7 +239,8 @@ int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx)
238{ 239{
239 int rc = 0; 240 int rc = 0;
240 241
241 nfc_dbg("dev_name=%s target_idx=%u", dev_name(&dev->dev), target_idx); 242 pr_debug("dev_name=%s target_idx=%u\n",
243 dev_name(&dev->dev), target_idx);
242 244
243 device_lock(&dev->dev); 245 device_lock(&dev->dev);
244 246
@@ -273,8 +275,8 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx,
273{ 275{
274 int rc; 276 int rc;
275 277
276 nfc_dbg("dev_name=%s target_idx=%u skb->len=%u", dev_name(&dev->dev), 278 pr_debug("dev_name=%s target_idx=%u skb->len=%u\n",
277 target_idx, skb->len); 279 dev_name(&dev->dev), target_idx, skb->len);
278 280
279 device_lock(&dev->dev); 281 device_lock(&dev->dev);
280 282
@@ -328,7 +330,7 @@ int nfc_targets_found(struct nfc_dev *dev, struct nfc_target *targets,
328{ 330{
329 int i; 331 int i;
330 332
331 nfc_dbg("dev_name=%s n_targets=%d", dev_name(&dev->dev), n_targets); 333 pr_debug("dev_name=%s n_targets=%d\n", dev_name(&dev->dev), n_targets);
332 334
333 dev->polling = false; 335 dev->polling = false;
334 336
@@ -362,7 +364,7 @@ static void nfc_release(struct device *d)
362{ 364{
363 struct nfc_dev *dev = to_nfc_dev(d); 365 struct nfc_dev *dev = to_nfc_dev(d);
364 366
365 nfc_dbg("dev_name=%s", dev_name(&dev->dev)); 367 pr_debug("dev_name=%s\n", dev_name(&dev->dev));
366 368
367 nfc_genl_data_exit(&dev->genl_data); 369 nfc_genl_data_exit(&dev->genl_data);
368 kfree(dev->targets); 370 kfree(dev->targets);
@@ -448,7 +450,7 @@ int nfc_register_device(struct nfc_dev *dev)
448{ 450{
449 int rc; 451 int rc;
450 452
451 nfc_dbg("dev_name=%s", dev_name(&dev->dev)); 453 pr_debug("dev_name=%s\n", dev_name(&dev->dev));
452 454
453 mutex_lock(&nfc_devlist_mutex); 455 mutex_lock(&nfc_devlist_mutex);
454 nfc_devlist_generation++; 456 nfc_devlist_generation++;
@@ -460,9 +462,8 @@ int nfc_register_device(struct nfc_dev *dev)
460 462
461 rc = nfc_genl_device_added(dev); 463 rc = nfc_genl_device_added(dev);
462 if (rc) 464 if (rc)
463 nfc_dbg("The userspace won't be notified that the device %s was" 465 pr_debug("The userspace won't be notified that the device %s was added\n",
464 " added", dev_name(&dev->dev)); 466 dev_name(&dev->dev));
465
466 467
467 return 0; 468 return 0;
468} 469}
@@ -477,7 +478,7 @@ void nfc_unregister_device(struct nfc_dev *dev)
477{ 478{
478 int rc; 479 int rc;
479 480
480 nfc_dbg("dev_name=%s", dev_name(&dev->dev)); 481 pr_debug("dev_name=%s\n", dev_name(&dev->dev));
481 482
482 mutex_lock(&nfc_devlist_mutex); 483 mutex_lock(&nfc_devlist_mutex);
483 nfc_devlist_generation++; 484 nfc_devlist_generation++;
@@ -492,8 +493,8 @@ void nfc_unregister_device(struct nfc_dev *dev)
492 493
493 rc = nfc_genl_device_removed(dev); 494 rc = nfc_genl_device_removed(dev);
494 if (rc) 495 if (rc)
495 nfc_dbg("The userspace won't be notified that the device %s" 496 pr_debug("The userspace won't be notified that the device %s was removed\n",
496 " was removed", dev_name(&dev->dev)); 497 dev_name(&dev->dev));
497 498
498} 499}
499EXPORT_SYMBOL(nfc_unregister_device); 500EXPORT_SYMBOL(nfc_unregister_device);
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 30032b2c685..3faceb02a39 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -81,7 +81,7 @@ static int __nci_request(struct nci_dev *ndev,
81 &ndev->req_completion, 81 &ndev->req_completion,
82 timeout); 82 timeout);
83 83
84 nfc_dbg("wait_for_completion return %ld", completion_rc); 84 pr_debug("wait_for_completion return %ld\n", completion_rc);
85 85
86 if (completion_rc > 0) { 86 if (completion_rc > 0) {
87 switch (ndev->req_status) { 87 switch (ndev->req_status) {
@@ -325,7 +325,7 @@ static void nci_cmd_timer(unsigned long arg)
325{ 325{
326 struct nci_dev *ndev = (void *) arg; 326 struct nci_dev *ndev = (void *) arg;
327 327
328 nfc_dbg("entry"); 328 pr_debug("entry\n");
329 329
330 atomic_set(&ndev->cmd_cnt, 1); 330 atomic_set(&ndev->cmd_cnt, 1);
331 queue_work(ndev->cmd_wq, &ndev->cmd_work); 331 queue_work(ndev->cmd_wq, &ndev->cmd_work);
@@ -335,7 +335,7 @@ static int nci_dev_up(struct nfc_dev *nfc_dev)
335{ 335{
336 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); 336 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
337 337
338 nfc_dbg("entry"); 338 pr_debug("entry\n");
339 339
340 return nci_open_device(ndev); 340 return nci_open_device(ndev);
341} 341}
@@ -344,7 +344,7 @@ static int nci_dev_down(struct nfc_dev *nfc_dev)
344{ 344{
345 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); 345 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
346 346
347 nfc_dbg("entry"); 347 pr_debug("entry\n");
348 348
349 return nci_close_device(ndev); 349 return nci_close_device(ndev);
350} 350}
@@ -354,7 +354,7 @@ static int nci_start_poll(struct nfc_dev *nfc_dev, __u32 protocols)
354 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); 354 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
355 int rc; 355 int rc;
356 356
357 nfc_dbg("entry"); 357 pr_debug("entry\n");
358 358
359 if (test_bit(NCI_DISCOVERY, &ndev->flags)) { 359 if (test_bit(NCI_DISCOVERY, &ndev->flags)) {
360 pr_err("unable to start poll, since poll is already active\n"); 360 pr_err("unable to start poll, since poll is already active\n");
@@ -367,7 +367,7 @@ static int nci_start_poll(struct nfc_dev *nfc_dev, __u32 protocols)
367 } 367 }
368 368
369 if (test_bit(NCI_POLL_ACTIVE, &ndev->flags)) { 369 if (test_bit(NCI_POLL_ACTIVE, &ndev->flags)) {
370 nfc_dbg("target is active, implicitly deactivate..."); 370 pr_debug("target is active, implicitly deactivate...\n");
371 371
372 rc = nci_request(ndev, nci_rf_deactivate_req, 0, 372 rc = nci_request(ndev, nci_rf_deactivate_req, 0,
373 msecs_to_jiffies(NCI_RF_DEACTIVATE_TIMEOUT)); 373 msecs_to_jiffies(NCI_RF_DEACTIVATE_TIMEOUT));
@@ -388,7 +388,7 @@ static void nci_stop_poll(struct nfc_dev *nfc_dev)
388{ 388{
389 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); 389 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
390 390
391 nfc_dbg("entry"); 391 pr_debug("entry\n");
392 392
393 if (!test_bit(NCI_DISCOVERY, &ndev->flags)) { 393 if (!test_bit(NCI_DISCOVERY, &ndev->flags)) {
394 pr_err("unable to stop poll, since poll is not active\n"); 394 pr_err("unable to stop poll, since poll is not active\n");
@@ -404,7 +404,7 @@ static int nci_activate_target(struct nfc_dev *nfc_dev, __u32 target_idx,
404{ 404{
405 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); 405 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
406 406
407 nfc_dbg("entry, target_idx %d, protocol 0x%x", target_idx, protocol); 407 pr_debug("entry, target_idx %d, protocol 0x%x\n", target_idx, protocol);
408 408
409 if (!test_bit(NCI_POLL_ACTIVE, &ndev->flags)) { 409 if (!test_bit(NCI_POLL_ACTIVE, &ndev->flags)) {
410 pr_err("there is no available target to activate\n"); 410 pr_err("there is no available target to activate\n");
@@ -432,7 +432,7 @@ static void nci_deactivate_target(struct nfc_dev *nfc_dev, __u32 target_idx)
432{ 432{
433 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); 433 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
434 434
435 nfc_dbg("entry, target_idx %d", target_idx); 435 pr_debug("entry, target_idx %d\n", target_idx);
436 436
437 if (!ndev->target_active_prot) { 437 if (!ndev->target_active_prot) {
438 pr_err("unable to deactivate target, no active target\n"); 438 pr_err("unable to deactivate target, no active target\n");
@@ -455,7 +455,7 @@ static int nci_data_exchange(struct nfc_dev *nfc_dev, __u32 target_idx,
455 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev); 455 struct nci_dev *ndev = nfc_get_drvdata(nfc_dev);
456 int rc; 456 int rc;
457 457
458 nfc_dbg("entry, target_idx %d, len %d", target_idx, skb->len); 458 pr_debug("entry, target_idx %d, len %d\n", target_idx, skb->len);
459 459
460 if (!ndev->target_active_prot) { 460 if (!ndev->target_active_prot) {
461 pr_err("unable to exchange data, no active target\n"); 461 pr_err("unable to exchange data, no active target\n");
@@ -501,7 +501,7 @@ struct nci_dev *nci_allocate_device(struct nci_ops *ops,
501{ 501{
502 struct nci_dev *ndev; 502 struct nci_dev *ndev;
503 503
504 nfc_dbg("entry, supported_protocols 0x%x", supported_protocols); 504 pr_debug("entry, supported_protocols 0x%x\n", supported_protocols);
505 505
506 if (!ops->open || !ops->close || !ops->send) 506 if (!ops->open || !ops->close || !ops->send)
507 return NULL; 507 return NULL;
@@ -541,7 +541,7 @@ EXPORT_SYMBOL(nci_allocate_device);
541 */ 541 */
542void nci_free_device(struct nci_dev *ndev) 542void nci_free_device(struct nci_dev *ndev)
543{ 543{
544 nfc_dbg("entry"); 544 pr_debug("entry\n");
545 545
546 nfc_free_device(ndev->nfc_dev); 546 nfc_free_device(ndev->nfc_dev);
547 kfree(ndev); 547 kfree(ndev);
@@ -559,7 +559,7 @@ int nci_register_device(struct nci_dev *ndev)
559 struct device *dev = &ndev->nfc_dev->dev; 559 struct device *dev = &ndev->nfc_dev->dev;
560 char name[32]; 560 char name[32];
561 561
562 nfc_dbg("entry"); 562 pr_debug("entry\n");
563 563
564 rc = nfc_register_device(ndev->nfc_dev); 564 rc = nfc_register_device(ndev->nfc_dev);
565 if (rc) 565 if (rc)
@@ -623,7 +623,7 @@ EXPORT_SYMBOL(nci_register_device);
623 */ 623 */
624void nci_unregister_device(struct nci_dev *ndev) 624void nci_unregister_device(struct nci_dev *ndev)
625{ 625{
626 nfc_dbg("entry"); 626 pr_debug("entry\n");
627 627
628 nci_close_device(ndev); 628 nci_close_device(ndev);
629 629
@@ -644,7 +644,7 @@ int nci_recv_frame(struct sk_buff *skb)
644{ 644{
645 struct nci_dev *ndev = (struct nci_dev *) skb->dev; 645 struct nci_dev *ndev = (struct nci_dev *) skb->dev;
646 646
647 nfc_dbg("entry, len %d", skb->len); 647 pr_debug("entry, len %d\n", skb->len);
648 648
649 if (!ndev || (!test_bit(NCI_UP, &ndev->flags) 649 if (!ndev || (!test_bit(NCI_UP, &ndev->flags)
650 && !test_bit(NCI_INIT, &ndev->flags))) { 650 && !test_bit(NCI_INIT, &ndev->flags))) {
@@ -664,7 +664,7 @@ static int nci_send_frame(struct sk_buff *skb)
664{ 664{
665 struct nci_dev *ndev = (struct nci_dev *) skb->dev; 665 struct nci_dev *ndev = (struct nci_dev *) skb->dev;
666 666
667 nfc_dbg("entry, len %d", skb->len); 667 pr_debug("entry, len %d\n", skb->len);
668 668
669 if (!ndev) { 669 if (!ndev) {
670 kfree_skb(skb); 670 kfree_skb(skb);
@@ -683,7 +683,7 @@ int nci_send_cmd(struct nci_dev *ndev, __u16 opcode, __u8 plen, void *payload)
683 struct nci_ctrl_hdr *hdr; 683 struct nci_ctrl_hdr *hdr;
684 struct sk_buff *skb; 684 struct sk_buff *skb;
685 685
686 nfc_dbg("entry, opcode 0x%x, plen %d", opcode, plen); 686 pr_debug("entry, opcode 0x%x, plen %d\n", opcode, plen);
687 687
688 skb = nci_skb_alloc(ndev, (NCI_CTRL_HDR_SIZE + plen), GFP_KERNEL); 688 skb = nci_skb_alloc(ndev, (NCI_CTRL_HDR_SIZE + plen), GFP_KERNEL);
689 if (!skb) { 689 if (!skb) {
@@ -717,7 +717,7 @@ static void nci_tx_work(struct work_struct *work)
717 struct nci_dev *ndev = container_of(work, struct nci_dev, tx_work); 717 struct nci_dev *ndev = container_of(work, struct nci_dev, tx_work);
718 struct sk_buff *skb; 718 struct sk_buff *skb;
719 719
720 nfc_dbg("entry, credits_cnt %d", atomic_read(&ndev->credits_cnt)); 720 pr_debug("entry, credits_cnt %d\n", atomic_read(&ndev->credits_cnt));
721 721
722 /* Send queued tx data */ 722 /* Send queued tx data */
723 while (atomic_read(&ndev->credits_cnt)) { 723 while (atomic_read(&ndev->credits_cnt)) {
@@ -730,10 +730,10 @@ static void nci_tx_work(struct work_struct *work)
730 NCI_DATA_FLOW_CONTROL_NOT_USED) 730 NCI_DATA_FLOW_CONTROL_NOT_USED)
731 atomic_dec(&ndev->credits_cnt); 731 atomic_dec(&ndev->credits_cnt);
732 732
733 nfc_dbg("NCI TX: MT=data, PBF=%d, conn_id=%d, plen=%d", 733 pr_debug("NCI TX: MT=data, PBF=%d, conn_id=%d, plen=%d\n",
734 nci_pbf(skb->data), 734 nci_pbf(skb->data),
735 nci_conn_id(skb->data), 735 nci_conn_id(skb->data),
736 nci_plen(skb->data)); 736 nci_plen(skb->data));
737 737
738 nci_send_frame(skb); 738 nci_send_frame(skb);
739 } 739 }
@@ -776,7 +776,7 @@ static void nci_cmd_work(struct work_struct *work)
776 struct nci_dev *ndev = container_of(work, struct nci_dev, cmd_work); 776 struct nci_dev *ndev = container_of(work, struct nci_dev, cmd_work);
777 struct sk_buff *skb; 777 struct sk_buff *skb;
778 778
779 nfc_dbg("entry, cmd_cnt %d", atomic_read(&ndev->cmd_cnt)); 779 pr_debug("entry, cmd_cnt %d\n", atomic_read(&ndev->cmd_cnt));
780 780
781 /* Send queued command */ 781 /* Send queued command */
782 if (atomic_read(&ndev->cmd_cnt)) { 782 if (atomic_read(&ndev->cmd_cnt)) {
@@ -786,11 +786,11 @@ static void nci_cmd_work(struct work_struct *work)
786 786
787 atomic_dec(&ndev->cmd_cnt); 787 atomic_dec(&ndev->cmd_cnt);
788 788
789 nfc_dbg("NCI TX: MT=cmd, PBF=%d, GID=0x%x, OID=0x%x, plen=%d", 789 pr_debug("NCI TX: MT=cmd, PBF=%d, GID=0x%x, OID=0x%x, plen=%d\n",
790 nci_pbf(skb->data), 790 nci_pbf(skb->data),
791 nci_opcode_gid(nci_opcode(skb->data)), 791 nci_opcode_gid(nci_opcode(skb->data)),
792 nci_opcode_oid(nci_opcode(skb->data)), 792 nci_opcode_oid(nci_opcode(skb->data)),
793 nci_plen(skb->data)); 793 nci_plen(skb->data));
794 794
795 nci_send_frame(skb); 795 nci_send_frame(skb);
796 796
diff --git a/net/nfc/nci/data.c b/net/nfc/nci/data.c
index 7d8a1251c76..3c5db09520b 100644
--- a/net/nfc/nci/data.c
+++ b/net/nfc/nci/data.c
@@ -42,7 +42,7 @@ void nci_data_exchange_complete(struct nci_dev *ndev,
42 data_exchange_cb_t cb = ndev->data_exchange_cb; 42 data_exchange_cb_t cb = ndev->data_exchange_cb;
43 void *cb_context = ndev->data_exchange_cb_context; 43 void *cb_context = ndev->data_exchange_cb_context;
44 44
45 nfc_dbg("entry, len %d, err %d", ((skb) ? (skb->len) : (0)), err); 45 pr_debug("entry, len %d, err %d\n", skb ? skb->len : 0, err);
46 46
47 if (cb) { 47 if (cb) {
48 ndev->data_exchange_cb = NULL; 48 ndev->data_exchange_cb = NULL;
@@ -92,7 +92,7 @@ static int nci_queue_tx_data_frags(struct nci_dev *ndev,
92 int frag_len; 92 int frag_len;
93 int rc = 0; 93 int rc = 0;
94 94
95 nfc_dbg("entry, conn_id 0x%x, total_len %d", conn_id, total_len); 95 pr_debug("entry, conn_id 0x%x, total_len %d\n", conn_id, total_len);
96 96
97 __skb_queue_head_init(&frags_q); 97 __skb_queue_head_init(&frags_q);
98 98
@@ -121,8 +121,8 @@ static int nci_queue_tx_data_frags(struct nci_dev *ndev,
121 data += frag_len; 121 data += frag_len;
122 total_len -= frag_len; 122 total_len -= frag_len;
123 123
124 nfc_dbg("frag_len %d, remaining total_len %d", 124 pr_debug("frag_len %d, remaining total_len %d\n",
125 frag_len, total_len); 125 frag_len, total_len);
126 } 126 }
127 127
128 /* queue all fragments atomically */ 128 /* queue all fragments atomically */
@@ -151,7 +151,7 @@ int nci_send_data(struct nci_dev *ndev, __u8 conn_id, struct sk_buff *skb)
151{ 151{
152 int rc = 0; 152 int rc = 0;
153 153
154 nfc_dbg("entry, conn_id 0x%x, plen %d", conn_id, skb->len); 154 pr_debug("entry, conn_id 0x%x, plen %d\n", conn_id, skb->len);
155 155
156 /* check if the packet need to be fragmented */ 156 /* check if the packet need to be fragmented */
157 if (skb->len <= ndev->max_data_pkt_payload_size) { 157 if (skb->len <= ndev->max_data_pkt_payload_size) {
@@ -230,19 +230,19 @@ void nci_rx_data_packet(struct nci_dev *ndev, struct sk_buff *skb)
230{ 230{
231 __u8 pbf = nci_pbf(skb->data); 231 __u8 pbf = nci_pbf(skb->data);
232 232
233 nfc_dbg("entry, len %d", skb->len); 233 pr_debug("entry, len %d\n", skb->len);
234 234
235 nfc_dbg("NCI RX: MT=data, PBF=%d, conn_id=%d, plen=%d", 235 pr_debug("NCI RX: MT=data, PBF=%d, conn_id=%d, plen=%d\n",
236 nci_pbf(skb->data), 236 nci_pbf(skb->data),
237 nci_conn_id(skb->data), 237 nci_conn_id(skb->data),
238 nci_plen(skb->data)); 238 nci_plen(skb->data));
239 239
240 /* strip the nci data header */ 240 /* strip the nci data header */
241 skb_pull(skb, NCI_DATA_HDR_SIZE); 241 skb_pull(skb, NCI_DATA_HDR_SIZE);
242 242
243 if (ndev->target_active_prot == NFC_PROTO_MIFARE) { 243 if (ndev->target_active_prot == NFC_PROTO_MIFARE) {
244 /* frame I/F => remove the status byte */ 244 /* frame I/F => remove the status byte */
245 nfc_dbg("NFC_PROTO_MIFARE => remove the status byte"); 245 pr_debug("NFC_PROTO_MIFARE => remove the status byte\n");
246 skb_trim(skb, (skb->len - 1)); 246 skb_trim(skb, (skb->len - 1));
247 } 247 }
248 248
diff --git a/net/nfc/nci/ntf.c b/net/nfc/nci/ntf.c
index c7043507fc6..f26edc09aa9 100644
--- a/net/nfc/nci/ntf.c
+++ b/net/nfc/nci/ntf.c
@@ -45,16 +45,16 @@ static void nci_core_conn_credits_ntf_packet(struct nci_dev *ndev,
45 struct nci_core_conn_credit_ntf *ntf = (void *) skb->data; 45 struct nci_core_conn_credit_ntf *ntf = (void *) skb->data;
46 int i; 46 int i;
47 47
48 nfc_dbg("entry, num_entries %d", ntf->num_entries); 48 pr_debug("entry, num_entries %d\n", ntf->num_entries);
49 49
50 if (ntf->num_entries > NCI_MAX_NUM_CONN) 50 if (ntf->num_entries > NCI_MAX_NUM_CONN)
51 ntf->num_entries = NCI_MAX_NUM_CONN; 51 ntf->num_entries = NCI_MAX_NUM_CONN;
52 52
53 /* update the credits */ 53 /* update the credits */
54 for (i = 0; i < ntf->num_entries; i++) { 54 for (i = 0; i < ntf->num_entries; i++) {
55 nfc_dbg("entry[%d]: conn_id %d, credits %d", i, 55 pr_debug("entry[%d]: conn_id %d, credits %d\n",
56 ntf->conn_entries[i].conn_id, 56 i, ntf->conn_entries[i].conn_id,
57 ntf->conn_entries[i].credits); 57 ntf->conn_entries[i].credits);
58 58
59 if (ntf->conn_entries[i].conn_id == NCI_STATIC_RF_CONN_ID) { 59 if (ntf->conn_entries[i].conn_id == NCI_STATIC_RF_CONN_ID) {
60 /* found static rf connection */ 60 /* found static rf connection */
@@ -80,9 +80,8 @@ static __u8 *nci_extract_rf_params_nfca_passive_poll(struct nci_dev *ndev,
80 80
81 nfca_poll->nfcid1_len = *data++; 81 nfca_poll->nfcid1_len = *data++;
82 82
83 nfc_dbg("sens_res 0x%x, nfcid1_len %d", 83 pr_debug("sens_res 0x%x, nfcid1_len %d\n",
84 nfca_poll->sens_res, 84 nfca_poll->sens_res, nfca_poll->nfcid1_len);
85 nfca_poll->nfcid1_len);
86 85
87 memcpy(nfca_poll->nfcid1, data, nfca_poll->nfcid1_len); 86 memcpy(nfca_poll->nfcid1, data, nfca_poll->nfcid1_len);
88 data += nfca_poll->nfcid1_len; 87 data += nfca_poll->nfcid1_len;
@@ -92,9 +91,9 @@ static __u8 *nci_extract_rf_params_nfca_passive_poll(struct nci_dev *ndev,
92 if (nfca_poll->sel_res_len != 0) 91 if (nfca_poll->sel_res_len != 0)
93 nfca_poll->sel_res = *data++; 92 nfca_poll->sel_res = *data++;
94 93
95 nfc_dbg("sel_res_len %d, sel_res 0x%x", 94 pr_debug("sel_res_len %d, sel_res 0x%x\n",
96 nfca_poll->sel_res_len, 95 nfca_poll->sel_res_len,
97 nfca_poll->sel_res); 96 nfca_poll->sel_res);
98 97
99 return data; 98 return data;
100} 99}
@@ -140,12 +139,12 @@ static void nci_target_found(struct nci_dev *ndev,
140 nfc_tgt.sel_res = ntf->rf_tech_specific_params.nfca_poll.sel_res; 139 nfc_tgt.sel_res = ntf->rf_tech_specific_params.nfca_poll.sel_res;
141 140
142 if (!(nfc_tgt.supported_protocols & ndev->poll_prots)) { 141 if (!(nfc_tgt.supported_protocols & ndev->poll_prots)) {
143 nfc_dbg("the target found does not have the desired protocol"); 142 pr_debug("the target found does not have the desired protocol\n");
144 return; 143 return;
145 } 144 }
146 145
147 nfc_dbg("new target found, supported_protocols 0x%x", 146 pr_debug("new target found, supported_protocols 0x%x\n",
148 nfc_tgt.supported_protocols); 147 nfc_tgt.supported_protocols);
149 148
150 ndev->target_available_prots = nfc_tgt.supported_protocols; 149 ndev->target_available_prots = nfc_tgt.supported_protocols;
151 150
@@ -168,13 +167,13 @@ static void nci_rf_intf_activated_ntf_packet(struct nci_dev *ndev,
168 ntf.activation_rf_tech_and_mode = *data++; 167 ntf.activation_rf_tech_and_mode = *data++;
169 ntf.rf_tech_specific_params_len = *data++; 168 ntf.rf_tech_specific_params_len = *data++;
170 169
171 nfc_dbg("rf_discovery_id %d", ntf.rf_discovery_id); 170 pr_debug("rf_discovery_id %d\n", ntf.rf_discovery_id);
172 nfc_dbg("rf_interface_type 0x%x", ntf.rf_interface_type); 171 pr_debug("rf_interface_type 0x%x\n", ntf.rf_interface_type);
173 nfc_dbg("rf_protocol 0x%x", ntf.rf_protocol); 172 pr_debug("rf_protocol 0x%x\n", ntf.rf_protocol);
174 nfc_dbg("activation_rf_tech_and_mode 0x%x", 173 pr_debug("activation_rf_tech_and_mode 0x%x\n",
175 ntf.activation_rf_tech_and_mode); 174 ntf.activation_rf_tech_and_mode);
176 nfc_dbg("rf_tech_specific_params_len %d", 175 pr_debug("rf_tech_specific_params_len %d\n",
177 ntf.rf_tech_specific_params_len); 176 ntf.rf_tech_specific_params_len);
178 177
179 if (ntf.rf_tech_specific_params_len > 0) { 178 if (ntf.rf_tech_specific_params_len > 0) {
180 switch (ntf.activation_rf_tech_and_mode) { 179 switch (ntf.activation_rf_tech_and_mode) {
@@ -195,14 +194,14 @@ static void nci_rf_intf_activated_ntf_packet(struct nci_dev *ndev,
195 ntf.data_exch_rx_bit_rate = *data++; 194 ntf.data_exch_rx_bit_rate = *data++;
196 ntf.activation_params_len = *data++; 195 ntf.activation_params_len = *data++;
197 196
198 nfc_dbg("data_exch_rf_tech_and_mode 0x%x", 197 pr_debug("data_exch_rf_tech_and_mode 0x%x\n",
199 ntf.data_exch_rf_tech_and_mode); 198 ntf.data_exch_rf_tech_and_mode);
200 nfc_dbg("data_exch_tx_bit_rate 0x%x", 199 pr_debug("data_exch_tx_bit_rate 0x%x\n",
201 ntf.data_exch_tx_bit_rate); 200 ntf.data_exch_tx_bit_rate);
202 nfc_dbg("data_exch_rx_bit_rate 0x%x", 201 pr_debug("data_exch_rx_bit_rate 0x%x\n",
203 ntf.data_exch_rx_bit_rate); 202 ntf.data_exch_rx_bit_rate);
204 nfc_dbg("activation_params_len %d", 203 pr_debug("activation_params_len %d\n",
205 ntf.activation_params_len); 204 ntf.activation_params_len);
206 205
207 if (ntf.activation_params_len > 0) { 206 if (ntf.activation_params_len > 0) {
208 switch (ntf.rf_interface_type) { 207 switch (ntf.rf_interface_type) {
@@ -231,7 +230,7 @@ static void nci_rf_deactivate_ntf_packet(struct nci_dev *ndev,
231{ 230{
232 struct nci_rf_deactivate_ntf *ntf = (void *) skb->data; 231 struct nci_rf_deactivate_ntf *ntf = (void *) skb->data;
233 232
234 nfc_dbg("entry, type 0x%x, reason 0x%x", ntf->type, ntf->reason); 233 pr_debug("entry, type 0x%x, reason 0x%x\n", ntf->type, ntf->reason);
235 234
236 clear_bit(NCI_POLL_ACTIVE, &ndev->flags); 235 clear_bit(NCI_POLL_ACTIVE, &ndev->flags);
237 ndev->target_active_prot = 0; 236 ndev->target_active_prot = 0;
@@ -257,11 +256,11 @@ void nci_ntf_packet(struct nci_dev *ndev, struct sk_buff *skb)
257{ 256{
258 __u16 ntf_opcode = nci_opcode(skb->data); 257 __u16 ntf_opcode = nci_opcode(skb->data);
259 258
260 nfc_dbg("NCI RX: MT=ntf, PBF=%d, GID=0x%x, OID=0x%x, plen=%d", 259 pr_debug("NCI RX: MT=ntf, PBF=%d, GID=0x%x, OID=0x%x, plen=%d\n",
261 nci_pbf(skb->data), 260 nci_pbf(skb->data),
262 nci_opcode_gid(ntf_opcode), 261 nci_opcode_gid(ntf_opcode),
263 nci_opcode_oid(ntf_opcode), 262 nci_opcode_oid(ntf_opcode),
264 nci_plen(skb->data)); 263 nci_plen(skb->data));
265 264
266 /* strip the nci control header */ 265 /* strip the nci control header */
267 skb_pull(skb, NCI_CTRL_HDR_SIZE); 266 skb_pull(skb, NCI_CTRL_HDR_SIZE);
diff --git a/net/nfc/nci/rsp.c b/net/nfc/nci/rsp.c
index 6f51a28876b..f00c2ab0c8b 100644
--- a/net/nfc/nci/rsp.c
+++ b/net/nfc/nci/rsp.c
@@ -42,12 +42,12 @@ static void nci_core_reset_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)
42{ 42{
43 struct nci_core_reset_rsp *rsp = (void *) skb->data; 43 struct nci_core_reset_rsp *rsp = (void *) skb->data;
44 44
45 nfc_dbg("entry, status 0x%x", rsp->status); 45 pr_debug("entry, status 0x%x\n", rsp->status);
46 46
47 if (rsp->status == NCI_STATUS_OK) { 47 if (rsp->status == NCI_STATUS_OK) {
48 ndev->nci_ver = rsp->nci_ver; 48 ndev->nci_ver = rsp->nci_ver;
49 nfc_dbg("nci_ver 0x%x, config_status 0x%x", 49 pr_debug("nci_ver 0x%x, config_status 0x%x\n",
50 rsp->nci_ver, rsp->config_status); 50 rsp->nci_ver, rsp->config_status);
51 } 51 }
52 52
53 nci_req_complete(ndev, rsp->status); 53 nci_req_complete(ndev, rsp->status);
@@ -58,7 +58,7 @@ static void nci_core_init_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)
58 struct nci_core_init_rsp_1 *rsp_1 = (void *) skb->data; 58 struct nci_core_init_rsp_1 *rsp_1 = (void *) skb->data;
59 struct nci_core_init_rsp_2 *rsp_2; 59 struct nci_core_init_rsp_2 *rsp_2;
60 60
61 nfc_dbg("entry, status 0x%x", rsp_1->status); 61 pr_debug("entry, status 0x%x\n", rsp_1->status);
62 62
63 if (rsp_1->status != NCI_STATUS_OK) 63 if (rsp_1->status != NCI_STATUS_OK)
64 goto exit; 64 goto exit;
@@ -97,34 +97,34 @@ static void nci_core_init_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)
97 97
98 atomic_set(&ndev->credits_cnt, ndev->initial_num_credits); 98 atomic_set(&ndev->credits_cnt, ndev->initial_num_credits);
99 99
100 nfc_dbg("nfcc_features 0x%x", 100 pr_debug("nfcc_features 0x%x\n",
101 ndev->nfcc_features); 101 ndev->nfcc_features);
102 nfc_dbg("num_supported_rf_interfaces %d", 102 pr_debug("num_supported_rf_interfaces %d\n",
103 ndev->num_supported_rf_interfaces); 103 ndev->num_supported_rf_interfaces);
104 nfc_dbg("supported_rf_interfaces[0] 0x%x", 104 pr_debug("supported_rf_interfaces[0] 0x%x\n",
105 ndev->supported_rf_interfaces[0]); 105 ndev->supported_rf_interfaces[0]);
106 nfc_dbg("supported_rf_interfaces[1] 0x%x", 106 pr_debug("supported_rf_interfaces[1] 0x%x\n",
107 ndev->supported_rf_interfaces[1]); 107 ndev->supported_rf_interfaces[1]);
108 nfc_dbg("supported_rf_interfaces[2] 0x%x", 108 pr_debug("supported_rf_interfaces[2] 0x%x\n",
109 ndev->supported_rf_interfaces[2]); 109 ndev->supported_rf_interfaces[2]);
110 nfc_dbg("supported_rf_interfaces[3] 0x%x", 110 pr_debug("supported_rf_interfaces[3] 0x%x\n",
111 ndev->supported_rf_interfaces[3]); 111 ndev->supported_rf_interfaces[3]);
112 nfc_dbg("max_logical_connections %d", 112 pr_debug("max_logical_connections %d\n",
113 ndev->max_logical_connections); 113 ndev->max_logical_connections);
114 nfc_dbg("max_routing_table_size %d", 114 pr_debug("max_routing_table_size %d\n",
115 ndev->max_routing_table_size); 115 ndev->max_routing_table_size);
116 nfc_dbg("max_ctrl_pkt_payload_len %d", 116 pr_debug("max_ctrl_pkt_payload_len %d\n",
117 ndev->max_ctrl_pkt_payload_len); 117 ndev->max_ctrl_pkt_payload_len);
118 nfc_dbg("max_size_for_large_params %d", 118 pr_debug("max_size_for_large_params %d\n",
119 ndev->max_size_for_large_params); 119 ndev->max_size_for_large_params);
120 nfc_dbg("max_data_pkt_payload_size %d", 120 pr_debug("max_data_pkt_payload_size %d\n",
121 ndev->max_data_pkt_payload_size); 121 ndev->max_data_pkt_payload_size);
122 nfc_dbg("initial_num_credits %d", 122 pr_debug("initial_num_credits %d\n",
123 ndev->initial_num_credits); 123 ndev->initial_num_credits);
124 nfc_dbg("manufact_id 0x%x", 124 pr_debug("manufact_id 0x%x\n",
125 ndev->manufact_id); 125 ndev->manufact_id);
126 nfc_dbg("manufact_specific_info 0x%x", 126 pr_debug("manufact_specific_info 0x%x\n",
127 ndev->manufact_specific_info); 127 ndev->manufact_specific_info);
128 128
129exit: 129exit:
130 nci_req_complete(ndev, rsp_1->status); 130 nci_req_complete(ndev, rsp_1->status);
@@ -135,7 +135,7 @@ static void nci_rf_disc_map_rsp_packet(struct nci_dev *ndev,
135{ 135{
136 __u8 status = skb->data[0]; 136 __u8 status = skb->data[0];
137 137
138 nfc_dbg("entry, status 0x%x", status); 138 pr_debug("entry, status 0x%x\n", status);
139 139
140 nci_req_complete(ndev, status); 140 nci_req_complete(ndev, status);
141} 141}
@@ -144,7 +144,7 @@ static void nci_rf_disc_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)
144{ 144{
145 __u8 status = skb->data[0]; 145 __u8 status = skb->data[0];
146 146
147 nfc_dbg("entry, status 0x%x", status); 147 pr_debug("entry, status 0x%x\n", status);
148 148
149 if (status == NCI_STATUS_OK) 149 if (status == NCI_STATUS_OK)
150 set_bit(NCI_DISCOVERY, &ndev->flags); 150 set_bit(NCI_DISCOVERY, &ndev->flags);
@@ -157,7 +157,7 @@ static void nci_rf_deactivate_rsp_packet(struct nci_dev *ndev,
157{ 157{
158 __u8 status = skb->data[0]; 158 __u8 status = skb->data[0];
159 159
160 nfc_dbg("entry, status 0x%x", status); 160 pr_debug("entry, status 0x%x\n", status);
161 161
162 clear_bit(NCI_DISCOVERY, &ndev->flags); 162 clear_bit(NCI_DISCOVERY, &ndev->flags);
163 163
@@ -171,11 +171,11 @@ void nci_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)
171 /* we got a rsp, stop the cmd timer */ 171 /* we got a rsp, stop the cmd timer */
172 del_timer(&ndev->cmd_timer); 172 del_timer(&ndev->cmd_timer);
173 173
174 nfc_dbg("NCI RX: MT=rsp, PBF=%d, GID=0x%x, OID=0x%x, plen=%d", 174 pr_debug("NCI RX: MT=rsp, PBF=%d, GID=0x%x, OID=0x%x, plen=%d\n",
175 nci_pbf(skb->data), 175 nci_pbf(skb->data),
176 nci_opcode_gid(rsp_opcode), 176 nci_opcode_gid(rsp_opcode),
177 nci_opcode_oid(rsp_opcode), 177 nci_opcode_oid(rsp_opcode),
178 nci_plen(skb->data)); 178 nci_plen(skb->data));
179 179
180 /* strip the nci control header */ 180 /* strip the nci control header */
181 skb_pull(skb, NCI_CTRL_HDR_SIZE); 181 skb_pull(skb, NCI_CTRL_HDR_SIZE);
diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c
index 03f8818e1f1..5aef1a5daf9 100644
--- a/net/nfc/netlink.c
+++ b/net/nfc/netlink.c
@@ -21,6 +21,8 @@
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */ 22 */
23 23
24#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
25
24#include <net/genetlink.h> 26#include <net/genetlink.h>
25#include <linux/nfc.h> 27#include <linux/nfc.h>
26#include <linux/slab.h> 28#include <linux/slab.h>
@@ -51,7 +53,7 @@ static int nfc_genl_send_target(struct sk_buff *msg, struct nfc_target *target,
51{ 53{
52 void *hdr; 54 void *hdr;
53 55
54 nfc_dbg("entry"); 56 pr_debug("entry\n");
55 57
56 hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq, 58 hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
57 &nfc_genl_family, flags, NFC_CMD_GET_TARGET); 59 &nfc_genl_family, flags, NFC_CMD_GET_TARGET);
@@ -105,7 +107,7 @@ static int nfc_genl_dump_targets(struct sk_buff *skb,
105 struct nfc_dev *dev = (struct nfc_dev *) cb->args[1]; 107 struct nfc_dev *dev = (struct nfc_dev *) cb->args[1];
106 int rc; 108 int rc;
107 109
108 nfc_dbg("entry"); 110 pr_debug("entry\n");
109 111
110 if (!dev) { 112 if (!dev) {
111 dev = __get_device_from_cb(cb); 113 dev = __get_device_from_cb(cb);
@@ -139,7 +141,7 @@ static int nfc_genl_dump_targets_done(struct netlink_callback *cb)
139{ 141{
140 struct nfc_dev *dev = (struct nfc_dev *) cb->args[1]; 142 struct nfc_dev *dev = (struct nfc_dev *) cb->args[1];
141 143
142 nfc_dbg("entry"); 144 pr_debug("entry\n");
143 145
144 if (dev) 146 if (dev)
145 nfc_put_device(dev); 147 nfc_put_device(dev);
@@ -152,7 +154,7 @@ int nfc_genl_targets_found(struct nfc_dev *dev)
152 struct sk_buff *msg; 154 struct sk_buff *msg;
153 void *hdr; 155 void *hdr;
154 156
155 nfc_dbg("entry"); 157 pr_debug("entry\n");
156 158
157 dev->genl_data.poll_req_pid = 0; 159 dev->genl_data.poll_req_pid = 0;
158 160
@@ -183,7 +185,7 @@ int nfc_genl_device_added(struct nfc_dev *dev)
183 struct sk_buff *msg; 185 struct sk_buff *msg;
184 void *hdr; 186 void *hdr;
185 187
186 nfc_dbg("entry"); 188 pr_debug("entry\n");
187 189
188 msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); 190 msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
189 if (!msg) 191 if (!msg)
@@ -216,7 +218,7 @@ int nfc_genl_device_removed(struct nfc_dev *dev)
216 struct sk_buff *msg; 218 struct sk_buff *msg;
217 void *hdr; 219 void *hdr;
218 220
219 nfc_dbg("entry"); 221 pr_debug("entry\n");
220 222
221 msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); 223 msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
222 if (!msg) 224 if (!msg)
@@ -249,7 +251,7 @@ static int nfc_genl_send_device(struct sk_buff *msg, struct nfc_dev *dev,
249{ 251{
250 void *hdr; 252 void *hdr;
251 253
252 nfc_dbg("entry"); 254 pr_debug("entry\n");
253 255
254 hdr = genlmsg_put(msg, pid, seq, &nfc_genl_family, flags, 256 hdr = genlmsg_put(msg, pid, seq, &nfc_genl_family, flags,
255 NFC_CMD_GET_DEVICE); 257 NFC_CMD_GET_DEVICE);
@@ -277,7 +279,7 @@ static int nfc_genl_dump_devices(struct sk_buff *skb,
277 struct nfc_dev *dev = (struct nfc_dev *) cb->args[1]; 279 struct nfc_dev *dev = (struct nfc_dev *) cb->args[1];
278 bool first_call = false; 280 bool first_call = false;
279 281
280 nfc_dbg("entry"); 282 pr_debug("entry\n");
281 283
282 if (!iter) { 284 if (!iter) {
283 first_call = true; 285 first_call = true;
@@ -319,7 +321,7 @@ static int nfc_genl_dump_devices_done(struct netlink_callback *cb)
319{ 321{
320 struct class_dev_iter *iter = (struct class_dev_iter *) cb->args[0]; 322 struct class_dev_iter *iter = (struct class_dev_iter *) cb->args[0];
321 323
322 nfc_dbg("entry"); 324 pr_debug("entry\n");
323 325
324 nfc_device_iter_exit(iter); 326 nfc_device_iter_exit(iter);
325 kfree(iter); 327 kfree(iter);
@@ -334,7 +336,7 @@ static int nfc_genl_get_device(struct sk_buff *skb, struct genl_info *info)
334 u32 idx; 336 u32 idx;
335 int rc = -ENOBUFS; 337 int rc = -ENOBUFS;
336 338
337 nfc_dbg("entry"); 339 pr_debug("entry\n");
338 340
339 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) 341 if (!info->attrs[NFC_ATTR_DEVICE_INDEX])
340 return -EINVAL; 342 return -EINVAL;
@@ -373,7 +375,7 @@ static int nfc_genl_dev_up(struct sk_buff *skb, struct genl_info *info)
373 int rc; 375 int rc;
374 u32 idx; 376 u32 idx;
375 377
376 nfc_dbg("entry"); 378 pr_debug("entry\n");
377 379
378 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) 380 if (!info->attrs[NFC_ATTR_DEVICE_INDEX])
379 return -EINVAL; 381 return -EINVAL;
@@ -396,7 +398,7 @@ static int nfc_genl_dev_down(struct sk_buff *skb, struct genl_info *info)
396 int rc; 398 int rc;
397 u32 idx; 399 u32 idx;
398 400
399 nfc_dbg("entry"); 401 pr_debug("entry\n");
400 402
401 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) 403 if (!info->attrs[NFC_ATTR_DEVICE_INDEX])
402 return -EINVAL; 404 return -EINVAL;
@@ -420,7 +422,7 @@ static int nfc_genl_start_poll(struct sk_buff *skb, struct genl_info *info)
420 u32 idx; 422 u32 idx;
421 u32 protocols; 423 u32 protocols;
422 424
423 nfc_dbg("entry"); 425 pr_debug("entry\n");
424 426
425 if (!info->attrs[NFC_ATTR_DEVICE_INDEX] || 427 if (!info->attrs[NFC_ATTR_DEVICE_INDEX] ||
426 !info->attrs[NFC_ATTR_PROTOCOLS]) 428 !info->attrs[NFC_ATTR_PROTOCOLS])
@@ -451,7 +453,7 @@ static int nfc_genl_stop_poll(struct sk_buff *skb, struct genl_info *info)
451 int rc; 453 int rc;
452 u32 idx; 454 u32 idx;
453 455
454 nfc_dbg("entry"); 456 pr_debug("entry\n");
455 457
456 if (!info->attrs[NFC_ATTR_DEVICE_INDEX]) 458 if (!info->attrs[NFC_ATTR_DEVICE_INDEX])
457 return -EINVAL; 459 return -EINVAL;
@@ -524,7 +526,7 @@ static int nfc_genl_rcv_nl_event(struct notifier_block *this,
524 if (event != NETLINK_URELEASE || n->protocol != NETLINK_GENERIC) 526 if (event != NETLINK_URELEASE || n->protocol != NETLINK_GENERIC)
525 goto out; 527 goto out;
526 528
527 nfc_dbg("NETLINK_URELEASE event from id %d", n->pid); 529 pr_debug("NETLINK_URELEASE event from id %d\n", n->pid);
528 530
529 nfc_device_iter_init(&iter); 531 nfc_device_iter_init(&iter);
530 dev = nfc_device_iter_next(&iter); 532 dev = nfc_device_iter_next(&iter);
diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c
index feb235b2fe1..68ecf3fa94e 100644
--- a/net/nfc/rawsock.c
+++ b/net/nfc/rawsock.c
@@ -31,7 +31,7 @@
31 31
32static void rawsock_write_queue_purge(struct sock *sk) 32static void rawsock_write_queue_purge(struct sock *sk)
33{ 33{
34 nfc_dbg("sk=%p", sk); 34 pr_debug("sk=%p\n", sk);
35 35
36 spin_lock_bh(&sk->sk_write_queue.lock); 36 spin_lock_bh(&sk->sk_write_queue.lock);
37 __skb_queue_purge(&sk->sk_write_queue); 37 __skb_queue_purge(&sk->sk_write_queue);
@@ -41,7 +41,7 @@ static void rawsock_write_queue_purge(struct sock *sk)
41 41
42static void rawsock_report_error(struct sock *sk, int err) 42static void rawsock_report_error(struct sock *sk, int err)
43{ 43{
44 nfc_dbg("sk=%p err=%d", sk, err); 44 pr_debug("sk=%p err=%d\n", sk, err);
45 45
46 sk->sk_shutdown = SHUTDOWN_MASK; 46 sk->sk_shutdown = SHUTDOWN_MASK;
47 sk->sk_err = -err; 47 sk->sk_err = -err;
@@ -54,7 +54,7 @@ static int rawsock_release(struct socket *sock)
54{ 54{
55 struct sock *sk = sock->sk; 55 struct sock *sk = sock->sk;
56 56
57 nfc_dbg("sock=%p", sock); 57 pr_debug("sock=%p\n", sock);
58 58
59 sock_orphan(sk); 59 sock_orphan(sk);
60 sock_put(sk); 60 sock_put(sk);
@@ -70,14 +70,14 @@ static int rawsock_connect(struct socket *sock, struct sockaddr *_addr,
70 struct nfc_dev *dev; 70 struct nfc_dev *dev;
71 int rc = 0; 71 int rc = 0;
72 72
73 nfc_dbg("sock=%p sk=%p flags=%d", sock, sk, flags); 73 pr_debug("sock=%p sk=%p flags=%d\n", sock, sk, flags);
74 74
75 if (!addr || len < sizeof(struct sockaddr_nfc) || 75 if (!addr || len < sizeof(struct sockaddr_nfc) ||
76 addr->sa_family != AF_NFC) 76 addr->sa_family != AF_NFC)
77 return -EINVAL; 77 return -EINVAL;
78 78
79 nfc_dbg("addr dev_idx=%u target_idx=%u protocol=%u", addr->dev_idx, 79 pr_debug("addr dev_idx=%u target_idx=%u protocol=%u\n",
80 addr->target_idx, addr->nfc_protocol); 80 addr->dev_idx, addr->target_idx, addr->nfc_protocol);
81 81
82 lock_sock(sk); 82 lock_sock(sk);
83 83
@@ -138,7 +138,7 @@ static void rawsock_data_exchange_complete(void *context, struct sk_buff *skb,
138 138
139 BUG_ON(in_irq()); 139 BUG_ON(in_irq());
140 140
141 nfc_dbg("sk=%p err=%d", sk, err); 141 pr_debug("sk=%p err=%d\n", sk, err);
142 142
143 if (err) 143 if (err)
144 goto error; 144 goto error;
@@ -174,7 +174,7 @@ static void rawsock_tx_work(struct work_struct *work)
174 struct sk_buff *skb; 174 struct sk_buff *skb;
175 int rc; 175 int rc;
176 176
177 nfc_dbg("sk=%p target_idx=%u", sk, target_idx); 177 pr_debug("sk=%p target_idx=%u\n", sk, target_idx);
178 178
179 if (sk->sk_shutdown & SEND_SHUTDOWN) { 179 if (sk->sk_shutdown & SEND_SHUTDOWN) {
180 rawsock_write_queue_purge(sk); 180 rawsock_write_queue_purge(sk);
@@ -200,7 +200,7 @@ static int rawsock_sendmsg(struct kiocb *iocb, struct socket *sock,
200 struct sk_buff *skb; 200 struct sk_buff *skb;
201 int rc; 201 int rc;
202 202
203 nfc_dbg("sock=%p sk=%p len=%zu", sock, sk, len); 203 pr_debug("sock=%p sk=%p len=%zu\n", sock, sk, len);
204 204
205 if (msg->msg_namelen) 205 if (msg->msg_namelen)
206 return -EOPNOTSUPP; 206 return -EOPNOTSUPP;
@@ -241,7 +241,7 @@ static int rawsock_recvmsg(struct kiocb *iocb, struct socket *sock,
241 int copied; 241 int copied;
242 int rc; 242 int rc;
243 243
244 nfc_dbg("sock=%p sk=%p len=%zu flags=%d", sock, sk, len, flags); 244 pr_debug("sock=%p sk=%p len=%zu flags=%d\n", sock, sk, len, flags);
245 245
246 skb = skb_recv_datagram(sk, flags, noblock, &rc); 246 skb = skb_recv_datagram(sk, flags, noblock, &rc);
247 if (!skb) 247 if (!skb)
@@ -285,7 +285,7 @@ static const struct proto_ops rawsock_ops = {
285 285
286static void rawsock_destruct(struct sock *sk) 286static void rawsock_destruct(struct sock *sk)
287{ 287{
288 nfc_dbg("sk=%p", sk); 288 pr_debug("sk=%p\n", sk);
289 289
290 if (sk->sk_state == TCP_ESTABLISHED) { 290 if (sk->sk_state == TCP_ESTABLISHED) {
291 nfc_deactivate_target(nfc_rawsock(sk)->dev, 291 nfc_deactivate_target(nfc_rawsock(sk)->dev,
@@ -306,7 +306,7 @@ static int rawsock_create(struct net *net, struct socket *sock,
306{ 306{
307 struct sock *sk; 307 struct sock *sk;
308 308
309 nfc_dbg("sock=%p", sock); 309 pr_debug("sock=%p\n", sock);
310 310
311 if (sock->type != SOCK_SEQPACKET) 311 if (sock->type != SOCK_SEQPACKET)
312 return -ESOCKTNOSUPPORT; 312 return -ESOCKTNOSUPPORT;