diff options
author | Joe Perches <joe@perches.com> | 2015-04-07 03:17:00 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2015-04-07 06:05:12 -0400 |
commit | 3590ebc040c9ee5d06754ce926f0e7c3a595e46d (patch) | |
tree | 62d4e1160321ab1d8172e780280232311e4cd5e3 /drivers/nfc/port100.c | |
parent | 5df848f37b1d20e5dd64bea16ba9f69ed321e11b (diff) |
NFC: logging neatening
Add missing terminating newlines to nfc_info and nfc_err
to avoid possible interleaving from other messages.
Miscellanea:
o typo fix of "unknonwn" in message
o remove unnecessary OOM messages as there's a generic dump_stack()
o realign arguments
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/port100.c')
-rw-r--r-- | drivers/nfc/port100.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/nfc/port100.c b/drivers/nfc/port100.c index 4ac4d31f6c59..87d509996704 100644 --- a/drivers/nfc/port100.c +++ b/drivers/nfc/port100.c | |||
@@ -604,11 +604,11 @@ static void port100_recv_response(struct urb *urb) | |||
604 | case -ECONNRESET: | 604 | case -ECONNRESET: |
605 | case -ENOENT: | 605 | case -ENOENT: |
606 | nfc_err(&dev->interface->dev, | 606 | nfc_err(&dev->interface->dev, |
607 | "The urb has been canceled (status %d)", urb->status); | 607 | "The urb has been canceled (status %d)\n", urb->status); |
608 | goto sched_wq; | 608 | goto sched_wq; |
609 | case -ESHUTDOWN: | 609 | case -ESHUTDOWN: |
610 | default: | 610 | default: |
611 | nfc_err(&dev->interface->dev, "Urb failure (status %d)", | 611 | nfc_err(&dev->interface->dev, "Urb failure (status %d)\n", |
612 | urb->status); | 612 | urb->status); |
613 | goto sched_wq; | 613 | goto sched_wq; |
614 | } | 614 | } |
@@ -616,7 +616,7 @@ static void port100_recv_response(struct urb *urb) | |||
616 | in_frame = dev->in_urb->transfer_buffer; | 616 | in_frame = dev->in_urb->transfer_buffer; |
617 | 617 | ||
618 | if (!port100_rx_frame_is_valid(in_frame)) { | 618 | if (!port100_rx_frame_is_valid(in_frame)) { |
619 | nfc_err(&dev->interface->dev, "Received an invalid frame"); | 619 | nfc_err(&dev->interface->dev, "Received an invalid frame\n"); |
620 | cmd->status = -EIO; | 620 | cmd->status = -EIO; |
621 | goto sched_wq; | 621 | goto sched_wq; |
622 | } | 622 | } |
@@ -626,7 +626,7 @@ static void port100_recv_response(struct urb *urb) | |||
626 | 626 | ||
627 | if (!port100_rx_frame_is_cmd_response(dev, in_frame)) { | 627 | if (!port100_rx_frame_is_cmd_response(dev, in_frame)) { |
628 | nfc_err(&dev->interface->dev, | 628 | nfc_err(&dev->interface->dev, |
629 | "It's not the response to the last command"); | 629 | "It's not the response to the last command\n"); |
630 | cmd->status = -EIO; | 630 | cmd->status = -EIO; |
631 | goto sched_wq; | 631 | goto sched_wq; |
632 | } | 632 | } |
@@ -657,11 +657,11 @@ static void port100_recv_ack(struct urb *urb) | |||
657 | case -ECONNRESET: | 657 | case -ECONNRESET: |
658 | case -ENOENT: | 658 | case -ENOENT: |
659 | nfc_err(&dev->interface->dev, | 659 | nfc_err(&dev->interface->dev, |
660 | "The urb has been stopped (status %d)", urb->status); | 660 | "The urb has been stopped (status %d)\n", urb->status); |
661 | goto sched_wq; | 661 | goto sched_wq; |
662 | case -ESHUTDOWN: | 662 | case -ESHUTDOWN: |
663 | default: | 663 | default: |
664 | nfc_err(&dev->interface->dev, "Urb failure (status %d)", | 664 | nfc_err(&dev->interface->dev, "Urb failure (status %d)\n", |
665 | urb->status); | 665 | urb->status); |
666 | goto sched_wq; | 666 | goto sched_wq; |
667 | } | 667 | } |
@@ -669,7 +669,7 @@ static void port100_recv_ack(struct urb *urb) | |||
669 | in_frame = dev->in_urb->transfer_buffer; | 669 | in_frame = dev->in_urb->transfer_buffer; |
670 | 670 | ||
671 | if (!port100_rx_frame_is_ack(in_frame)) { | 671 | if (!port100_rx_frame_is_ack(in_frame)) { |
672 | nfc_err(&dev->interface->dev, "Received an invalid ack"); | 672 | nfc_err(&dev->interface->dev, "Received an invalid ack\n"); |
673 | cmd->status = -EIO; | 673 | cmd->status = -EIO; |
674 | goto sched_wq; | 674 | goto sched_wq; |
675 | } | 675 | } |
@@ -677,7 +677,7 @@ static void port100_recv_ack(struct urb *urb) | |||
677 | rc = port100_submit_urb_for_response(dev, GFP_ATOMIC); | 677 | rc = port100_submit_urb_for_response(dev, GFP_ATOMIC); |
678 | if (rc) { | 678 | if (rc) { |
679 | nfc_err(&dev->interface->dev, | 679 | nfc_err(&dev->interface->dev, |
680 | "usb_submit_urb failed with result %d", rc); | 680 | "usb_submit_urb failed with result %d\n", rc); |
681 | cmd->status = rc; | 681 | cmd->status = rc; |
682 | goto sched_wq; | 682 | goto sched_wq; |
683 | } | 683 | } |
@@ -873,11 +873,11 @@ static void port100_send_complete(struct urb *urb) | |||
873 | case -ECONNRESET: | 873 | case -ECONNRESET: |
874 | case -ENOENT: | 874 | case -ENOENT: |
875 | nfc_err(&dev->interface->dev, | 875 | nfc_err(&dev->interface->dev, |
876 | "The urb has been stopped (status %d)", urb->status); | 876 | "The urb has been stopped (status %d)\n", urb->status); |
877 | break; | 877 | break; |
878 | case -ESHUTDOWN: | 878 | case -ESHUTDOWN: |
879 | default: | 879 | default: |
880 | nfc_err(&dev->interface->dev, "Urb failure (status %d)", | 880 | nfc_err(&dev->interface->dev, "Urb failure (status %d)\n", |
881 | urb->status); | 881 | urb->status); |
882 | } | 882 | } |
883 | } | 883 | } |
@@ -1094,7 +1094,7 @@ static void port100_in_comm_rf_complete(struct port100 *dev, void *arg, | |||
1094 | 1094 | ||
1095 | if (resp->len < 4) { | 1095 | if (resp->len < 4) { |
1096 | nfc_err(&dev->interface->dev, | 1096 | nfc_err(&dev->interface->dev, |
1097 | "Invalid packet length received.\n"); | 1097 | "Invalid packet length received\n"); |
1098 | rc = -EIO; | 1098 | rc = -EIO; |
1099 | goto error; | 1099 | goto error; |
1100 | } | 1100 | } |
@@ -1250,7 +1250,7 @@ static bool port100_tg_target_activated(struct port100 *dev, u8 tgt_activated) | |||
1250 | PORT100_MDAA_TGT_WAS_ACTIVATED_MASK; | 1250 | PORT100_MDAA_TGT_WAS_ACTIVATED_MASK; |
1251 | break; | 1251 | break; |
1252 | default: | 1252 | default: |
1253 | nfc_err(&dev->interface->dev, "Unknonwn command type.\n"); | 1253 | nfc_err(&dev->interface->dev, "Unknown command type\n"); |
1254 | return false; | 1254 | return false; |
1255 | } | 1255 | } |
1256 | 1256 | ||
@@ -1481,7 +1481,7 @@ static int port100_probe(struct usb_interface *interface, | |||
1481 | cmd_type_mask = port100_get_command_type_mask(dev); | 1481 | cmd_type_mask = port100_get_command_type_mask(dev); |
1482 | if (!cmd_type_mask) { | 1482 | if (!cmd_type_mask) { |
1483 | nfc_err(&interface->dev, | 1483 | nfc_err(&interface->dev, |
1484 | "Could not get supported command types.\n"); | 1484 | "Could not get supported command types\n"); |
1485 | rc = -ENODEV; | 1485 | rc = -ENODEV; |
1486 | goto error; | 1486 | goto error; |
1487 | } | 1487 | } |
@@ -1494,7 +1494,7 @@ static int port100_probe(struct usb_interface *interface, | |||
1494 | rc = port100_set_command_type(dev, dev->cmd_type); | 1494 | rc = port100_set_command_type(dev, dev->cmd_type); |
1495 | if (rc) { | 1495 | if (rc) { |
1496 | nfc_err(&interface->dev, | 1496 | nfc_err(&interface->dev, |
1497 | "The device does not support command type %u.\n", | 1497 | "The device does not support command type %u\n", |
1498 | dev->cmd_type); | 1498 | dev->cmd_type); |
1499 | goto error; | 1499 | goto error; |
1500 | } | 1500 | } |
@@ -1502,7 +1502,7 @@ static int port100_probe(struct usb_interface *interface, | |||
1502 | fw_version = port100_get_firmware_version(dev); | 1502 | fw_version = port100_get_firmware_version(dev); |
1503 | if (!fw_version) | 1503 | if (!fw_version) |
1504 | nfc_err(&interface->dev, | 1504 | nfc_err(&interface->dev, |
1505 | "Could not get device firmware version.\n"); | 1505 | "Could not get device firmware version\n"); |
1506 | 1506 | ||
1507 | nfc_info(&interface->dev, | 1507 | nfc_info(&interface->dev, |
1508 | "Sony NFC Port-100 Series attached (firmware v%x.%02x)\n", | 1508 | "Sony NFC Port-100 Series attached (firmware v%x.%02x)\n", |
@@ -1515,7 +1515,7 @@ static int port100_probe(struct usb_interface *interface, | |||
1515 | dev->skb_tailroom); | 1515 | dev->skb_tailroom); |
1516 | if (!dev->nfc_digital_dev) { | 1516 | if (!dev->nfc_digital_dev) { |
1517 | nfc_err(&interface->dev, | 1517 | nfc_err(&interface->dev, |
1518 | "Could not allocate nfc_digital_dev.\n"); | 1518 | "Could not allocate nfc_digital_dev\n"); |
1519 | rc = -ENOMEM; | 1519 | rc = -ENOMEM; |
1520 | goto error; | 1520 | goto error; |
1521 | } | 1521 | } |
@@ -1526,7 +1526,7 @@ static int port100_probe(struct usb_interface *interface, | |||
1526 | rc = nfc_digital_register_device(dev->nfc_digital_dev); | 1526 | rc = nfc_digital_register_device(dev->nfc_digital_dev); |
1527 | if (rc) { | 1527 | if (rc) { |
1528 | nfc_err(&interface->dev, | 1528 | nfc_err(&interface->dev, |
1529 | "Could not register digital device.\n"); | 1529 | "Could not register digital device\n"); |
1530 | goto free_nfc_dev; | 1530 | goto free_nfc_dev; |
1531 | } | 1531 | } |
1532 | 1532 | ||
@@ -1562,7 +1562,7 @@ static void port100_disconnect(struct usb_interface *interface) | |||
1562 | 1562 | ||
1563 | kfree(dev->cmd); | 1563 | kfree(dev->cmd); |
1564 | 1564 | ||
1565 | nfc_info(&interface->dev, "Sony Port-100 NFC device disconnected"); | 1565 | nfc_info(&interface->dev, "Sony Port-100 NFC device disconnected\n"); |
1566 | } | 1566 | } |
1567 | 1567 | ||
1568 | static struct usb_driver port100_driver = { | 1568 | static struct usb_driver port100_driver = { |