diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-09-20 10:56:40 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-09-24 20:02:34 -0400 |
commit | 260425308de63155a087361d961dafd2dd45e275 (patch) | |
tree | e403eed69452931025585b4584a84f7c880b5115 /net/nfc | |
parent | c5da0e4a35eb1eba0c1593bef4bf2b58d9d50d6b (diff) |
NFC: digital: Add newline to pr_* calls
We do not add the newline to the pr_fmt macro, in order to give more
flexibility to the caller and to keep the logging style consistent with
the rest of the NFC and kernel code.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/digital_core.c | 32 | ||||
-rw-r--r-- | net/nfc/digital_dep.c | 12 | ||||
-rw-r--r-- | net/nfc/digital_technology.c | 4 |
3 files changed, 22 insertions, 26 deletions
diff --git a/net/nfc/digital_core.c b/net/nfc/digital_core.c index 6f563d09b520..09fc95439955 100644 --- a/net/nfc/digital_core.c +++ b/net/nfc/digital_core.c | |||
@@ -198,14 +198,14 @@ static void digital_wq_cmd(struct work_struct *work) | |||
198 | break; | 198 | break; |
199 | 199 | ||
200 | default: | 200 | default: |
201 | pr_err("Unknown cmd type %d", cmd->type); | 201 | pr_err("Unknown cmd type %d\n", cmd->type); |
202 | return; | 202 | return; |
203 | } | 203 | } |
204 | 204 | ||
205 | if (!rc) | 205 | if (!rc) |
206 | return; | 206 | return; |
207 | 207 | ||
208 | pr_err("in_send_command returned err %d", rc); | 208 | pr_err("in_send_command returned err %d\n", rc); |
209 | 209 | ||
210 | mutex_lock(&ddev->cmd_lock); | 210 | mutex_lock(&ddev->cmd_lock); |
211 | list_del(&cmd->queue); | 211 | list_del(&cmd->queue); |
@@ -252,7 +252,7 @@ int digital_in_configure_hw(struct nfc_digital_dev *ddev, int type, int param) | |||
252 | 252 | ||
253 | rc = ddev->ops->in_configure_hw(ddev, type, param); | 253 | rc = ddev->ops->in_configure_hw(ddev, type, param); |
254 | if (rc) | 254 | if (rc) |
255 | pr_err("in_configure_hw failed: %d", rc); | 255 | pr_err("in_configure_hw failed: %d\n", rc); |
256 | 256 | ||
257 | return rc; | 257 | return rc; |
258 | } | 258 | } |
@@ -263,7 +263,7 @@ int digital_tg_configure_hw(struct nfc_digital_dev *ddev, int type, int param) | |||
263 | 263 | ||
264 | rc = ddev->ops->tg_configure_hw(ddev, type, param); | 264 | rc = ddev->ops->tg_configure_hw(ddev, type, param); |
265 | if (rc) | 265 | if (rc) |
266 | pr_err("tg_configure_hw failed: %d", rc); | 266 | pr_err("tg_configure_hw failed: %d\n", rc); |
267 | 267 | ||
268 | return rc; | 268 | return rc; |
269 | } | 269 | } |
@@ -332,11 +332,11 @@ int digital_target_found(struct nfc_digital_dev *ddev, | |||
332 | break; | 332 | break; |
333 | 333 | ||
334 | default: | 334 | default: |
335 | pr_err("Invalid protocol %d", protocol); | 335 | pr_err("Invalid protocol %d\n", protocol); |
336 | return -EINVAL; | 336 | return -EINVAL; |
337 | } | 337 | } |
338 | 338 | ||
339 | pr_debug("rf_tech=%d, protocol=%d", rf_tech, protocol); | 339 | pr_debug("rf_tech=%d, protocol=%d\n", rf_tech, protocol); |
340 | 340 | ||
341 | ddev->curr_rf_tech = rf_tech; | 341 | ddev->curr_rf_tech = rf_tech; |
342 | ddev->curr_protocol = protocol; | 342 | ddev->curr_protocol = protocol; |
@@ -434,24 +434,24 @@ static int digital_start_poll(struct nfc_dev *nfc_dev, __u32 im_protocols, | |||
434 | struct nfc_digital_dev *ddev = nfc_get_drvdata(nfc_dev); | 434 | struct nfc_digital_dev *ddev = nfc_get_drvdata(nfc_dev); |
435 | u32 matching_im_protocols, matching_tm_protocols; | 435 | u32 matching_im_protocols, matching_tm_protocols; |
436 | 436 | ||
437 | pr_debug("protocols: im 0x%x, tm 0x%x, supported 0x%x", im_protocols, | 437 | pr_debug("protocols: im 0x%x, tm 0x%x, supported 0x%x\n", im_protocols, |
438 | tm_protocols, ddev->protocols); | 438 | tm_protocols, ddev->protocols); |
439 | 439 | ||
440 | matching_im_protocols = ddev->protocols & im_protocols; | 440 | matching_im_protocols = ddev->protocols & im_protocols; |
441 | matching_tm_protocols = ddev->protocols & tm_protocols; | 441 | matching_tm_protocols = ddev->protocols & tm_protocols; |
442 | 442 | ||
443 | if (!matching_im_protocols && !matching_tm_protocols) { | 443 | if (!matching_im_protocols && !matching_tm_protocols) { |
444 | pr_err("No known protocol"); | 444 | pr_err("Unknown protocol\n"); |
445 | return -EINVAL; | 445 | return -EINVAL; |
446 | } | 446 | } |
447 | 447 | ||
448 | if (ddev->poll_tech_count) { | 448 | if (ddev->poll_tech_count) { |
449 | pr_err("Already polling"); | 449 | pr_err("Already polling\n"); |
450 | return -EBUSY; | 450 | return -EBUSY; |
451 | } | 451 | } |
452 | 452 | ||
453 | if (ddev->curr_protocol) { | 453 | if (ddev->curr_protocol) { |
454 | pr_err("A target is already active"); | 454 | pr_err("A target is already active\n"); |
455 | return -EBUSY; | 455 | return -EBUSY; |
456 | } | 456 | } |
457 | 457 | ||
@@ -487,7 +487,7 @@ static int digital_start_poll(struct nfc_dev *nfc_dev, __u32 im_protocols, | |||
487 | } | 487 | } |
488 | 488 | ||
489 | if (!ddev->poll_tech_count) { | 489 | if (!ddev->poll_tech_count) { |
490 | pr_err("Unsupported protocols: im=0x%x, tm=0x%x", | 490 | pr_err("Unsupported protocols: im=0x%x, tm=0x%x\n", |
491 | matching_im_protocols, matching_tm_protocols); | 491 | matching_im_protocols, matching_tm_protocols); |
492 | return -EINVAL; | 492 | return -EINVAL; |
493 | } | 493 | } |
@@ -504,7 +504,7 @@ static void digital_stop_poll(struct nfc_dev *nfc_dev) | |||
504 | mutex_lock(&ddev->poll_lock); | 504 | mutex_lock(&ddev->poll_lock); |
505 | 505 | ||
506 | if (!ddev->poll_tech_count) { | 506 | if (!ddev->poll_tech_count) { |
507 | pr_err("Polling operation was not running"); | 507 | pr_err("Polling operation was not running\n"); |
508 | mutex_unlock(&ddev->poll_lock); | 508 | mutex_unlock(&ddev->poll_lock); |
509 | return; | 509 | return; |
510 | } | 510 | } |
@@ -611,7 +611,7 @@ static int digital_in_send(struct nfc_dev *nfc_dev, struct nfc_target *target, | |||
611 | 611 | ||
612 | data_exch = kzalloc(sizeof(struct digital_data_exch), GFP_KERNEL); | 612 | data_exch = kzalloc(sizeof(struct digital_data_exch), GFP_KERNEL); |
613 | if (!data_exch) { | 613 | if (!data_exch) { |
614 | pr_err("Failed to allocate data_exch struct"); | 614 | pr_err("Failed to allocate data_exch struct\n"); |
615 | return -ENOMEM; | 615 | return -ENOMEM; |
616 | } | 616 | } |
617 | 617 | ||
@@ -653,10 +653,8 @@ struct nfc_digital_dev *nfc_digital_allocate_device(struct nfc_digital_ops *ops, | |||
653 | return NULL; | 653 | return NULL; |
654 | 654 | ||
655 | ddev = kzalloc(sizeof(struct nfc_digital_dev), GFP_KERNEL); | 655 | ddev = kzalloc(sizeof(struct nfc_digital_dev), GFP_KERNEL); |
656 | if (!ddev) { | 656 | if (!ddev) |
657 | pr_err("kzalloc failed"); | ||
658 | return NULL; | 657 | return NULL; |
659 | } | ||
660 | 658 | ||
661 | ddev->driver_capabilities = driver_capabilities; | 659 | ddev->driver_capabilities = driver_capabilities; |
662 | ddev->ops = ops; | 660 | ddev->ops = ops; |
@@ -686,7 +684,7 @@ struct nfc_digital_dev *nfc_digital_allocate_device(struct nfc_digital_ops *ops, | |||
686 | ddev->tx_headroom, | 684 | ddev->tx_headroom, |
687 | ddev->tx_tailroom); | 685 | ddev->tx_tailroom); |
688 | if (!ddev->nfc_dev) { | 686 | if (!ddev->nfc_dev) { |
689 | pr_err("nfc_allocate_device failed"); | 687 | pr_err("nfc_allocate_device failed\n"); |
690 | goto free_dev; | 688 | goto free_dev; |
691 | } | 689 | } |
692 | 690 | ||
diff --git a/net/nfc/digital_dep.c b/net/nfc/digital_dep.c index 15f140ae9099..07bbc24fb4c7 100644 --- a/net/nfc/digital_dep.c +++ b/net/nfc/digital_dep.c | |||
@@ -315,7 +315,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg, | |||
315 | break; | 315 | break; |
316 | 316 | ||
317 | case DIGITAL_NFC_DEP_PFB_ACK_NACK_PDU: | 317 | case DIGITAL_NFC_DEP_PFB_ACK_NACK_PDU: |
318 | pr_err("Received a ACK/NACK PDU"); | 318 | pr_err("Received a ACK/NACK PDU\n"); |
319 | rc = -EIO; | 319 | rc = -EIO; |
320 | goto error; | 320 | goto error; |
321 | 321 | ||
@@ -334,7 +334,7 @@ static void digital_in_recv_dep_res(struct nfc_digital_dev *ddev, void *arg, | |||
334 | } | 334 | } |
335 | 335 | ||
336 | if (DIGITAL_NFC_DEP_MI_BIT_SET(pfb)) { | 336 | if (DIGITAL_NFC_DEP_MI_BIT_SET(pfb)) { |
337 | pr_err("MI bit set. Chained PDU not supported."); | 337 | pr_err("MI bit set. Chained PDU not supported\n"); |
338 | rc = -EIO; | 338 | rc = -EIO; |
339 | goto error; | 339 | goto error; |
340 | } | 340 | } |
@@ -426,16 +426,16 @@ static void digital_tg_recv_dep_req(struct nfc_digital_dev *ddev, void *arg, | |||
426 | 426 | ||
427 | switch (DIGITAL_NFC_DEP_PFB_TYPE(dep_req->pfb)) { | 427 | switch (DIGITAL_NFC_DEP_PFB_TYPE(dep_req->pfb)) { |
428 | case DIGITAL_NFC_DEP_PFB_I_PDU: | 428 | case DIGITAL_NFC_DEP_PFB_I_PDU: |
429 | pr_debug("DIGITAL_NFC_DEP_PFB_I_PDU"); | 429 | pr_debug("DIGITAL_NFC_DEP_PFB_I_PDU\n"); |
430 | ddev->curr_nfc_dep_pni = DIGITAL_NFC_DEP_PFB_PNI(dep_req->pfb); | 430 | ddev->curr_nfc_dep_pni = DIGITAL_NFC_DEP_PFB_PNI(dep_req->pfb); |
431 | break; | 431 | break; |
432 | case DIGITAL_NFC_DEP_PFB_ACK_NACK_PDU: | 432 | case DIGITAL_NFC_DEP_PFB_ACK_NACK_PDU: |
433 | pr_err("Received a ACK/NACK PDU"); | 433 | pr_err("Received a ACK/NACK PDU\n"); |
434 | rc = -EINVAL; | 434 | rc = -EINVAL; |
435 | goto exit; | 435 | goto exit; |
436 | break; | 436 | break; |
437 | case DIGITAL_NFC_DEP_PFB_SUPERVISOR_PDU: | 437 | case DIGITAL_NFC_DEP_PFB_SUPERVISOR_PDU: |
438 | pr_err("Received a SUPERVISOR PDU"); | 438 | pr_err("Received a SUPERVISOR PDU\n"); |
439 | rc = -EINVAL; | 439 | rc = -EINVAL; |
440 | goto exit; | 440 | goto exit; |
441 | break; | 441 | break; |
@@ -563,7 +563,7 @@ static void digital_tg_recv_psl_req(struct nfc_digital_dev *ddev, void *arg, | |||
563 | rf_tech = NFC_DIGITAL_RF_TECH_424F; | 563 | rf_tech = NFC_DIGITAL_RF_TECH_424F; |
564 | break; | 564 | break; |
565 | default: | 565 | default: |
566 | pr_err("Unsuported dsi value %d", dsi); | 566 | pr_err("Unsuported dsi value %d\n", dsi); |
567 | goto exit; | 567 | goto exit; |
568 | } | 568 | } |
569 | 569 | ||
diff --git a/net/nfc/digital_technology.c b/net/nfc/digital_technology.c index 5a13e1bb1e68..bcdb73eaf945 100644 --- a/net/nfc/digital_technology.c +++ b/net/nfc/digital_technology.c | |||
@@ -259,10 +259,8 @@ static int digital_in_send_sdd_req(struct nfc_digital_dev *ddev, | |||
259 | return rc; | 259 | return rc; |
260 | 260 | ||
261 | skb = digital_skb_alloc(ddev, 2); | 261 | skb = digital_skb_alloc(ddev, 2); |
262 | if (!skb) { | 262 | if (!skb) |
263 | pr_err("alloc_skb failed"); | ||
264 | return -ENOMEM; | 263 | return -ENOMEM; |
265 | } | ||
266 | 264 | ||
267 | if (target->nfcid1_len == 0) | 265 | if (target->nfcid1_len == 0) |
268 | sel_cmd = DIGITAL_CMD_SEL_REQ_CL1; | 266 | sel_cmd = DIGITAL_CMD_SEL_REQ_CL1; |