mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
Bluetooth: mgmt: Use the correct print format
According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye <yekai13@huawei.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
610850bebc
commit
85d6728421
@ -4279,7 +4279,7 @@ int mgmt_add_adv_patterns_monitor_complete(struct hci_dev *hdev, u8 status)
|
||||
|
||||
done:
|
||||
hci_dev_unlock(hdev);
|
||||
bt_dev_dbg(hdev, "add monitor %d complete, status %d",
|
||||
bt_dev_dbg(hdev, "add monitor %d complete, status %u",
|
||||
rp.monitor_handle, status);
|
||||
|
||||
return err;
|
||||
@ -4504,7 +4504,7 @@ int mgmt_remove_adv_monitor_complete(struct hci_dev *hdev, u8 status)
|
||||
|
||||
done:
|
||||
hci_dev_unlock(hdev);
|
||||
bt_dev_dbg(hdev, "remove monitor %d complete, status %d",
|
||||
bt_dev_dbg(hdev, "remove monitor %d complete, status %u",
|
||||
rp.monitor_handle, status);
|
||||
|
||||
return err;
|
||||
@ -4834,7 +4834,7 @@ void mgmt_start_discovery_complete(struct hci_dev *hdev, u8 status)
|
||||
{
|
||||
struct mgmt_pending_cmd *cmd;
|
||||
|
||||
bt_dev_dbg(hdev, "status %d", status);
|
||||
bt_dev_dbg(hdev, "status %u", status);
|
||||
|
||||
hci_dev_lock(hdev);
|
||||
|
||||
@ -5090,7 +5090,7 @@ void mgmt_stop_discovery_complete(struct hci_dev *hdev, u8 status)
|
||||
{
|
||||
struct mgmt_pending_cmd *cmd;
|
||||
|
||||
bt_dev_dbg(hdev, "status %d", status);
|
||||
bt_dev_dbg(hdev, "status %u", status);
|
||||
|
||||
hci_dev_lock(hdev);
|
||||
|
||||
@ -5303,7 +5303,7 @@ static int set_device_id(struct sock *sk, struct hci_dev *hdev, void *data,
|
||||
static void enable_advertising_instance(struct hci_dev *hdev, u8 status,
|
||||
u16 opcode)
|
||||
{
|
||||
bt_dev_dbg(hdev, "status %d", status);
|
||||
bt_dev_dbg(hdev, "status %u", status);
|
||||
}
|
||||
|
||||
static void set_advertising_complete(struct hci_dev *hdev, u8 status,
|
||||
@ -6347,7 +6347,7 @@ static void conn_info_refresh_complete(struct hci_dev *hdev, u8 hci_status,
|
||||
handle = __le16_to_cpu(cp->handle);
|
||||
conn = hci_conn_hash_lookup_handle(hdev, handle);
|
||||
if (!conn) {
|
||||
bt_dev_err(hdev, "unknown handle (%d) in conn_info response",
|
||||
bt_dev_err(hdev, "unknown handle (%u) in conn_info response",
|
||||
handle);
|
||||
goto unlock;
|
||||
}
|
||||
@ -7654,7 +7654,7 @@ static void add_advertising_complete(struct hci_dev *hdev, u8 status,
|
||||
struct adv_info *adv_instance, *n;
|
||||
u8 instance;
|
||||
|
||||
bt_dev_dbg(hdev, "status %d", status);
|
||||
bt_dev_dbg(hdev, "status %u", status);
|
||||
|
||||
hci_dev_lock(hdev);
|
||||
|
||||
@ -8184,7 +8184,7 @@ static void remove_advertising_complete(struct hci_dev *hdev, u8 status,
|
||||
struct mgmt_cp_remove_advertising *cp;
|
||||
struct mgmt_rp_remove_advertising rp;
|
||||
|
||||
bt_dev_dbg(hdev, "status %d", status);
|
||||
bt_dev_dbg(hdev, "status %u", status);
|
||||
|
||||
hci_dev_lock(hdev);
|
||||
|
||||
|
@ -146,7 +146,7 @@ int set_def_system_config(struct sock *sk, struct hci_dev *hdev, void *data,
|
||||
const u16 type = le16_to_cpu(TO_TLV(buffer)->type);
|
||||
|
||||
if (buffer_left < exp_len) {
|
||||
bt_dev_warn(hdev, "invalid len left %d, exp >= %d",
|
||||
bt_dev_warn(hdev, "invalid len left %u, exp >= %u",
|
||||
buffer_left, exp_len);
|
||||
|
||||
return mgmt_cmd_status(sk, hdev->id,
|
||||
@ -198,7 +198,7 @@ int set_def_system_config(struct sock *sk, struct hci_dev *hdev, void *data,
|
||||
}
|
||||
|
||||
if (exp_type_len && len != exp_type_len) {
|
||||
bt_dev_warn(hdev, "invalid length %d, exp %zu for type %d",
|
||||
bt_dev_warn(hdev, "invalid length %d, exp %zu for type %u",
|
||||
len, exp_type_len, type);
|
||||
|
||||
return mgmt_cmd_status(sk, hdev->id,
|
||||
|
Loading…
Reference in New Issue
Block a user