Skip to content

Commit

Permalink
Bluetooth: Correct debug print specifier for u16 objects
Browse files Browse the repository at this point in the history
Some functions print u16 objects as "0xc03" others as "0x0c03". Patch
ensures that opcodes printed are the in the same format and consistent
with bluetooth code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed Jun 12, 2012
1 parent bda4f23 commit f0e0951
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static void hci_notify(struct hci_dev *hdev, int event)

void hci_req_complete(struct hci_dev *hdev, __u16 cmd, int result)
{
BT_DBG("%s command 0x%04x result 0x%2.2x", hdev->name, cmd, result);
BT_DBG("%s command 0x%4.4x result 0x%2.2x", hdev->name, cmd, result);

/* If this is the init phase check if the completed command matches
* the last init command, and if not just return.
Expand Down Expand Up @@ -2092,7 +2092,7 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 opcode, __u32 plen, void *param)
struct hci_command_hdr *hdr;
struct sk_buff *skb;

BT_DBG("%s opcode 0x%x plen %d", hdev->name, opcode, plen);
BT_DBG("%s opcode 0x%4.4x plen %d", hdev->name, opcode, plen);

skb = bt_skb_alloc(len, GFP_ATOMIC);
if (!skb) {
Expand Down Expand Up @@ -2134,7 +2134,7 @@ void *hci_sent_cmd_data(struct hci_dev *hdev, __u16 opcode)
if (hdr->opcode != cpu_to_le16(opcode))
return NULL;

BT_DBG("%s opcode 0x%x", hdev->name, opcode);
BT_DBG("%s opcode 0x%4.4x", hdev->name, opcode);

return hdev->sent_cmd->data + HCI_COMMAND_HDR_SIZE;
}
Expand Down Expand Up @@ -2204,7 +2204,7 @@ void hci_send_acl(struct hci_chan *chan, struct sk_buff *skb, __u16 flags)
struct hci_conn *conn = chan->conn;
struct hci_dev *hdev = conn->hdev;

BT_DBG("%s chan %p flags 0x%x", hdev->name, chan, flags);
BT_DBG("%s chan %p flags 0x%4.4x", hdev->name, chan, flags);

skb->dev = (void *) hdev;

Expand Down Expand Up @@ -2704,7 +2704,7 @@ static void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)
flags = hci_flags(handle);
handle = hci_handle(handle);

BT_DBG("%s len %d handle 0x%x flags 0x%x", hdev->name, skb->len,
BT_DBG("%s len %d handle 0x%4.4x flags 0x%4.4x", hdev->name, skb->len,
handle, flags);

hdev->stat.acl_rx++;
Expand Down Expand Up @@ -2746,7 +2746,7 @@ static void hci_scodata_packet(struct hci_dev *hdev, struct sk_buff *skb)

handle = __le16_to_cpu(hdr->handle);

BT_DBG("%s len %d handle 0x%x", hdev->name, skb->len, handle);
BT_DBG("%s len %d handle 0x%4.4x", hdev->name, skb->len, handle);

hdev->stat.sco_rx++;

Expand Down

0 comments on commit f0e0951

Please sign in to comment.