Re: [PATCH 08/11] net: bluetooth: change the len parameter of sco_send_frame() to size_t

From: kbuild test robot
Date: Fri Oct 23 2015 - 08:37:12 EST


Hi LABBE,

[auto build test WARNING on net/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url: https://github.com/0day-ci/linux/commits/LABBE-Corentin/net-change-len-parameter-type-for-memcpy_-to-from-_msg/20151023-201642
config: tile-allyesconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=tile

All warnings (new ones prefixed by >>):

net/bluetooth/sco.c: In function 'sco_send_frame':
>> net/bluetooth/sco.c:281:2: warning: format '%d' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat]

vim +281 net/bluetooth/sco.c

^1da177e Linus Torvalds 2005-04-16 265 done:
09fd0de5 Gustavo Padovan 2011-06-17 266 hci_dev_unlock(hdev);
^1da177e Linus Torvalds 2005-04-16 267 hci_dev_put(hdev);
^1da177e Linus Torvalds 2005-04-16 268 return err;
^1da177e Linus Torvalds 2005-04-16 269 }
^1da177e Linus Torvalds 2005-04-16 270
722dd7cd LABBE Corentin 2015-10-23 271 static int sco_send_frame(struct sock *sk, struct msghdr *msg, size_t len)
^1da177e Linus Torvalds 2005-04-16 272 {
^1da177e Linus Torvalds 2005-04-16 273 struct sco_conn *conn = sco_pi(sk)->conn;
^1da177e Linus Torvalds 2005-04-16 274 struct sk_buff *skb;
088ce088 Mikel Astiz 2012-04-11 275 int err;
^1da177e Linus Torvalds 2005-04-16 276
^1da177e Linus Torvalds 2005-04-16 277 /* Check outgoing MTU */
^1da177e Linus Torvalds 2005-04-16 278 if (len > conn->mtu)
^1da177e Linus Torvalds 2005-04-16 279 return -EINVAL;
^1da177e Linus Torvalds 2005-04-16 280
^1da177e Linus Torvalds 2005-04-16 @281 BT_DBG("sk %p len %d", sk, len);
^1da177e Linus Torvalds 2005-04-16 282
088ce088 Mikel Astiz 2012-04-11 283 skb = bt_skb_send_alloc(sk, len, msg->msg_flags & MSG_DONTWAIT, &err);
b9dbdbc1 Gustavo Padovan 2010-05-01 284 if (!skb)
^1da177e Linus Torvalds 2005-04-16 285 return err;
^1da177e Linus Torvalds 2005-04-16 286
6ce8e9ce Al Viro 2014-04-06 287 if (memcpy_from_msg(skb_put(skb, len), msg, len)) {
b9dbdbc1 Gustavo Padovan 2010-05-01 288 kfree_skb(skb);
b9dbdbc1 Gustavo Padovan 2010-05-01 289 return -EFAULT;

:::::: The code at line 281 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data