diff options
author | Alex Lu <alex_lu@realsil.com.cn> | 2019-08-31 04:46:11 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2019-09-05 11:27:22 -0400 |
commit | f1300c0340872d7d02617f439433d70c6f47700f (patch) | |
tree | 8db3fef39f56b661883507a8e6313fff0bb52885 | |
parent | d182215d2fb9e58a7637efc937fa11dc15cf7a84 (diff) |
Bluetooth: btrtl: Remove trailing newline from calls to rtl_dev macros
These printing macros already add a trailing newline, so drop these
unnecessary additional newlines.
Signed-off-by: Alex Lu <alex_lu@realsil.com.cn>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | drivers/bluetooth/btrtl.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 20aeed3c1ee7..0354e93e7a7c 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c | |||
@@ -207,19 +207,19 @@ static int rtl_read_rom_version(struct hci_dev *hdev, u8 *version) | |||
207 | /* Read RTL ROM version command */ | 207 | /* Read RTL ROM version command */ |
208 | skb = __hci_cmd_sync(hdev, 0xfc6d, 0, NULL, HCI_INIT_TIMEOUT); | 208 | skb = __hci_cmd_sync(hdev, 0xfc6d, 0, NULL, HCI_INIT_TIMEOUT); |
209 | if (IS_ERR(skb)) { | 209 | if (IS_ERR(skb)) { |
210 | rtl_dev_err(hdev, "Read ROM version failed (%ld)\n", | 210 | rtl_dev_err(hdev, "Read ROM version failed (%ld)", |
211 | PTR_ERR(skb)); | 211 | PTR_ERR(skb)); |
212 | return PTR_ERR(skb); | 212 | return PTR_ERR(skb); |
213 | } | 213 | } |
214 | 214 | ||
215 | if (skb->len != sizeof(*rom_version)) { | 215 | if (skb->len != sizeof(*rom_version)) { |
216 | rtl_dev_err(hdev, "version event length mismatch\n"); | 216 | rtl_dev_err(hdev, "version event length mismatch"); |
217 | kfree_skb(skb); | 217 | kfree_skb(skb); |
218 | return -EIO; | 218 | return -EIO; |
219 | } | 219 | } |
220 | 220 | ||
221 | rom_version = (struct rtl_rom_version_evt *)skb->data; | 221 | rom_version = (struct rtl_rom_version_evt *)skb->data; |
222 | rtl_dev_info(hdev, "rom_version status=%x version=%x\n", | 222 | rtl_dev_info(hdev, "rom_version status=%x version=%x", |
223 | rom_version->status, rom_version->version); | 223 | rom_version->status, rom_version->version); |
224 | 224 | ||
225 | *version = rom_version->version; | 225 | *version = rom_version->version; |
@@ -263,7 +263,7 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev, | |||
263 | 263 | ||
264 | fwptr = btrtl_dev->fw_data + btrtl_dev->fw_len - sizeof(extension_sig); | 264 | fwptr = btrtl_dev->fw_data + btrtl_dev->fw_len - sizeof(extension_sig); |
265 | if (memcmp(fwptr, extension_sig, sizeof(extension_sig)) != 0) { | 265 | if (memcmp(fwptr, extension_sig, sizeof(extension_sig)) != 0) { |
266 | rtl_dev_err(hdev, "extension section signature mismatch\n"); | 266 | rtl_dev_err(hdev, "extension section signature mismatch"); |
267 | return -EINVAL; | 267 | return -EINVAL; |
268 | } | 268 | } |
269 | 269 | ||
@@ -284,7 +284,7 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev, | |||
284 | break; | 284 | break; |
285 | 285 | ||
286 | if (length == 0) { | 286 | if (length == 0) { |
287 | rtl_dev_err(hdev, "found instruction with length 0\n"); | 287 | rtl_dev_err(hdev, "found instruction with length 0"); |
288 | return -EINVAL; | 288 | return -EINVAL; |
289 | } | 289 | } |
290 | 290 | ||
@@ -297,7 +297,7 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev, | |||
297 | } | 297 | } |
298 | 298 | ||
299 | if (project_id < 0) { | 299 | if (project_id < 0) { |
300 | rtl_dev_err(hdev, "failed to find version instruction\n"); | 300 | rtl_dev_err(hdev, "failed to find version instruction"); |
301 | return -EINVAL; | 301 | return -EINVAL; |
302 | } | 302 | } |
303 | 303 | ||
@@ -308,13 +308,13 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev, | |||
308 | } | 308 | } |
309 | 309 | ||
310 | if (i >= ARRAY_SIZE(project_id_to_lmp_subver)) { | 310 | if (i >= ARRAY_SIZE(project_id_to_lmp_subver)) { |
311 | rtl_dev_err(hdev, "unknown project id %d\n", project_id); | 311 | rtl_dev_err(hdev, "unknown project id %d", project_id); |
312 | return -EINVAL; | 312 | return -EINVAL; |
313 | } | 313 | } |
314 | 314 | ||
315 | if (btrtl_dev->ic_info->lmp_subver != | 315 | if (btrtl_dev->ic_info->lmp_subver != |
316 | project_id_to_lmp_subver[i].lmp_subver) { | 316 | project_id_to_lmp_subver[i].lmp_subver) { |
317 | rtl_dev_err(hdev, "firmware is for %x but this is a %x\n", | 317 | rtl_dev_err(hdev, "firmware is for %x but this is a %x", |
318 | project_id_to_lmp_subver[i].lmp_subver, | 318 | project_id_to_lmp_subver[i].lmp_subver, |
319 | btrtl_dev->ic_info->lmp_subver); | 319 | btrtl_dev->ic_info->lmp_subver); |
320 | return -EINVAL; | 320 | return -EINVAL; |
@@ -322,7 +322,7 @@ static int rtlbt_parse_firmware(struct hci_dev *hdev, | |||
322 | 322 | ||
323 | epatch_info = (struct rtl_epatch_header *)btrtl_dev->fw_data; | 323 | epatch_info = (struct rtl_epatch_header *)btrtl_dev->fw_data; |
324 | if (memcmp(epatch_info->signature, RTL_EPATCH_SIGNATURE, 8) != 0) { | 324 | if (memcmp(epatch_info->signature, RTL_EPATCH_SIGNATURE, 8) != 0) { |
325 | rtl_dev_err(hdev, "bad EPATCH signature\n"); | 325 | rtl_dev_err(hdev, "bad EPATCH signature"); |
326 | return -EINVAL; | 326 | return -EINVAL; |
327 | } | 327 | } |
328 | 328 | ||
@@ -412,14 +412,14 @@ static int rtl_download_firmware(struct hci_dev *hdev, | |||
412 | skb = __hci_cmd_sync(hdev, 0xfc20, frag_len + 1, dl_cmd, | 412 | skb = __hci_cmd_sync(hdev, 0xfc20, frag_len + 1, dl_cmd, |
413 | HCI_INIT_TIMEOUT); | 413 | HCI_INIT_TIMEOUT); |
414 | if (IS_ERR(skb)) { | 414 | if (IS_ERR(skb)) { |
415 | rtl_dev_err(hdev, "download fw command failed (%ld)\n", | 415 | rtl_dev_err(hdev, "download fw command failed (%ld)", |
416 | PTR_ERR(skb)); | 416 | PTR_ERR(skb)); |
417 | ret = -PTR_ERR(skb); | 417 | ret = -PTR_ERR(skb); |
418 | goto out; | 418 | goto out; |
419 | } | 419 | } |
420 | 420 | ||
421 | if (skb->len != sizeof(struct rtl_download_response)) { | 421 | if (skb->len != sizeof(struct rtl_download_response)) { |
422 | rtl_dev_err(hdev, "download fw event length mismatch\n"); | 422 | rtl_dev_err(hdev, "download fw event length mismatch"); |
423 | kfree_skb(skb); | 423 | kfree_skb(skb); |
424 | ret = -EIO; | 424 | ret = -EIO; |
425 | goto out; | 425 | goto out; |
@@ -451,7 +451,7 @@ static int rtl_load_file(struct hci_dev *hdev, const char *name, u8 **buff) | |||
451 | const struct firmware *fw; | 451 | const struct firmware *fw; |
452 | int ret; | 452 | int ret; |
453 | 453 | ||
454 | rtl_dev_info(hdev, "loading %s\n", name); | 454 | rtl_dev_info(hdev, "loading %s", name); |
455 | ret = request_firmware(&fw, name, &hdev->dev); | 455 | ret = request_firmware(&fw, name, &hdev->dev); |
456 | if (ret < 0) | 456 | if (ret < 0) |
457 | return ret; | 457 | return ret; |
@@ -475,7 +475,7 @@ static int btrtl_setup_rtl8723a(struct hci_dev *hdev, | |||
475 | * (which is only for RTL8723B and newer). | 475 | * (which is only for RTL8723B and newer). |
476 | */ | 476 | */ |
477 | if (!memcmp(btrtl_dev->fw_data, RTL_EPATCH_SIGNATURE, 8)) { | 477 | if (!memcmp(btrtl_dev->fw_data, RTL_EPATCH_SIGNATURE, 8)) { |
478 | rtl_dev_err(hdev, "unexpected EPATCH signature!\n"); | 478 | rtl_dev_err(hdev, "unexpected EPATCH signature!"); |
479 | return -EINVAL; | 479 | return -EINVAL; |
480 | } | 480 | } |
481 | 481 | ||
@@ -510,7 +510,7 @@ static int btrtl_setup_rtl8723b(struct hci_dev *hdev, | |||
510 | fw_data = tbuff; | 510 | fw_data = tbuff; |
511 | } | 511 | } |
512 | 512 | ||
513 | rtl_dev_info(hdev, "cfg_sz %d, total sz %d\n", btrtl_dev->cfg_len, ret); | 513 | rtl_dev_info(hdev, "cfg_sz %d, total sz %d", btrtl_dev->cfg_len, ret); |
514 | 514 | ||
515 | ret = rtl_download_firmware(hdev, fw_data, ret); | 515 | ret = rtl_download_firmware(hdev, fw_data, ret); |
516 | 516 | ||
@@ -551,7 +551,7 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev, | |||
551 | } | 551 | } |
552 | 552 | ||
553 | resp = (struct hci_rp_read_local_version *)skb->data; | 553 | resp = (struct hci_rp_read_local_version *)skb->data; |
554 | rtl_dev_info(hdev, "examining hci_ver=%02x hci_rev=%04x lmp_ver=%02x lmp_subver=%04x\n", | 554 | rtl_dev_info(hdev, "examining hci_ver=%02x hci_rev=%04x lmp_ver=%02x lmp_subver=%04x", |
555 | resp->hci_ver, resp->hci_rev, | 555 | resp->hci_ver, resp->hci_rev, |
556 | resp->lmp_ver, resp->lmp_subver); | 556 | resp->lmp_ver, resp->lmp_subver); |
557 | 557 | ||
@@ -578,7 +578,7 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev, | |||
578 | btrtl_dev->fw_len = rtl_load_file(hdev, btrtl_dev->ic_info->fw_name, | 578 | btrtl_dev->fw_len = rtl_load_file(hdev, btrtl_dev->ic_info->fw_name, |
579 | &btrtl_dev->fw_data); | 579 | &btrtl_dev->fw_data); |
580 | if (btrtl_dev->fw_len < 0) { | 580 | if (btrtl_dev->fw_len < 0) { |
581 | rtl_dev_err(hdev, "firmware file %s not found\n", | 581 | rtl_dev_err(hdev, "firmware file %s not found", |
582 | btrtl_dev->ic_info->fw_name); | 582 | btrtl_dev->ic_info->fw_name); |
583 | ret = btrtl_dev->fw_len; | 583 | ret = btrtl_dev->fw_len; |
584 | goto err_free; | 584 | goto err_free; |
@@ -596,7 +596,7 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev, | |||
596 | &btrtl_dev->cfg_data); | 596 | &btrtl_dev->cfg_data); |
597 | if (btrtl_dev->ic_info->config_needed && | 597 | if (btrtl_dev->ic_info->config_needed && |
598 | btrtl_dev->cfg_len <= 0) { | 598 | btrtl_dev->cfg_len <= 0) { |
599 | rtl_dev_err(hdev, "mandatory config file %s not found\n", | 599 | rtl_dev_err(hdev, "mandatory config file %s not found", |
600 | btrtl_dev->ic_info->cfg_name); | 600 | btrtl_dev->ic_info->cfg_name); |
601 | ret = btrtl_dev->cfg_len; | 601 | ret = btrtl_dev->cfg_len; |
602 | goto err_free; | 602 | goto err_free; |
@@ -622,7 +622,7 @@ int btrtl_download_firmware(struct hci_dev *hdev, | |||
622 | * to a different value. | 622 | * to a different value. |
623 | */ | 623 | */ |
624 | if (!btrtl_dev->ic_info) { | 624 | if (!btrtl_dev->ic_info) { |
625 | rtl_dev_info(hdev, "assuming no firmware upload needed\n"); | 625 | rtl_dev_info(hdev, "assuming no firmware upload needed"); |
626 | return 0; | 626 | return 0; |
627 | } | 627 | } |
628 | 628 | ||
@@ -636,7 +636,7 @@ int btrtl_download_firmware(struct hci_dev *hdev, | |||
636 | case RTL_ROM_LMP_8822B: | 636 | case RTL_ROM_LMP_8822B: |
637 | return btrtl_setup_rtl8723b(hdev, btrtl_dev); | 637 | return btrtl_setup_rtl8723b(hdev, btrtl_dev); |
638 | default: | 638 | default: |
639 | rtl_dev_info(hdev, "assuming no firmware upload needed\n"); | 639 | rtl_dev_info(hdev, "assuming no firmware upload needed"); |
640 | return 0; | 640 | return 0; |
641 | } | 641 | } |
642 | } | 642 | } |
@@ -733,18 +733,18 @@ int btrtl_get_uart_settings(struct hci_dev *hdev, | |||
733 | 733 | ||
734 | total_data_len = btrtl_dev->cfg_len - sizeof(*config); | 734 | total_data_len = btrtl_dev->cfg_len - sizeof(*config); |
735 | if (total_data_len <= 0) { | 735 | if (total_data_len <= 0) { |
736 | rtl_dev_warn(hdev, "no config loaded\n"); | 736 | rtl_dev_warn(hdev, "no config loaded"); |
737 | return -EINVAL; | 737 | return -EINVAL; |
738 | } | 738 | } |
739 | 739 | ||
740 | config = (struct rtl_vendor_config *)btrtl_dev->cfg_data; | 740 | config = (struct rtl_vendor_config *)btrtl_dev->cfg_data; |
741 | if (le32_to_cpu(config->signature) != RTL_CONFIG_MAGIC) { | 741 | if (le32_to_cpu(config->signature) != RTL_CONFIG_MAGIC) { |
742 | rtl_dev_err(hdev, "invalid config magic\n"); | 742 | rtl_dev_err(hdev, "invalid config magic"); |
743 | return -EINVAL; | 743 | return -EINVAL; |
744 | } | 744 | } |
745 | 745 | ||
746 | if (total_data_len < le16_to_cpu(config->total_len)) { | 746 | if (total_data_len < le16_to_cpu(config->total_len)) { |
747 | rtl_dev_err(hdev, "config is too short\n"); | 747 | rtl_dev_err(hdev, "config is too short"); |
748 | return -EINVAL; | 748 | return -EINVAL; |
749 | } | 749 | } |
750 | 750 | ||
@@ -754,7 +754,7 @@ int btrtl_get_uart_settings(struct hci_dev *hdev, | |||
754 | switch (le16_to_cpu(entry->offset)) { | 754 | switch (le16_to_cpu(entry->offset)) { |
755 | case 0xc: | 755 | case 0xc: |
756 | if (entry->len < sizeof(*device_baudrate)) { | 756 | if (entry->len < sizeof(*device_baudrate)) { |
757 | rtl_dev_err(hdev, "invalid UART config entry\n"); | 757 | rtl_dev_err(hdev, "invalid UART config entry"); |
758 | return -EINVAL; | 758 | return -EINVAL; |
759 | } | 759 | } |
760 | 760 | ||
@@ -771,7 +771,7 @@ int btrtl_get_uart_settings(struct hci_dev *hdev, | |||
771 | break; | 771 | break; |
772 | 772 | ||
773 | default: | 773 | default: |
774 | rtl_dev_dbg(hdev, "skipping config entry 0x%x (len %u)\n", | 774 | rtl_dev_dbg(hdev, "skipping config entry 0x%x (len %u)", |
775 | le16_to_cpu(entry->offset), entry->len); | 775 | le16_to_cpu(entry->offset), entry->len); |
776 | break; | 776 | break; |
777 | }; | 777 | }; |
@@ -780,13 +780,13 @@ int btrtl_get_uart_settings(struct hci_dev *hdev, | |||
780 | } | 780 | } |
781 | 781 | ||
782 | if (!found) { | 782 | if (!found) { |
783 | rtl_dev_err(hdev, "no UART config entry found\n"); | 783 | rtl_dev_err(hdev, "no UART config entry found"); |
784 | return -ENOENT; | 784 | return -ENOENT; |
785 | } | 785 | } |
786 | 786 | ||
787 | rtl_dev_dbg(hdev, "device baudrate = 0x%08x\n", *device_baudrate); | 787 | rtl_dev_dbg(hdev, "device baudrate = 0x%08x", *device_baudrate); |
788 | rtl_dev_dbg(hdev, "controller baudrate = %u\n", *controller_baudrate); | 788 | rtl_dev_dbg(hdev, "controller baudrate = %u", *controller_baudrate); |
789 | rtl_dev_dbg(hdev, "flow control %d\n", *flow_control); | 789 | rtl_dev_dbg(hdev, "flow control %d", *flow_control); |
790 | 790 | ||
791 | return 0; | 791 | return 0; |
792 | } | 792 | } |