FIXUP: FROMLIST: Bluetooth: Add support for hci devcoredump
0-day warning:
>> include/net/bluetooth/bluetooth.h:152:19: error: format '%u'
expects argument of type 'unsigned int', but argument 5 has type
'size_t' {aka 'long unsigned int'} [-Werror=format=]
152 | #define BT_PREFIX "%s() "
include/net/bluetooth/bluetooth.h:164:17: note: in expansion of
macro 'BT_PREFIX'
164 | bt_info(BT_PREFIX fmt "\n" BT_PREFIX_PARAM, ##__VA_ARGS__)
include/net/bluetooth/bluetooth.h:171:9: note: in expansion of
macro 'BT_INFO'
171 | BT_INFO("%s: " fmt, (hdev)->name, ##__VA_ARGS__)
net/bluetooth/coredump.c:364:9: note: in expansion of macro
'bt_dev_info'
364 | bt_dev_info(hdev, "Devcoredump timeout with size %u (expect %u)",
Fix specifier warnings.
BUG=b:154866409
TEST=Build
Signed-off-by: Aashish Sharma <shraash@google.com>
Change-Id: I720507bb6bcc1139891d099322f4502b9f918374
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3831729
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@google.com>
Tested-by: Manish Mandlik <mmandlik@chromium.org>
Commit-Queue: Manish Mandlik <mmandlik@chromium.org>
diff --git a/net/bluetooth/coredump.c b/net/bluetooth/coredump.c
index b412056..30aff70 100644
--- a/net/bluetooth/coredump.c
+++ b/net/bluetooth/coredump.c
@@ -297,7 +297,7 @@
bt_dev_info(hdev,
"Devcoredump complete with size %u "
- "(expect %u)",
+ "(expect %zu)",
dump_size, hdev->dump.alloc_size);
dev_coredumpv(&hdev->dev, hdev->dump.head, dump_size,
@@ -316,7 +316,7 @@
bt_dev_info(hdev,
"Devcoredump aborted with size %u "
- "(expect %u)",
+ "(expect %zu)",
dump_size, hdev->dump.alloc_size);
/* Emit a devcoredump with the available data */
@@ -361,7 +361,7 @@
hci_devcoredump_update_state(hdev, HCI_DEVCOREDUMP_TIMEOUT);
dump_size = hdev->dump.tail - hdev->dump.head;
- bt_dev_info(hdev, "Devcoredump timeout with size %u (expect %u)",
+ bt_dev_info(hdev, "Devcoredump timeout with size %u (expect %zu)",
dump_size, hdev->dump.alloc_size);
/* Emit a devcoredump with the available data */