Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: hci_h5: Switch from BT_ERR to bt_dev_err where possible

All HCI device specific error messages shall use bt_dev_err to indicate
the device name in the message.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>

authored by

Marcel Holtmann and committed by
Johan Hedberg
bb0084ec 00b383b8

+13 -13
+13 -13
drivers/bluetooth/hci_h5.c
··· 178 178 { 179 179 struct h5 *h5 = hu->priv; 180 180 181 - BT_ERR("Peer device has reset"); 181 + bt_dev_err(hu->hdev, "Peer device has reset"); 182 182 183 183 h5->state = H5_UNINITIALIZED; 184 184 ··· 438 438 H5_HDR_LEN(hdr)); 439 439 440 440 if (((hdr[0] + hdr[1] + hdr[2] + hdr[3]) & 0xff) != 0xff) { 441 - BT_ERR("Invalid header checksum"); 441 + bt_dev_err(hu->hdev, "Invalid header checksum"); 442 442 h5_reset_rx(h5); 443 443 return 0; 444 444 } 445 445 446 446 if (H5_HDR_RELIABLE(hdr) && H5_HDR_SEQ(hdr) != h5->tx_ack) { 447 - BT_ERR("Out-of-order packet arrived (%u != %u)", 448 - H5_HDR_SEQ(hdr), h5->tx_ack); 447 + bt_dev_err(hu->hdev, "Out-of-order packet arrived (%u != %u)", 448 + H5_HDR_SEQ(hdr), h5->tx_ack); 449 449 h5_reset_rx(h5); 450 450 return 0; 451 451 } 452 452 453 453 if (h5->state != H5_ACTIVE && 454 454 H5_HDR_PKT_TYPE(hdr) != HCI_3WIRE_LINK_PKT) { 455 - BT_ERR("Non-link packet received in non-active state"); 455 + bt_dev_err(hu->hdev, "Non-link packet received in non-active state"); 456 456 h5_reset_rx(h5); 457 457 return 0; 458 458 } ··· 475 475 476 476 h5->rx_skb = bt_skb_alloc(H5_MAX_LEN, GFP_ATOMIC); 477 477 if (!h5->rx_skb) { 478 - BT_ERR("Can't allocate mem for new packet"); 478 + bt_dev_err(hu->hdev, "Can't allocate mem for new packet"); 479 479 h5_reset_rx(h5); 480 480 return -ENOMEM; 481 481 } ··· 551 551 552 552 if (h5->rx_pending > 0) { 553 553 if (*ptr == SLIP_DELIMITER) { 554 - BT_ERR("Too short H5 packet"); 554 + bt_dev_err(hu->hdev, "Too short H5 packet"); 555 555 h5_reset_rx(h5); 556 556 continue; 557 557 } ··· 578 578 struct h5 *h5 = hu->priv; 579 579 580 580 if (skb->len > 0xfff) { 581 - BT_ERR("Packet too long (%u bytes)", skb->len); 581 + bt_dev_err(hu->hdev, "Packet too long (%u bytes)", skb->len); 582 582 kfree_skb(skb); 583 583 return 0; 584 584 } 585 585 586 586 if (h5->state != H5_ACTIVE) { 587 - BT_ERR("Ignoring HCI data in non-active state"); 587 + bt_dev_err(hu->hdev, "Ignoring HCI data in non-active state"); 588 588 kfree_skb(skb); 589 589 return 0; 590 590 } ··· 601 601 break; 602 602 603 603 default: 604 - BT_ERR("Unknown packet type %u", hci_skb_pkt_type(skb)); 604 + bt_dev_err(hu->hdev, "Unknown packet type %u", hci_skb_pkt_type(skb)); 605 605 kfree_skb(skb); 606 606 break; 607 607 } ··· 657 657 int i; 658 658 659 659 if (!valid_packet_type(pkt_type)) { 660 - BT_ERR("Unknown packet type %u", pkt_type); 660 + bt_dev_err(hu->hdev, "Unknown packet type %u", pkt_type); 661 661 return NULL; 662 662 } 663 663 ··· 734 734 } 735 735 736 736 skb_queue_head(&h5->unrel, skb); 737 - BT_ERR("Could not dequeue pkt because alloc_skb failed"); 737 + bt_dev_err(hu->hdev, "Could not dequeue pkt because alloc_skb failed"); 738 738 } 739 739 740 740 spin_lock_irqsave_nested(&h5->unack.lock, flags, SINGLE_DEPTH_NESTING); ··· 754 754 } 755 755 756 756 skb_queue_head(&h5->rel, skb); 757 - BT_ERR("Could not dequeue pkt because alloc_skb failed"); 757 + bt_dev_err(hu->hdev, "Could not dequeue pkt because alloc_skb failed"); 758 758 } 759 759 760 760 unlock: