* [bluetooth:master 224/240] net/bluetooth/hci_event.c:886:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t'
@ 2012-09-28 1:16 Fengguang Wu
2012-09-28 11:44 ` [PATCH] Bluetooth: Use %zu print specifier for size_t type Andrei Emeltchenko
0 siblings, 1 reply; 3+ messages in thread
From: Fengguang Wu @ 2012-09-28 1:16 UTC (permalink / raw)
To: Andrei Emeltchenko
Cc: Yuanhan Liu, kernel-janitors, Gustavo Padovan, linux-bluetooth
Hi Andrei,
FYI, there are new compile warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
head: 392f44d3e7894f6fe314b85b4a1611b7b1d98226
commit: 903e45411099ae8292f5ce637ad0c72f6fef61db [224/240] Bluetooth: AMP: Use HCI cmd to Read Loc AMP Assoc
config: x86_64-allmodconfig
All warnings:
net/bluetooth/hci_event.c: In function 'hci_cc_read_local_amp_assoc':
net/bluetooth/hci_event.c:886:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat]
net/bluetooth/hci_event.c:886:3: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat]
vim +886 net/bluetooth/hci_event.c
903e4541 (Andrei Emeltchenko 2012-09-27 870) static void hci_cc_read_local_amp_assoc(struct hci_dev *hdev,
903e4541 (Andrei Emeltchenko 2012-09-27 871) struct sk_buff *skb)
903e4541 (Andrei Emeltchenko 2012-09-27 872) {
903e4541 (Andrei Emeltchenko 2012-09-27 873) struct hci_rp_read_local_amp_assoc *rp = (void *) skb->data;
903e4541 (Andrei Emeltchenko 2012-09-27 874) struct amp_assoc *assoc = &hdev->loc_assoc;
903e4541 (Andrei Emeltchenko 2012-09-27 875) size_t rem_len, frag_len;
903e4541 (Andrei Emeltchenko 2012-09-27 876)
903e4541 (Andrei Emeltchenko 2012-09-27 877) BT_DBG("%s status 0x%2.2x", hdev->name, rp->status);
903e4541 (Andrei Emeltchenko 2012-09-27 878)
903e4541 (Andrei Emeltchenko 2012-09-27 879) if (rp->status)
903e4541 (Andrei Emeltchenko 2012-09-27 880) goto a2mp_rsp;
903e4541 (Andrei Emeltchenko 2012-09-27 881)
903e4541 (Andrei Emeltchenko 2012-09-27 882) frag_len = skb->len - sizeof(*rp);
903e4541 (Andrei Emeltchenko 2012-09-27 883) rem_len = __le16_to_cpu(rp->rem_len);
903e4541 (Andrei Emeltchenko 2012-09-27 884)
903e4541 (Andrei Emeltchenko 2012-09-27 885) if (rem_len > frag_len) {
903e4541 (Andrei Emeltchenko 2012-09-27 @886) BT_DBG("frag_len %d rem_len %d", frag_len, rem_len);
903e4541 (Andrei Emeltchenko 2012-09-27 887)
903e4541 (Andrei Emeltchenko 2012-09-27 888) memcpy(assoc->data + assoc->offset, rp->frag, frag_len);
903e4541 (Andrei Emeltchenko 2012-09-27 889) assoc->offset += frag_len;
903e4541 (Andrei Emeltchenko 2012-09-27 890)
903e4541 (Andrei Emeltchenko 2012-09-27 891) /* Read other fragments */
903e4541 (Andrei Emeltchenko 2012-09-27 892) amp_read_loc_assoc_frag(hdev, rp->phy_handle);
903e4541 (Andrei Emeltchenko 2012-09-27 893)
903e4541 (Andrei Emeltchenko 2012-09-27 894) return;
---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu, Yuanhan Liu Intel Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Bluetooth: Use %zu print specifier for size_t type
2012-09-28 1:16 [bluetooth:master 224/240] net/bluetooth/hci_event.c:886:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' Fengguang Wu
@ 2012-09-28 11:44 ` Andrei Emeltchenko
2012-09-28 15:54 ` Gustavo Padovan
0 siblings, 1 reply; 3+ messages in thread
From: Andrei Emeltchenko @ 2012-09-28 11:44 UTC (permalink / raw)
To: linux-bluetooth
From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Correct warnings reported by Fengguang Wu <fengguang.wu@intel.com>.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
---
net/bluetooth/hci_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 3151d85..82e478a 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -883,7 +883,7 @@ static void hci_cc_read_local_amp_assoc(struct hci_dev *hdev,
rem_len = __le16_to_cpu(rp->rem_len);
if (rem_len > frag_len) {
- BT_DBG("frag_len %ld rem_len %ld", frag_len, rem_len);
+ BT_DBG("frag_len %zu rem_len %zu", frag_len, rem_len);
memcpy(assoc->data + assoc->offset, rp->frag, frag_len);
assoc->offset += frag_len;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: Use %zu print specifier for size_t type
2012-09-28 11:44 ` [PATCH] Bluetooth: Use %zu print specifier for size_t type Andrei Emeltchenko
@ 2012-09-28 15:54 ` Gustavo Padovan
0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2012-09-28 15:54 UTC (permalink / raw)
To: Andrei Emeltchenko; +Cc: linux-bluetooth
Hi Andrei,
* Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com> [2012-09-28 14:44:23 +0300]:
> From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
>
> Correct warnings reported by Fengguang Wu <fengguang.wu@intel.com>.
>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
> ---
> net/bluetooth/hci_event.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch has been applied to bluetooth-next. Thanks.
Gustavo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-28 15:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-28 1:16 [bluetooth:master 224/240] net/bluetooth/hci_event.c:886:3: warning: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' Fengguang Wu
2012-09-28 11:44 ` [PATCH] Bluetooth: Use %zu print specifier for size_t type Andrei Emeltchenko
2012-09-28 15:54 ` Gustavo Padovan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).